Public report of Genesis-Embodied-AI/genesis-world, published 20 October 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.10.5). Watchdog 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, 20 October 2026, 17:00 UTC · Survey ID cd_0033d4f17f164e1f96a9d7ba7f0988a8
Genesis-Embodied-AI/genesis-world
Measured 20 October 2026, 16:53 UTC, at code version 4c8cc17
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
Down 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: 136,173 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
52 critical1585 serious84 minor
17 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks 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
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
20 October 2026, 16:53 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 Watchdog. It is open to any tool that
implements it, and today Watchdog is the only one that does.
The score is deterministic, which means the same code always gets the same score. Watchdog works 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 ▸
55of 58 dimensions measured by tools. The other 3 are advisory notes from an AI model, which explain the code but don't count towards the score.
1701of 1721 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.
58dimensions across 7 lenses, read from 136,173 lines of product code in 1 project.
Genesis-Embodied-AI/genesis-world scores 46 out of 100 and is rated Weak, while five of its seven lenses score higher still: Architecture at 86, Security and Compliance at 61 and Code Health and Maturity at 58, all rated Adequate, and Performance at 80, rated Strong.
The score is lower than those five because the weakest lens counts most, and here that is Production Readiness, which scores 39 and is rated Weak. Its Security & performance tooling dimension scores 0 out of 10, and until that reaches 4, Production Readiness can't be rated higher than Adequate. The first actions are to resolve the 1 Banned license finding(s) in License Compliance and to 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, and if Production Readiness rose to 70, the score would rise from 46 to about 52.
52 findings are critical: 45 in Static Analysis (SAST), two in Page structure, two in Text alternatives, one in Knowledge Freshness, one in License Compliance and one in Secrets (history).
Watchdog couldn't measure 16 dimensions in this code, among them Code Coverage, Test Reliability and Documentation Quality, so they are left out of the score. The product code is 136,173 lines, which would take an estimated 1.1 person-years, around €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 46 to about 52.
Code composition: what the lines of code are
Product code 78%Tests 22%
New since the last survey: 112 findings
These 112 critical or serious findings weren't in the previous survey, on 4 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
Watchdog compares 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: 79 findings
These 79 critical or serious findings were in the previous survey, on 4 October 2026, and are gone from this one.
€52,000 to €260,000, for 865 to 2,744 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 46. 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: 136,173 lines of product code
How the estimate is made: Watchdog prices 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 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 5 points · Medium effort · Text alternatives
3
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.
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 3 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 Watchdog estimates the extra work at 5% to 12% on every change. The history of the code shows how much it changes: about 106,515 lines over the last 90 days, which is about 431,978 lines a year. At that pace, the extra work comes to an estimated 55.4 to 332.6 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 Watchdog's 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; 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.
245 modules, with 225 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; 205 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.
recorders.trajectory uses utils.array_class, so a change to utils.array_class can break recorders.trajectory, while a change to recorders.trajectory can't break utils.array_class.
Position
Below the diagonal: recorders.trajectory uses a module listed above it, which is the healthy direction.
vis.viewer_plugins.raycast uses vis.viewer_plugins.base, so a change to vis.viewer_plugins.base can break vis.viewer_plugins.raycast, while a change to vis.viewer_plugins.raycast can't break vis.viewer_plugins.base.
Position
Below the diagonal: vis.viewer_plugins.raycast 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.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.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 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 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.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_geom uses constants, so a change to constants can break engine.entities.rigid_entity.rigid_geom, while a change to engine.entities.rigid_entity.rigid_geom can't break constants.
Position
Below the diagonal: engine.entities.rigid_entity.rigid_geom uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.rigid_geom uses repr_base, so a change to repr_base can break engine.entities.rigid_entity.rigid_geom, while a change to engine.entities.rigid_entity.rigid_geom can't break repr_base.
Position
Below the diagonal: engine.entities.rigid_entity.rigid_geom uses a module listed above it, which is the healthy direction.
engine.entities.rigid_entity.rigid_geom uses engine.entities.rigid_entity.description, so a change to engine.entities.rigid_entity.description can break engine.entities.rigid_entity.rigid_geom, while a change to engine.entities.rigid_entity.rigid_geom can't break engine.entities.rigid_entity.description.
Position
Below the diagonal: engine.entities.rigid_entity.rigid_geom 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 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
76
High / Critical
A03:2025 — Software Supply Chain Failures
9
Medium
A07:2025 — Authentication Failures
2
High / Critical
Roadmap
First, ensure all media elements have appropriate text alternatives and captions to support accessibility. Second, integrate static analysis into the CI pipeline to automatically block security regressions before they are merged. Third, correct page structure by adding language attributes, titles, and main landmarks while removing meta-refreshes. Fourth, resolve the single banned license finding to ensure compliance. Finally, enforce accessibility standards by adding assertions to the existing test suite to prevent future regressions.
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 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.
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.
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 Watchdog 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 — 52
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 — 1585
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 — 84
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
Watchdog 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. 55 of 58 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 3 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.8 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three 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; ◐ Advisory — an LLM prose judgement. 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; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 58 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, 1701 of 1721 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, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — 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 — Watchdog 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 — Watchdog 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 — LLM provider failed — The model provider returned an unusable result, so this LLM-assisted dimension fell back to a measurement gap (confidence 0) rather than a penalty. Re-run with a reachable provider to score it.
D22 Internal API Consistency — not measured this run — Watchdog 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.
D27 Navigability — not measured this run — Watchdog 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. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
AX1 Captive dependencies — not measured this run — Watchdog 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 — Watchdog 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 — Watchdog 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. Watchdog then boots 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 — Watchdog 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 — Watchdog 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 — Watchdog 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.
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 — Watchdog 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 — Watchdog 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 — Watchdog 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 — Watchdog 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, 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 — Watchdog 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
Watchdog assesses the repository exactly as committed, and only the repository. By design it does 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.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
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.
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: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
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.
The LLM boundary
LLM-set scores this run (3): D21, D26, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
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.
+ 211 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 12 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with narrowphase.func_contact_overlap_axes (cyclomatic 133), box_contact.func_box_box_contact (cyclomatic 129), KinematicEntityDescription._parse_scene (cyclomatic 96). — 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 12 together lifts Cyclomatic Complexity from 4.1 to about 5.5/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.
+ 422 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 427 bodies over 15 down to 15 or less in Cognitive Complexity — start with narrowphase.func_contact_overlap_axes (cognitive 558), narrowphase.func_add_polytope_vertex_contacts_sdf (cognitive 406), box_contact.func_box_box_contact (cognitive 388). — 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 427 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.8 / 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 56 FileTooLong finding(s) in God Classes — start with REDACTED (2), misc.py (2), camera.py (2). — One of this dimension's main actionable groups (56 warning-level).
Resolve the 19 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 (19 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.
487 duplicated block group(s) detected. A further 29 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 80 of the 516 are in trees this repository does not ship — vendored, example/demo, 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.
+ 156 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 67 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with sap_coupler.py (13), forward_dynamics.py (7), solver.py (6). — One of this dimension's main actionable groups (67 warning-level).
Resolve the 45 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with forward_dynamics.py (6), path_planning.py (4), box_contact.py (3). — One of this dimension's main actionable groups (45 warning-level).
Resolve the 35 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with forward_dynamics.py (4), point_cloud_tactile.py (3), linesearch.py (3). — One of this dimension's main actionable groups (35 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 8 Low cohesion finding(s) in Cohesion (LCOM4) — start with rigid_entity.py (2), fem_solver.py, kinematic_solver.py. — One of this dimension's main actionable groups (8 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.
450 test methods: 447 unit, 3 integration, 0 BDD, 0 e2e. The Python suite contributes 450 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, secure, and not bloated.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.
3 outdated, 0 yanked pinned Python distributions. 4 of 34 shipped distributions were graded against pypi.org (0 not published there, 30 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 87 shipped Python distribution(s) use a banned license. Licences were resolved from PyPI over the distributions a consumer installs — this repository's 34 declared runtime requirement(s) closed transitively over each distribution's published `requires_dist` (53 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. 12 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 (25×133=3325); genesis/engine/solvers/rigid/rigid_solver.py (54×59=3186); genesis/engine/solvers/rigid/constraint/solver.py (39×68=2652) Repeated repair below the complexity floor: genesis/engine/entities/rigid_entity/inertial.py (3 of 3 changes were fixes); genesis/engine/entities/fem_entity.py (3 of 3 changes were fixes)
Resolve the 59 Hotspot finding(s) in Churn × Complexity Hotspots — start with scene.py (2), narrowphase.py, rigid_solver.py. — One of this dimension's main actionable groups (59 warning-level).
Resolve the 2 Repeated repair finding(s) in Churn × Complexity Hotspots — start with inertial.py, fem_entity.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/constraint/linesearch.py. Counted over 191 of the 265 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.
213 deducted task-comment markers across 136173 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.
Resolve the 140 FixmeComment finding(s) in Explicit Debt — start with misc.py (11), test_collision_nonconvex.py (8), __init__.py (5). — One of this dimension's main actionable groups (140 warning-level).
Resolve the 71 TodoComment finding(s) in Explicit Debt — start with sph_solver.py (7), sap_coupler.py (6), solver.py (4). — One of this dimension's main actionable groups (71 warning-level).
Resolve the 1 HackComment finding(s) in Explicit Debt — start with REDACTED. — 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.
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: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
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.
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).
76 finding(s): 0 critical, 45 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
+ 8 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.
7 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 265 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 6 Orphaned file finding(s) in Knowledge Freshness — start with force_fields.py, camera.py, font.py. — One of this dimension's main actionable groups (6 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 2 Change-coupling hub finding(s) in Change Coupling — start with rigid_solver.py, mpm_solver.py. — One of this dimension's main actionable groups (2 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 34 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.
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 README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
README.md runs `powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1`, but `https:/astral.sh/uv/install.ps1` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.md:142
What to do
Reconcile the README with reality: README.md runs `powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1`, but `https:/astral.sh/uv/install.ps1` does not exist.
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 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 52748 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.
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 Watchdog 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.
`iter_data` is public and takes `owner: object` from its caller, and it calls itself at line 240 (`iter_data`) with a piece of `owner` — and nowhere in `iter_data` 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 `iter_data` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — genesis/utils/array_class.py:240
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.
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 400 is called with an argument built by `set(self._coup_type_by_entity.values())` (line 400), 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:400
`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 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
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. (×4) — genesis/repr_base.py:71, genesis/engine/sensors/sensor_manager.py:123, genesis/ext/pyrender/overlay/plugin.py:280, …
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/engine/sensors/base_sensor.py:63, genesis/ext/pyrender/offscreen.py:228, genesis/ext/pyrender/platforms/base.py:46
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/ext/_trimesh_patch.py:516, genesis/ext/_trimesh_patch.py:521, genesis/ext/_trimesh_patch.py:606, …
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 443 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:443
`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
`debug` at line 243 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:243
`debug` at line 249 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:249
`debug` at line 255 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:255
`debug` at line 262 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:262
`debug` at line 400 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:400
`debug` at line 427 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:427
`debug` at line 600 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:600
`debug` at line 682 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:682
`debug` at line 788 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:788
`warning` at line 801 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:801
`warning` at line 525 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:525
`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 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
`debug` at line 178 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:178
`warning` at line 87 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:87
`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
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 — 59 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 — ~39245 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.
D19 Documentation Quality — LLM evaluation failed
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. 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 — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — no ADRs to check
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.py), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
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 (87 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.4.7 is published on PyPI under `LGPL-3.0`, 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.
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 examples/ipc/ipc_robot_cloth_teleop.py:247— # FIXME: The grip closes on position because force control on the fingers behaves erratically here. — 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 examples/rigid/ddp_multi_gpu.py:39— # FIXME: Forcing rendering device is not working reliably on all machines — 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 genesis/__init__.py:37— # FIXME: qd.Field does not support zero-copy on Metal for 'torch<=2.9.1'. — 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 genesis/__init__.py:225— # FIXME: Enforcing Quadrants num threads to 1 by default when running on CPU — 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 genesis/__init__.py:241— # FIXME: quadrants#980 - The bound is a 32-bit integer, which caps it at 2 GiB, so a working set larger than that
FixmeComment genesis/__init__.py:281— # FIXME: Turning off 'force_scalarize_matrix' is causing numerical instabilities ('nan') on MacOS — 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 genesis/__init__.py:283— # FIXME: Turning off 'advanced_optimization' is causing issues on MacOS — 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 genesis/engine/scene.py:308— # FIXME: quadrants#981 - Quadrants frees device memory without making its CUDA context current.
FixmeComment REDACTED:149— # .copy() FIXME: For some reason forcing copy is causing some tests to fails... — 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 genesis/engine/bvh.py:84— # FIXME: quadrants#925 - Metal lowers a fence to a control barrier, so the leaf walk, whose fences sit in divergent
FixmeComment genesis/engine/bvh.py:175— # FIXME: quadrants#925 - an atomic carries a memory barrier that Metal lowers to a control barrier, so the atomics
FixmeComment genesis/engine/couplers/sap_coupler.py:389— # FIXME: Convert collision_pair_idx to field here because SAPCoupler cannot support ndarray/field switch yet — 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 genesis/engine/couplers/sap_coupler.py:1138— # FIXME: This following two rigid solves are duplicated with the one in rigid_solver.py:func_solve_mass_batched — 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 genesis/engine/couplers/sap_coupler.py:2272— # FIXME This function is similar to the one in constraint_solver.py:add_collision_constraints. — 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 genesis/engine/couplers/sap_coupler.py:2949— # FIXME This is an approximated value, different from Drake, which actually calculates the distance — 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 genesis/engine/couplers/ipc_coupler/coupler.py:200— # FIXME: 'Solver.set_gravity' is not honored either, and goes through: it writes a solver buffer the IPC world — 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 genesis/engine/couplers/ipc_coupler/coupler.py:1029— # FIXME: It is currently necessary to enforce zero velocity to avoid double time integration by Rigid solver — 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 genesis/engine/entities/particle_entity.py:128— # FIXME: This check is too expensive — 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 genesis/engine/entities/mpm_entity.py:408— # FIXME: This check is too expensive — 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 genesis/engine/entities/mpm_entity.py:502— # FIXME: This check is too expensive — 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 genesis/engine/entities/mpm_entity.py:540— # FIXME: This check is too expensive — 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 genesis/engine/entities/mpm_entity.py:577— # FIXME: This check is too expensive — 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 genesis/engine/entities/fem_entity.py:241— # FIXME: This check is too expensive — 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 genesis/engine/entities/rigid_entity/rigid_entity.py:649— # FIXME: This check is too expensive — 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 genesis/engine/entities/rigid_entity/drone_entity.py:67— # FIXME: This check is too expensive — 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/styles.py:7— # TODO: Switch to 'enum.StrEnum' once Python 3.10 is dropped, so that the name of a theme needs no conversion. — 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/engine/simulator.py:255— # TODO: keeping as is 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 genesis/engine/scene.py:1005— # TODO: Could be optimized to only clear cache associated the the environments being reset. — 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/engine/scene.py:1009— # TODO: sets _next_particle = 0; not sure this is env isolation safe — 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:491— # TODO: Parsing PBR in obj or not — 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:520— # TODO: support vertex/face colors in luisa — 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/engine/couplers/sap_coupler.py:306— # TODO: Dynamically added constraints are 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.
TodoComment genesis/engine/couplers/sap_coupler.py:491— # TODO: Handling dynamically registered weld constraints would requiere passing 'constraint_state' as input. — 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/engine/couplers/sap_coupler.py:1953— # TODO: Maybe support different constraints for each batch in the future. — 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/engine/couplers/sap_coupler.py:2593— # TODO Check surface element only instead of all elements — 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/engine/couplers/sap_coupler.py:3295— # TODO Check surface element only instead of all elements — 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/engine/couplers/sap_coupler.py:2658— # TODO A better way to handle corner cases where pressure and pressure gradient are ill defined — 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/engine/couplers/legacy_coupler.py:504— # TODO: all collisions are on vertices instead of surface and edge — 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/engine/couplers/legacy_coupler.py:595— # FEM <-> SPH TODO: this doesn't work well — 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/engine/couplers/ipc_coupler/coupler.py:65— # TODO: consider deriving from Genesis joint properties instead of hardcoding. — 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/engine/entities/mpm_entity.py:287— # TODO: merge with self._solver.get_state?! — 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:62— # TODO: need FEM and PBD — 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:187— # TODO: test with different dt — 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:661— # TODO: check if this is correct — 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/engine/entities/fem_entity.py:1126— # TODO: not well-tested — 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/engine/solvers/sph_solver.py:160— # TODO: Support per-particle density — 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/engine/solvers/sph_solver.py:472— # TODO: make the neighbor density different for multiphase fluid — 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/engine/solvers/sph_solver.py:490— # TODO: if warm start — 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/engine/solvers/sph_solver.py:541— # TODO: if warm start — 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/engine/solvers/sph_solver.py:517— # TODO: warm start — 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.
Duplicated block (5 lines × 2) genesis/engine/bvh.py:159— genesis/engine/bvh.py:159-163 | genesis/engine/bvh.py:228-232 — 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:159` 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:1078— genesis/engine/couplers/sap_coupler.py:1078-1082 | 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:1084— genesis/engine/couplers/sap_coupler.py:1084-1088 | 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:1564— genesis/engine/couplers/sap_coupler.py:1564-1568 | genesis/engine/couplers/sap_coupler.py:1585-1589 — 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:1574— genesis/engine/couplers/sap_coupler.py:1574-1578 | genesis/engine/couplers/sap_coupler.py:1596-1600 — 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:2810— genesis/engine/couplers/sap_coupler.py:2810-2814 | genesis/engine/couplers/sap_coupler.py:2816-2820 — 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:3027— genesis/engine/couplers/sap_coupler.py:3027-3031 | genesis/engine/couplers/sap_coupler.py:3708-3714 — 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:3264— genesis/engine/couplers/sap_coupler.py:3264-3268 | genesis/engine/couplers/sap_coupler.py:3760-3764 — 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:3264` 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:3706— genesis/engine/couplers/sap_coupler.py:3706-3710 | genesis/engine/couplers/sap_coupler.py:3724-3728 — 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:3817— genesis/engine/couplers/sap_coupler.py:3817-3821 | genesis/engine/couplers/sap_coupler.py:3823-3827 — 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/fem_entity.py:288— genesis/engine/entities/fem_entity.py:288-292 | genesis/engine/entities/fem_entity.py:336-340 — 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/pbd_entity.py:50— genesis/engine/entities/pbd_entity.py:50-54 | genesis/engine/entities/sph_entity.py:145-149 — before extracting anything, compare `genesis/engine/entities/pbd_entity.py` and `genesis/engine/entities/sph_entity.py` as WHOLE FILES: this scan already matched 6 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.
Duplicated block (5 lines × 2) genesis/engine/entities/pbd_entity.py:58— genesis/engine/entities/pbd_entity.py:58-62 | genesis/engine/entities/sph_entity.py:153-157 — before extracting anything, compare `genesis/engine/entities/pbd_entity.py` and `genesis/engine/entities/sph_entity.py` as WHOLE FILES: this scan already matched 6 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. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `genesis/engine/entities/sph_entity.py:159` calls `get_position`, `get_particles_pos` and `genesis/engine/entities/pbd_entity.py:64` 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 × 2) genesis/engine/entities/pbd_entity.py:66— genesis/engine/entities/pbd_entity.py:66-70 | genesis/engine/entities/sph_entity.py:164-168 — before extracting anything, compare `genesis/engine/entities/pbd_entity.py` and `genesis/engine/entities/sph_entity.py` as WHOLE FILES: this scan already matched 6 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.
Duplicated block (5 lines × 2) genesis/engine/entities/pbd_entity.py:74— genesis/engine/entities/pbd_entity.py:74-78 | genesis/engine/entities/sph_entity.py:172-176 — before extracting anything, compare `genesis/engine/entities/pbd_entity.py` and `genesis/engine/entities/sph_entity.py` as WHOLE FILES: this scan already matched 6 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. 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/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:1410— genesis/engine/sensors/point_cloud_tactile.py:1410-1414 | genesis/engine/sensors/point_cloud_tactile.py:1570-1574 — 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:1410` 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:844— genesis/engine/solvers/kinematic_solver.py:844-848 | genesis/engine/solvers/rigid/rigid_solver.py:1206-1210 — 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:844` 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/kinematic_solver.py:1147— genesis/engine/solvers/kinematic_solver.py:1147-1151 | genesis/engine/solvers/rigid/rigid_solver.py:2208-2217 — 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:1147` 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 (5 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:399— genesis/engine/solvers/rigid/abd/forward_dynamics.py:399-403 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:458-462 — 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:571— genesis/engine/solvers/rigid/abd/forward_dynamics.py:571-575 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:593-597 — 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:1033— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1033-1037 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1091-1095 — 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:1461— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1461-1465 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1530-1534 — 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:2189— genesis/engine/solvers/rigid/abd/forward_dynamics.py:2189-2193 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:2270-2274 — 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:427— genesis/engine/solvers/rigid/collider/box_contact.py:427-431 | genesis/engine/solvers/rigid/collider/box_contact.py:684-688 — 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.
Hotspot: genesis/engine/solvers/rigid/collider/narrowphase.py genesis/engine/solvers/rigid/collider/narrowphase.py:1931— genesis/engine/solvers/rigid/collider/narrowphase.py changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 133 in narrowphase.func_contact_overlap_axes at line 1931. 10 of those changes were fix/bug commits, and the other 15 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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:468— genesis/engine/solvers/rigid/rigid_solver.py changed 54 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in RigidSolver._build_static_config at line 468. 15 of those changes were fix/bug commits, and the other 39 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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:2764— genesis/engine/solvers/rigid/constraint/solver.py changed 39 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 2764. 11 of those changes were fix/bug commits, and the other 28 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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/collider.py genesis/engine/solvers/rigid/collider/collider.py:881— genesis/engine/solvers/rigid/collider/collider.py changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in Collider.get_contacts at line 881. 2 of those changes were fix/bug commits, and the other 22 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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: genesis/engine/solvers/rigid/collider/contact.py genesis/engine/solvers/rigid/collider/contact.py:1446— genesis/engine/solvers/rigid/collider/contact.py changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in contact.func_clamp_prune_contacts_coop at line 1446. 12 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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: REDACTED REDACTED:892— REDACTED changed 11 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, 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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/entities/rigid_entity/rigid_entity.py genesis/engine/entities/rigid_entity/rigid_entity.py:262— genesis/engine/entities/rigid_entity/rigid_entity.py changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in KinematicEntity.attach at line 262. 10 of those changes were fix/bug commits, and the other 14 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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/utils/array_class.py genesis/utils/array_class.py:1041— genesis/utils/array_class.py changed 43 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in array_class.get_constraint_state at line 1041. 13 of those changes were fix/bug commits, and the other 30 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02:00' --full-history --no-merges -- genesis/utils/array_class.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 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 62 in genesis.init at line 59. 4 of those changes were fix/bug commits, and the other 10 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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:456— genesis/utils/mesh.py changed 12 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 456. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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/abd/forward_dynamics.py genesis/engine/solvers/rigid/abd/forward_dynamics.py:856— genesis/engine/solvers/rigid/abd/forward_dynamics.py changed 19 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 856. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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/solvers/rigid/constraint/linesearch.py genesis/engine/solvers/rigid/constraint/linesearch.py:1191— genesis/engine/solvers/rigid/constraint/linesearch.py changed 10 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 1191. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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/constraint/island.py genesis/engine/solvers/rigid/constraint/island.py:514— genesis/engine/solvers/rigid/constraint/island.py changed 10 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 514. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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/engine/solvers/rigid/collider/mpr.py genesis/engine/solvers/rigid/collider/mpr.py:468— genesis/engine/solvers/rigid/collider/mpr.py changed 13 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 468. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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/collider/broadphase.py genesis/engine/solvers/rigid/collider/broadphase.py:78— genesis/engine/solvers/rigid/collider/broadphase.py changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in broadphase._func_broad_phase_sap at line 78. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02:00' --full-history --no-merges -- genesis/engine/solvers/rigid/collider/broadphase.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 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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/collider/box_contact.py genesis/engine/solvers/rigid/collider/box_contact.py:189— genesis/engine/solvers/rigid/collider/box_contact.py changed 4 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 189. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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/utils/misc.py genesis/utils/misc.py:907— genesis/utils/misc.py changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in misc.sanitize_index at line 907. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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/scene.py genesis/engine/scene.py:337— genesis/engine/scene.py changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in Scene.add_entity at line 337. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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: REDACTED REDACTED:287— REDACTED changed 11 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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/constraint/backward.py genesis/engine/solvers/rigid/constraint/backward.py:784— genesis/engine/solvers/rigid/constraint/backward.py changed 9 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 784. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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/solvers/kinematic_solver.py genesis/engine/solvers/kinematic_solver.py:229— genesis/engine/solvers/kinematic_solver.py changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in KinematicSolver.build at line 229. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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: genesis/vis/camera.py genesis/vis/camera.py:592— genesis/vis/camera.py changed 10 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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/solvers/rigid/abd/forward_kinematics.py genesis/engine/solvers/rigid/abd/forward_kinematics.py:322— genesis/engine/solvers/rigid/abd/forward_kinematics.py changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in forward_kinematics.func_forward_kinematics_link at line 322. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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/collider/epa.py genesis/engine/solvers/rigid/collider/epa.py:960— genesis/engine/solvers/rigid/collider/epa.py changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in epa.func_safe_epa at line 960. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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.
FileTooLong: constraint/solver.py genesis/engine/solvers/rigid/constraint/solver.py— FileTooLong — 4413 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3913 over it, 8.83× 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 — 3658 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3158 over it, 7.32× 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 — 3161 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2661 over it, 6.32× 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 — 2623 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2123 over it, 5.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: utils/array_class.py genesis/utils/array_class.py— FileTooLong — 2248 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1748 over it, 4.50× 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 — 1797 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1297 over it, 3.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: abd/forward_dynamics.py genesis/engine/solvers/rigid/abd/forward_dynamics.py— FileTooLong — 1783 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1283 over it, 3.57× 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 — 1571 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1071 over it, 3.14× 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 — 1568 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1068 over it, 3.14× 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 — 1353 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 853 over it, 2.71× 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 — 1314 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 814 over it, 2.63× 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 — 1262 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 762 over it, 2.52× 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 — 1183 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 683 over it, 2.37× 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 — 1177 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 677 over it, 2.35× 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 — 1136 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 636 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: abd/accessor.py genesis/engine/solvers/rigid/abd/accessor.py— FileTooLong — 1115 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 615 over it, 2.23× 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 — 1079 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 579 over it, 2.16× 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/mpm_solver.py genesis/engine/solvers/mpm_solver.py— FileTooLong — 1002 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 502 over it, 2.00× 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 — 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 — 980 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 480 over it, 1.96× 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 — 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: vis/rasterizer_context.py genesis/vis/rasterizer_context.py— FileTooLong — 960 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 460 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: abd/forward_kinematics.py genesis/engine/solvers/rigid/abd/forward_kinematics.py— FileTooLong — 956 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 456 over it, 1.91× 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:1143— genesis/engine/couplers/sap_coupler.py:1143-1148 | genesis/engine/couplers/sap_coupler.py:1162-1167 — 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) genesis/engine/entities/pbd_entity.py:89— genesis/engine/entities/pbd_entity.py:89-94 | genesis/engine/entities/sph_entity.py:187-192 — before extracting anything, compare `genesis/engine/entities/pbd_entity.py` and `genesis/engine/entities/sph_entity.py` as WHOLE FILES: this scan already matched 6 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. 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 (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:511— genesis/engine/solvers/fem_solver.py:511-516 | genesis/engine/solvers/fem_solver.py:518-523 — 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:511` 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/mpm_solver.py:896— genesis/engine/solvers/mpm_solver.py:896-901 | genesis/engine/solvers/pbd_solver.py:897-902 — 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:896` 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:609— genesis/engine/solvers/pbd_solver.py:609-614 | genesis/engine/solvers/pbd_solver.py:686-691 — 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:1273— genesis/engine/solvers/rigid/abd/accessor.py:1273-1278 | genesis/engine/solvers/rigid/abd/accessor.py:1344-1349 — 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:49— genesis/engine/solvers/rigid/abd/forward_dynamics.py:49-54 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:70-75 — 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:1040— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1040-1045 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1098-1103 — 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:1040` 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:1195— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1195-1200 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1226-1231 — 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:1195` 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:1656— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1656-1662 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:2198-2203 — 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:2180— genesis/engine/solvers/rigid/abd/forward_dynamics.py:2180-2187 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:2263-2268 — 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:2180` 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:261— genesis/engine/solvers/rigid/abd/manual_bw.py:261-266 | genesis/engine/solvers/rigid/abd/manual_bw.py:443-448 — 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:500— genesis/engine/solvers/rigid/abd/misc.py:500-505 | genesis/engine/solvers/rigid/abd/misc.py:542-547 — 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:459— genesis/engine/solvers/rigid/collider/box_contact.py:459-464 | genesis/engine/solvers/rigid/collider/box_contact.py:747-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. Read the line range as the matched WINDOW rather than a finished unit: at `genesis/engine/solvers/rigid/collider/box_contact.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.
Duplicated block (6 lines × 2) genesis/engine/solvers/rigid/collider/box_contact.py:631— genesis/engine/solvers/rigid/collider/box_contact.py:631-636 | genesis/engine/solvers/rigid/collider/box_contact.py:646-651 — 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:631` 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:690— genesis/engine/solvers/rigid/collider/box_contact.py:690-695 | genesis/engine/solvers/rigid/collider/box_contact.py:700-705 — 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:182-187 — 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:4029— genesis/engine/solvers/rigid/collider/narrowphase.py:4029-4034 | genesis/engine/solvers/rigid/collider/narrowphase.py:4575-4589 — 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:4575` 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:850— genesis/engine/solvers/rigid/constraint/backward.py:850-855 | genesis/engine/solvers/rigid/constraint/solver.py:1406-1411 — 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:693— genesis/engine/solvers/rigid/constraint/linesearch.py:693-698 | genesis/engine/solvers/rigid/constraint/linesearch.py:738-744 — 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:738` 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:1308— genesis/engine/solvers/rigid/constraint/linesearch.py:1308-1313 | genesis/engine/solvers/rigid/constraint/linesearch.py:1434-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/engine/solvers/rigid/constraint/linesearch.py:1308` 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:1440` calls `Vector` and `genesis/engine/solvers/rigid/constraint/linesearch.py:1314` 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:5016— genesis/engine/solvers/rigid/constraint/solver.py:5016-5021 | genesis/engine/solvers/rigid/constraint/solver.py:5129-5134 — 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:2057— genesis/engine/solvers/rigid/rigid_solver.py:2057-2062 | genesis/engine/solvers/rigid/rigid_solver.py:2183-2188 — 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:2057` 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/ext/isaacgym/terrain_utils.py:35— genesis/ext/isaacgym/terrain_utils.py:35-40 | REDACTED:214-219 — 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 `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 (7 lines × 2) genesis/engine/bvh.py:332— genesis/engine/bvh.py:332-338 | genesis/engine/bvh.py:348-354 — 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:332` 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:2955— genesis/engine/couplers/sap_coupler.py:2955-2961 | genesis/engine/couplers/sap_coupler.py:3604-3610 — 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:3161— genesis/engine/couplers/sap_coupler.py:3161-3167 | genesis/engine/couplers/sap_coupler.py:3171-3177 — 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:283— genesis/engine/sensors/point_cloud_tactile.py:283-289 | genesis/engine/sensors/surface_distance_probe.py:54-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.
Duplicated block (7 lines × 2) genesis/engine/sensors/point_cloud_tactile.py:306— genesis/engine/sensors/point_cloud_tactile.py:306-312 | genesis/engine/sensors/surface_distance_probe.py:104-110 — 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:426— genesis/engine/sensors/point_cloud_tactile.py:426-432 | genesis/engine/sensors/surface_distance_probe.py:221-227 — 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:1162— genesis/engine/solvers/fem_solver.py:1162-1168 | genesis/engine/solvers/fem_solver.py:1240-1246 — 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/kinematic_solver.py:1197— genesis/engine/solvers/kinematic_solver.py:1197-1203 | genesis/engine/solvers/rigid/rigid_solver.py:2454-2460 — 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:2453` calls `qd_to_torch` and `genesis/engine/solvers/kinematic_solver.py:1196` 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 (7 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:222— genesis/engine/solvers/rigid/abd/forward_dynamics.py:222-228 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1813-1819 — 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/abd/forward_dynamics.py:1809` calls `static`, `loop_config`, `ndrange` and `genesis/engine/solvers/rigid/abd/forward_dynamics.py:220` 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 (7 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:604— genesis/engine/solvers/rigid/abd/forward_dynamics.py:604-613 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:945-951 — 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:604` 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:754— genesis/engine/solvers/rigid/abd/forward_dynamics.py:754-760 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:830-836 — 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:754` 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/forward_dynamics.py:1411— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1411-1419 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1495-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 (7 lines × 2) genesis/engine/solvers/rigid/abd/inverse_kinematics.py:780— genesis/engine/solvers/rigid/abd/inverse_kinematics.py:780-786 | genesis/engine/solvers/rigid/abd/inverse_kinematics.py:800-806 — 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/collider.py:832— genesis/engine/solvers/rigid/collider/collider.py:832-838 | genesis/engine/solvers/rigid/constraint/solver.py:288-294 — 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 (7 lines × 2) genesis/engine/solvers/rigid/collider/mpr.py:592— genesis/engine/solvers/rigid/collider/mpr.py:592-598 | genesis/engine/solvers/rigid/collider/mpr.py:638-644 — 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:2494— genesis/engine/solvers/rigid/collider/narrowphase.py:2494-2504 | genesis/engine/solvers/rigid/collider/narrowphase.py:4016-4022 — 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:2494` 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:4718-4724 — 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:879— genesis/engine/solvers/rigid/constraint/linesearch.py:879-885 | genesis/engine/solvers/rigid/constraint/linesearch.py:1086-1092 — 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:1138— genesis/engine/solvers/rigid/constraint/linesearch.py:1138-1144 | genesis/engine/solvers/rigid/constraint/linesearch.py:1622-1628 — 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:3050— genesis/engine/solvers/rigid/constraint/solver.py:3050-3056 | genesis/engine/solvers/rigid/constraint/solver.py:3065-3071 — 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:2083— genesis/engine/solvers/rigid/rigid_solver.py:2083-2091 | genesis/engine/solvers/rigid/rigid_solver.py:2222-2228 — 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:488— genesis/engine/solvers/sph_solver.py:488-496 | genesis/engine/solvers/sph_solver.py:596-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. Read the line range as the matched WINDOW rather than a finished unit: at `genesis/engine/solvers/sph_solver.py:488` 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:928— genesis/vis/rasterizer_context.py:928-934 | genesis/vis/rasterizer_context.py:951-957 — 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:734— genesis/vis/raytracer.py:734-740 | genesis/vis/raytracer.py:753-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/vis/raytracer.py:734` 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.
Swallowed exception (empty catch) genesis/engine/sensors/base_sensor.py:63— 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/_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/viewer.py:662— 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:696— 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:700— 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:704— 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:708— 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:1221— 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:1225— 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:1307— 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/overlay/plugin.py:286— 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: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/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/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.
TooManyMethods: RigidSolver genesis/engine/solvers/rigid/rigid_solver.py:218— TooManyMethods — 126 methods. The bar is 30 methods; this is 96 over it, 4.20× 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:165— TooManyMethods — 113 methods. The bar is 30 methods; this is 83 over it, 3.77× 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:26— TooManyMethods — 76 methods. The bar is 30 methods; this is 46 over it, 2.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: RigidEntity genesis/engine/entities/rigid_entity/rigid_entity.py:1738— TooManyMethods — 75 methods. The bar is 30 methods; this is 45 over it, 2.50× 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:28— TooManyMethods — 67 methods. The bar is 30 methods; this is 37 over it, 2.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: RasterizerContext genesis/vis/rasterizer_context.py:97— TooManyMethods — 67 methods. The bar is 30 methods; this is 37 over it, 2.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: KinematicSolver genesis/engine/solvers/kinematic_solver.py:160— TooManyMethods — 63 methods. The bar is 30 methods; this is 33 over it, 2.10× 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 — 61 methods. The bar is 30 methods; this is 31 over it, 2.03× 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:142— TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× 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 — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× 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:70— TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× 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: ToolEntity genesis/engine/entities/tool_entity/tool_entity.py:22— TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× 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: FEMEntity genesis/engine/entities/fem_entity.py:121— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.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: MPMEntity genesis/engine/entities/mpm_entity.py:24— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× 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: ParticleEntity genesis/engine/entities/particle_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.
TooManyMethods: Simulator genesis/engine/simulator.py:42— TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× 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: ImGuiOverlayPlugin genesis/ext/pyrender/overlay/plugin.py:58— TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× 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 (10 lines × 2) genesis/engine/entities/fem_entity.py:249— genesis/engine/entities/fem_entity.py:249-258 | genesis/engine/entities/particle_entity.py:138-147 — 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.
Duplicated block (10 lines × 2) genesis/engine/solvers/kinematic_solver.py:1089— genesis/engine/solvers/kinematic_solver.py:1089-1098 | genesis/engine/solvers/kinematic_solver.py:1158-1167 — 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:1089` 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:1213— genesis/engine/solvers/kinematic_solver.py:1213-1222 | genesis/engine/solvers/rigid/rigid_solver.py:2476-2485 — 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 (10 lines × 2) genesis/engine/solvers/mpm_solver.py:786— genesis/engine/solvers/mpm_solver.py:786-795 | genesis/engine/solvers/mpm_solver.py:809-818 — 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/mpm_solver.py:786` 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/accessor.py:43— genesis/engine/solvers/rigid/abd/accessor.py:43-52 | genesis/engine/solvers/rigid/abd/accessor.py:109-118 — 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/collider/contact.py:1272— genesis/engine/solvers/rigid/collider/contact.py:1272-1281 | genesis/engine/solvers/rigid/collider/contact.py:1576-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.
Duplicated block (10 lines × 2) genesis/engine/solvers/rigid/constraint/linesearch.py:1310— genesis/engine/solvers/rigid/constraint/linesearch.py:1310-1319 | genesis/engine/solvers/rigid/constraint/linesearch.py:1600-1609 — 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:1310` 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:5221— genesis/engine/solvers/rigid/constraint/solver.py:5221-5230 | genesis/engine/solvers/rigid/constraint/solver.py:5515-5524 — 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:5221` 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:2759— genesis/engine/solvers/rigid/rigid_solver.py:2759-2768 | genesis/engine/solvers/rigid/rigid_solver.py:2780-2789 — 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/solvers/rigid/rigid_solver.py:2777` calls `qd_to_torch` and `genesis/engine/solvers/rigid/rigid_solver.py:2757` 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 × 2) genesis/engine/solvers/rigid/rigid_solver.py:3097— genesis/engine/solvers/rigid/rigid_solver.py:3097-3106 | genesis/engine/solvers/rigid/rigid_solver.py:3116-3125 — 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:381-392 — 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/vis/rasterizer_context.py:1022— genesis/vis/rasterizer_context.py:1022-1031 | genesis/vis/rasterizer_context.py:1047-1056 — 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 (10 lines × 2) genesis/engine/entities/fem_entity.py:676— genesis/engine/entities/fem_entity.py:676-691 | genesis/engine/entities/particle_entity.py:381-390 — 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 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 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (9 lines × 2) genesis/engine/couplers/legacy_coupler.py:885— genesis/engine/couplers/legacy_coupler.py:885-893 | genesis/engine/couplers/legacy_coupler.py:949-957 — 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/legacy_coupler.py:885` 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:578— genesis/engine/couplers/sap_coupler.py:578-586 | genesis/engine/solvers/fem_solver.py:74-82 — 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 (9 lines × 2) genesis/engine/couplers/sap_coupler.py:2169— genesis/engine/couplers/sap_coupler.py:2169-2177 | genesis/engine/couplers/sap_coupler.py:2214-2222 — 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:2178` calls `fill` and `genesis/engine/couplers/sap_coupler.py:2223` 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:1141— genesis/engine/entities/fem_entity.py:1141-1149 | genesis/engine/entities/particle_entity.py:737-745 — 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:992— genesis/engine/sensors/kinematic_tactile.py:992-1000 | genesis/engine/sensors/kinematic_tactile.py:1259-1267 — 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/abd/forward_dynamics.py:968— genesis/engine/solvers/rigid/abd/forward_dynamics.py:968-976 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:983-991 — 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:968` 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/collider/narrowphase.py:1150— genesis/engine/solvers/rigid/collider/narrowphase.py:1150-1158 | genesis/engine/solvers/rigid/collider/narrowphase.py:4029-4037 — 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:1229— genesis/engine/solvers/rigid/constraint/linesearch.py:1229-1237 | genesis/engine/solvers/rigid/constraint/linesearch.py:1583-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:1229` 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:197— genesis/engine/solvers/rigid/constraint/noslip.py:197-205 | genesis/engine/solvers/rigid/constraint/noslip.py:486-494 — 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:197` 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:2311— genesis/engine/solvers/rigid/constraint/solver.py:2311-2319 | genesis/engine/solvers/rigid/constraint/solver.py:2368-2376 — 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:2311` 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:2320` calls `static` and `genesis/engine/solvers/rigid/constraint/solver.py:2377` 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:2374— genesis/engine/solvers/rigid/constraint/solver.py:2374-2382 | genesis/engine/solvers/rigid/constraint/solver.py:2640-2648 — 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:258-266 — 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:253— genesis/vis/rasterizer_context.py:253-261 | genesis/vis/rasterizer_context.py:571-579 — 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:880— genesis/engine/entities/rigid_entity/rigid_entity.py:880-888 | 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) genesis/utils/array_class.py:1635— genesis/utils/array_class.py:1635-1643 | genesis/utils/array_class.py:1649-1657 — 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 (9 lines × 2) genesis/vis/rasterizer_context.py:726— genesis/vis/rasterizer_context.py:726-734 | genesis/vis/rasterizer_context.py:797-805 — 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/rasterizer_context.py:726` 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) 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 (8 lines × 2) genesis/engine/couplers/sap_coupler.py:805— genesis/engine/couplers/sap_coupler.py:805-812 | genesis/engine/couplers/sap_coupler.py:3458-3465 — 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:2557— genesis/engine/couplers/sap_coupler.py:2557-2564 | genesis/engine/couplers/sap_coupler.py:3256-3263 — 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:375— genesis/engine/sensors/point_cloud_tactile.py:375-382 | genesis/engine/sensors/surface_distance_probe.py:197-204 — 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:449— genesis/engine/sensors/point_cloud_tactile.py:449-456 | genesis/engine/sensors/surface_distance_probe.py:242-249 — 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:241` calls `max` and `genesis/engine/sensors/point_cloud_tactile.py:448` 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:245— genesis/engine/solvers/fem_solver.py:245-252 | 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:245` 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/mpm_solver.py:572— genesis/engine/solvers/mpm_solver.py:572-579 | genesis/engine/solvers/mpm_solver.py:583-590 — 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/mpm_solver.py:572` 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:306— genesis/engine/solvers/rigid/abd/forward_kinematics.py:306-313 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:1213-1220 — 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:469— genesis/engine/solvers/rigid/collider/box_contact.py:469-476 | genesis/engine/solvers/rigid/collider/box_contact.py:760-767 — 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:469` 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/narrowphase.py:160— genesis/engine/solvers/rigid/collider/narrowphase.py:160-167 | genesis/engine/solvers/rigid/collider/narrowphase.py:709-716 — 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:942— genesis/engine/solvers/rigid/collider/narrowphase.py:942-955 | genesis/engine/solvers/rigid/collider/narrowphase.py:960-967 — 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:942` 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/narrowphase.py:2579— genesis/engine/solvers/rigid/collider/narrowphase.py:2579-2588 | genesis/engine/solvers/rigid/collider/narrowphase.py:3294-3301 — 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/backward.py:837— genesis/engine/solvers/rigid/constraint/backward.py:837-844 | genesis/engine/solvers/rigid/constraint/solver.py:1396-1403 — 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:791— genesis/engine/solvers/rigid/constraint/linesearch.py:791-798 | genesis/engine/solvers/rigid/constraint/linesearch.py:920-927 — 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:133— genesis/engine/solvers/rigid/constraint/noslip.py:133-140 | genesis/engine/solvers/rigid/constraint/noslip.py:184-191 — 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:133` 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:796— genesis/options/solvers.py:796-803 | genesis/options/solvers.py:874-881 — 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/raytracer.py:285— genesis/vis/raytracer.py:285-292 | genesis/vis/raytracer.py:299-306 — 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:484— genesis/engine/solvers/rigid/collider/contact.py:484-491 | genesis/engine/solvers/rigid/collider/diff_gjk.py:321-328 — 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 lines × 2) genesis/engine/entities/fem_entity.py:234— genesis/engine/entities/fem_entity.py:234-245 | genesis/engine/entities/particle_entity.py:121-132 — 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.
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/kinematic_solver.py:1073— genesis/engine/solvers/kinematic_solver.py:1073-1084 | genesis/engine/solvers/rigid/rigid_solver.py:2070-2081 — 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) genesis/engine/solvers/rigid/collider/epa.py:242— genesis/engine/solvers/rigid/collider/epa.py:242-253 | genesis/engine/solvers/rigid/collider/epa.py:1261-1272 — 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:1377— genesis/engine/solvers/rigid/constraint/linesearch.py:1377-1388 | genesis/engine/solvers/rigid/constraint/linesearch.py:1508-1519 — 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/solver.py:2495— genesis/engine/solvers/rigid/constraint/solver.py:2495-2506 | genesis/engine/solvers/rigid/constraint/solver.py:2706-2717 — 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/geom.py:939— genesis/utils/geom.py:939-950 | genesis/utils/geom.py:1931-1942 — 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:939` 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:778-789 — 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:536— genesis/utils/path_planning.py:536-547 | genesis/utils/path_planning.py:919-930 — 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 (5 lines × 3) genesis/engine/couplers/sap_coupler.py:3025— genesis/engine/couplers/sap_coupler.py:3025-3029 | genesis/engine/couplers/sap_coupler.py:3049-3053 | genesis/engine/couplers/sap_coupler.py:3074-3078 — 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/entities/tool_entity/mesh.py:97— genesis/engine/entities/tool_entity/mesh.py:97-101 | genesis/engine/solvers/sf_solver.py:196-200 | genesis/engine/solvers/sf_solver.py:219-223 — 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/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:462— genesis/engine/solvers/rigid/abd/accessor.py:462-467 | genesis/engine/solvers/rigid/abd/accessor.py:507-511 | genesis/engine/solvers/rigid/abd/accessor.py:550-554 — 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:1656— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1656-1660 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1813-1817 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:2198-2202 — 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_kinematics.py:559— genesis/engine/solvers/rigid/abd/forward_kinematics.py:559-563 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:805-809 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:1192-1196 — 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_kinematics.py:1197` calls `func_forward_kinematics_link` and `genesis/engine/solvers/rigid/abd/forward_kinematics.py:564` 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 × 3) genesis/engine/solvers/rigid/collider/narrowphase.py:933— genesis/engine/solvers/rigid/collider/narrowphase.py:933-937 | genesis/engine/solvers/rigid/collider/narrowphase.py:954-958 | genesis/engine/solvers/rigid/collider/narrowphase.py:966-970 — 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:2499— genesis/engine/solvers/rigid/collider/narrowphase.py:2499-2504 | genesis/engine/solvers/rigid/collider/narrowphase.py:3213-3217 | genesis/engine/solvers/rigid/collider/narrowphase.py:4018-4022 — 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:2499` 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:584— genesis/engine/solvers/rigid/constraint/backward.py:584-588 | genesis/engine/solvers/rigid/constraint/backward.py:1318-1323 | genesis/engine/solvers/rigid/constraint/solver.py:995-1000 — 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:1259— genesis/engine/solvers/rigid/constraint/linesearch.py:1259-1263 | genesis/engine/solvers/rigid/constraint/linesearch.py:1383-1387 | genesis/engine/solvers/rigid/constraint/linesearch.py:1514-1518 — 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:360— genesis/utils/watertighten.py:360-364 | genesis/utils/watertighten.py:372-376 | genesis/utils/watertighten.py:384-388 — 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:685— genesis/vis/rasterizer_context.py:685-689 | genesis/vis/rasterizer_context.py:756-760 | genesis/vis/rasterizer_context.py:822-827 — 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:685` 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/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/rigid/abd/forward_kinematics.py:366— genesis/engine/solvers/rigid/abd/forward_kinematics.py:366-370 | genesis/engine/solvers/rigid/abd/inverse_kinematics.py:57-61 | genesis/engine/solvers/rigid/abd/manual_bw.py:42-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 all 3 call sites, so a change lands once.
Duplicated block (5 lines × 3) genesis/vis/rasterizer_context.py:595— genesis/vis/rasterizer_context.py:595-599 | genesis/vis/rasterizer_context.py:913-917 | genesis/vis/rasterizer_context.py:921-925 — 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 (13 lines × 2) genesis/engine/couplers/sap_coupler.py:2788— genesis/engine/couplers/sap_coupler.py:2788-2800 | genesis/engine/couplers/sap_coupler.py:3795-3807 — 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:2818— genesis/engine/couplers/sap_coupler.py:2818-2830 | genesis/engine/couplers/sap_coupler.py:3825-3837 — 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:1358— genesis/engine/sensors/point_cloud_tactile.py:1358-1370 | genesis/engine/sensors/point_cloud_tactile.py:1522-1534 — 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:1519` calls `template` and `genesis/engine/sensors/point_cloud_tactile.py:1355` 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 × 2) genesis/engine/solvers/kinematic_solver.py:1134— genesis/engine/solvers/kinematic_solver.py:1134-1146 | genesis/engine/solvers/rigid/rigid_solver.py:2195-2207 — 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 (13 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:1455— genesis/engine/solvers/rigid/collider/narrowphase.py:1455-1467 | genesis/engine/solvers/rigid/collider/narrowphase.py:4183-4195 — 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:2970— genesis/engine/solvers/rigid/constraint/solver.py:2970-2982 | genesis/engine/solvers/rigid/constraint/solver.py:2999-3011 — 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:3941— genesis/engine/solvers/rigid/constraint/solver.py:3941-3953 | genesis/engine/solvers/rigid/constraint/solver.py:4023-4035 — 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:11— examples/sap_coupling/fem_fixed_constraint.py:11-23 | 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:25` 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:2335— genesis/engine/couplers/sap_coupler.py:2335-2345 | genesis/engine/couplers/sap_coupler.py:3650-3660 — 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:438— genesis/engine/sensors/point_cloud_tactile.py:438-448 | genesis/engine/sensors/surface_distance_probe.py:229-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.
Duplicated block (11 lines × 2) genesis/engine/solvers/fem_solver.py:1081— genesis/engine/solvers/fem_solver.py:1081-1091 | genesis/engine/solvers/mpm_solver.py:802-812 — 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:1081` 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 × 2) genesis/engine/solvers/pbd_solver.py:653— genesis/engine/solvers/pbd_solver.py:653-663 | genesis/engine/solvers/pbd_solver.py:723-733 — 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:653` 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:1142— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1142-1152 | genesis/engine/solvers/rigid/constraint/noslip.py:22-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.
Duplicated block (11 lines × 2) genesis/engine/solvers/rigid/constraint/backward.py:1003— genesis/engine/solvers/rigid/constraint/backward.py:1003-1013 | genesis/engine/solvers/rigid/constraint/backward.py:1209-1219 — 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:1205` calls `Vector` and `genesis/engine/solvers/rigid/constraint/backward.py:1001` 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/ext/pyrender/overlay/plugin.py:1183— genesis/ext/pyrender/overlay/plugin.py:1183-1193 | genesis/ext/pyrender/overlay/plugin.py:1277-1287 — 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/engine/entities/fem_entity.py:628— genesis/engine/entities/fem_entity.py:628-641 | genesis/engine/entities/particle_entity.py:346-356 — 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) 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.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×9
Members sharing a duplicated core (4 members, 50+ identical tokens) genesis/engine/couplers/sap_coupler.py:2694— genesis/engine/couplers/sap_coupler.py:2694-2702 | genesis/engine/couplers/sap_coupler.py:2706-2714 | genesis/engine/couplers/sap_coupler.py:3024-3044 | genesis/engine/couplers/sap_coupler.py:3048-3068 — 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:3193— genesis/engine/couplers/sap_coupler.py:3193-3207 | genesis/engine/couplers/sap_coupler.py:3252-3277 | genesis/engine/couplers/sap_coupler.py:3407-3438 | genesis/engine/couplers/sap_coupler.py:3746-3777 — 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:326— genesis/engine/sensors/kinematic_tactile.py:326-431 | genesis/engine/sensors/kinematic_tactile.py:453-499 | genesis/engine/sensors/kinematic_tactile.py:722-787 | genesis/engine/sensors/kinematic_tactile.py:819-951 — 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:375— genesis/engine/sensors/point_cloud_tactile.py:375-566 | genesis/engine/sensors/point_cloud_tactile.py:1358-1489 | genesis/engine/sensors/point_cloud_tactile.py:1522-1662 | genesis/engine/sensors/surface_distance_probe.py:188-298 — 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/abd/accessor.py:219— genesis/engine/solvers/rigid/abd/accessor.py:219-231 | genesis/engine/solvers/rigid/abd/accessor.py:336-350 | genesis/engine/solvers/rigid/abd/accessor.py:363-375 | genesis/engine/solvers/rigid/abd/accessor.py:388-402 — 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:448— genesis/engine/solvers/rigid/collider/epa.py:448-574 | genesis/engine/solvers/rigid/collider/epa.py:593-718 | genesis/engine/solvers/rigid/collider/epa.py:725-803 | genesis/engine/solvers/rigid/collider/epa.py:1281-1323 — 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/narrowphase.py:4242— genesis/engine/solvers/rigid/collider/narrowphase.py:4242-4283 | genesis/engine/solvers/rigid/collider/narrowphase.py:4440-4481 | genesis/engine/solvers/rigid/collider/narrowphase.py:4497-4529 | genesis/engine/solvers/rigid/collider/narrowphase.py:4544-4680 — 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/rigid_solver.py:1786— genesis/engine/solvers/rigid/rigid_solver.py:1786-1923 | genesis/engine/solvers/rigid/rigid_solver.py:2009-2126 | genesis/engine/solvers/rigid/rigid_solver.py:2133-2260 | genesis/engine/solvers/rigid/rigid_solver.py:2446-2515 — 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:1033— genesis/utils/mesh.py:1033-1038 | genesis/utils/mesh.py:1054-1059 | genesis/utils/mesh.py:1075-1080 | genesis/utils/mesh.py:1141-1146 — 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 (14 lines × 2) genesis/engine/entities/mpm_entity.py:207— genesis/engine/entities/mpm_entity.py:207-220 | genesis/engine/entities/mpm_entity.py:225-238 — 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/collider/epa.py:66— genesis/engine/solvers/rigid/collider/epa.py:66-79 | genesis/engine/solvers/rigid/collider/epa.py:1000-1013 — 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/constraint/solver.py:2233— genesis/engine/solvers/rigid/constraint/solver.py:2233-2246 | genesis/engine/solvers/rigid/constraint/solver.py:2597-2612 — 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:2616` calls `static` and `genesis/engine/solvers/rigid/constraint/solver.py:2248` 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 lines × 2) genesis/engine/solvers/rigid/rigid_solver.py:2063— genesis/engine/solvers/rigid/rigid_solver.py:2063-2076 | genesis/engine/solvers/rigid/rigid_solver.py:2188-2201 — 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:2063` 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 after the matched lines, `genesis/engine/solvers/rigid/rigid_solver.py:2202` calls `_select_links_offset`, `qd_to_torch` and `genesis/engine/solvers/rigid/rigid_solver.py:2079` 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 lines × 2) genesis/ext/isaacgym/terrain_utils.py:15— genesis/ext/isaacgym/terrain_utils.py:15-28 | REDACTED:194-207 — 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:630— genesis/engine/solvers/fem_solver.py:630-643 | genesis/engine/solvers/fem_solver.py:683-696 — 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:44— examples/sap_coupling/fem_fixed_constraint.py:44-57 | 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:44` 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.
Low cohesion: RigidEntity (LCOM4 59) genesis/engine/entities/rigid_entity/rigid_entity.py:1738— RigidEntity's methods fall into 59 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 59 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 21) genesis/engine/solvers/fem_solver.py:26— FEMSolver's methods fall into 21 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 21 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 17) genesis/engine/solvers/kinematic_solver.py:160— KinematicSolver's methods fall into 17 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 17 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: ToolEntity (LCOM4 16) genesis/engine/entities/tool_entity/tool_entity.py:22— ToolEntity's methods fall into 16 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 16 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: ParticleEntity (LCOM4 9) genesis/engine/entities/particle_entity.py:34— ParticleEntity's methods fall into 9 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 9 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: FEMEntity (LCOM4 6) genesis/engine/entities/fem_entity.py:121— FEMEntity's methods fall into 6 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 6 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.
Low cohesion: KinematicEntity (LCOM4 4) genesis/engine/entities/rigid_entity/rigid_entity.py:70— KinematicEntity's methods fall into 4 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 4 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.
Duplicated block (6 lines × 3) genesis/engine/couplers/sap_coupler.py:2890— genesis/engine/couplers/sap_coupler.py:2890-2895 | genesis/engine/couplers/sap_coupler.py:3546-3551 | genesis/engine/couplers/sap_coupler.py:3894-3899 — 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:2898` calls `zero` and `genesis/engine/couplers/sap_coupler.py:3554` 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/abd/diff.py:62— genesis/engine/solvers/rigid/abd/diff.py:62-67 | genesis/engine/solvers/rigid/abd/diff.py:98-103 | genesis/engine/solvers/rigid/abd/diff.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/constraint/backward.py:587— genesis/engine/solvers/rigid/constraint/backward.py:587-592 | genesis/engine/solvers/rigid/constraint/backward.py:1047-1052 | genesis/engine/solvers/rigid/constraint/backward.py:1246-1251 — 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:893— genesis/utils/geom.py:893-898 | genesis/utils/geom.py:1004-1009 | genesis/utils/geom.py:1079-1085 — 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:100— genesis/utils/watertighten.py:100-105 | genesis/utils/watertighten.py:109-114 | genesis/utils/watertighten.py:118-123 — 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/fem_solver.py:1106— genesis/engine/solvers/fem_solver.py:1106-1111 | genesis/engine/solvers/pbd_solver.py:840-845 | genesis/engine/solvers/sph_solver.py:794-799 — 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. 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 (6 lines × 3) genesis/engine/solvers/rigid/collider/epa.py:230— genesis/engine/solvers/rigid/collider/epa.py:230-235 | genesis/engine/solvers/rigid/collider/epa.py:1169-1174 | genesis/engine/solvers/rigid/collider/epa.py:1225-1230 — 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 (20 lines × 2) genesis/engine/couplers/sap_coupler.py:2874— genesis/engine/couplers/sap_coupler.py:2874-2893 | genesis/engine/couplers/sap_coupler.py:3878-3897 — 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:2874` 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:1470— genesis/engine/sensors/point_cloud_tactile.py:1470-1489 | genesis/engine/sensors/point_cloud_tactile.py:1643-1662 — 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:1640` calls `abs` and `genesis/engine/sensors/point_cloud_tactile.py:1468` 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/engine/solvers/rigid/collider/contact.py:1153— genesis/engine/solvers/rigid/collider/contact.py:1153-1196 | genesis/engine/solvers/rigid/collider/contact.py:1453-1472 — 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:1149` calls `template` and `genesis/engine/solvers/rigid/collider/contact.py:1450` 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 (20 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:220— genesis/engine/solvers/rigid/collider/narrowphase.py:220-239 | genesis/engine/solvers/rigid/collider/narrowphase.py:318-337 — 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) genesis/utils/path_planning.py:387— genesis/utils/path_planning.py:387-406 | genesis/utils/path_planning.py:737-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 (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 (10–11 lines × 2) genesis/engine/solvers/rigid/collider/mpr.py:90— genesis/engine/solvers/rigid/collider/mpr.py:90-99 | genesis/engine/solvers/rigid/collider/utils.py:23-33 — 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:579— genesis/engine/solvers/rigid/constraint/backward.py:579-588 | genesis/engine/solvers/rigid/constraint/solver.py:990-1000 — 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:317— genesis/engine/solvers/rigid/constraint/island.py:317-327 | genesis/engine/solvers/rigid/constraint/island.py:541-550 — 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 × 2) genesis/engine/solvers/rigid/constraint/solver.py:5217— genesis/engine/solvers/rigid/constraint/solver.py:5217-5226 | genesis/engine/solvers/rigid/constraint/solver_breakdown.py:97-107 — 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/states/entities.py:39— genesis/engine/states/entities.py:39-48 | genesis/engine/states/entities.py:96-106 — 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 × 2) examples/coupling/cloth_on_rigid.py:55— examples/coupling/cloth_on_rigid.py:55-64 | examples/deformable/differentiable_push.py:42-52 — 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/cloth_on_rigid.py:55` 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 × 3) genesis/engine/couplers/sap_coupler.py:2899— genesis/engine/couplers/sap_coupler.py:2899-2906 | genesis/engine/couplers/sap_coupler.py:3554-3561 | genesis/engine/couplers/sap_coupler.py:3903-3910 — 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:2898` calls `zero` and `genesis/engine/couplers/sap_coupler.py:3552` 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:559— genesis/engine/solvers/fem_solver.py:559-566 | genesis/engine/solvers/fem_solver.py:573-580 | genesis/engine/solvers/fem_solver.py:613-620 — 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:519— genesis/engine/solvers/rigid/abd/forward_dynamics.py:519-526 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:724-731 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:879-886 — 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:887` calls `SharedArray` and `genesis/engine/solvers/rigid/abd/forward_dynamics.py:529` 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:523— genesis/engine/solvers/rigid/abd/forward_kinematics.py:523-530 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:755-763 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:976-983 — 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:519` calls `template` and `genesis/engine/solvers/rigid/abd/forward_kinematics.py:751` 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:2323— genesis/engine/solvers/rigid/constraint/solver.py:2323-2330 | genesis/engine/solvers/rigid/constraint/solver.py:2489-2496 | genesis/engine/solvers/rigid/constraint/solver.py:2643-2650 — 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:2320` calls `static` and `genesis/engine/solvers/rigid/constraint/solver.py:2642` 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:2499— genesis/engine/solvers/rigid/constraint/solver.py:2499-2506 | genesis/engine/solvers/rigid/constraint/solver.py:2577-2584 | genesis/engine/solvers/rigid/constraint/solver.py:2710-2717 — 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 (28 lines × 2) genesis/engine/couplers/sap_coupler.py:2894— genesis/engine/couplers/sap_coupler.py:2894-2921 | genesis/engine/couplers/sap_coupler.py:3898-3925 — 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:2894` 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:1179— genesis/engine/sensors/point_cloud_tactile.py:1179-1206 | genesis/engine/sensors/point_cloud_tactile.py:1616-1643 — 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:1612` calls `qd_inv_transform_by_trans_quat`, `static` and `genesis/engine/sensors/point_cloud_tactile.py:1177` 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/broadphase.py:178— genesis/engine/solvers/rigid/collider/broadphase.py:178-205 | genesis/engine/solvers/rigid/collider/broadphase.py:237-264 — 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 (28 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:2933— genesis/engine/solvers/rigid/collider/narrowphase.py:2933-2960 | genesis/engine/solvers/rigid/collider/narrowphase.py:3434-3461 — 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 (19 lines × 2) genesis/engine/solvers/rigid/collider/gjk.py:1646— genesis/engine/solvers/rigid/collider/gjk.py:1646-1664 | 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:1646` 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) genesis/utils/array_class.py:483— genesis/utils/array_class.py:483-501 | genesis/utils/array_class.py:533-551 — 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 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 (7–8 lines × 2) genesis/engine/couplers/sap_coupler.py:2828— genesis/engine/couplers/sap_coupler.py:2828-2834 | genesis/engine/couplers/sap_coupler.py:3486-3493 — 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:1204— genesis/engine/solvers/kinematic_solver.py:1204-1210 | genesis/engine/solvers/kinematic_solver.py:1259-1266 — 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:1259` 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/abd/forward_dynamics.py:196— genesis/engine/solvers/rigid/abd/forward_dynamics.py:196-203 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1790-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. ★ 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:204` calls `func_add_safe_backward` and `genesis/engine/solvers/rigid/abd/forward_dynamics.py:1797` 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 (7–8 lines × 2) genesis/engine/solvers/rigid/constraint/noslip.py:211— genesis/engine/solvers/rigid/constraint/noslip.py:211-218 | genesis/engine/solvers/rigid/constraint/noslip.py:226-232 — 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:211` 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:658— genesis/utils/geom.py:658-665 | genesis/utils/geom.py:688-694 — 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 × 3) genesis/engine/solvers/rigid/constraint/solver.py:1989— genesis/engine/solvers/rigid/constraint/solver.py:1989-1995 | genesis/engine/solvers/rigid/constraint/solver.py:5223-5229 | genesis/engine/solvers/rigid/constraint/solver.py:5517-5523 — 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:1989` 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:5008— genesis/engine/solvers/rigid/constraint/solver.py:5008-5014 | genesis/engine/solvers/rigid/constraint/solver.py:5076-5082 | genesis/engine/solvers/rigid/constraint/solver.py:5121-5127 — 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/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 (16 lines × 2) genesis/engine/solvers/rigid/collider/diff_gjk.py:450— genesis/engine/solvers/rigid/collider/diff_gjk.py:450-465 | genesis/engine/solvers/rigid/collider/epa.py:1080-1095 — 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:450` 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:141— genesis/engine/solvers/rigid/collider/epa.py:141-156 | genesis/engine/solvers/rigid/collider/epa.py:1083-1098 — 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:428— genesis/engine/solvers/rigid/collider/diff_gjk.py:428-442 | genesis/engine/solvers/rigid/collider/epa.py:1059-1073 — 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:3475— genesis/engine/solvers/rigid/collider/narrowphase.py:3475-3489 | genesis/engine/solvers/rigid/collider/narrowphase.py:3699-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. Read the line range as the matched WINDOW rather than a finished unit: at `genesis/engine/solvers/rigid/collider/narrowphase.py:3475` 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:1036— genesis/engine/solvers/rigid/constraint/backward.py:1036-1048 | genesis/engine/solvers/rigid/constraint/backward.py:1235-1247 | genesis/engine/solvers/rigid/constraint/solver.py:1798-1810 — 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:371— genesis/engine/couplers/legacy_coupler.py:371-382 | genesis/engine/couplers/legacy_coupler.py:392-404 — 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:418— genesis/engine/couplers/legacy_coupler.py:418-429 | genesis/engine/couplers/legacy_coupler.py:439-451 — 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:366— genesis/engine/solvers/pbd_solver.py:366-377 | genesis/engine/solvers/sph_solver.py:198-210 — 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:2503— genesis/engine/solvers/rigid/collider/narrowphase.py:2503-2515 | genesis/engine/solvers/rigid/collider/narrowphase.py:3216-3227 — 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:2503` 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–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/contact.py:1308— genesis/engine/solvers/rigid/collider/contact.py:1308-1320 | genesis/engine/solvers/rigid/collider/contact.py:1621-1631 — 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:1634` calls `qd_block_max` and `genesis/engine/solvers/rigid/collider/contact.py:1322` 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–13 lines × 2) genesis/engine/solvers/rigid/collider/diff_gjk.py:538— genesis/engine/solvers/rigid/collider/diff_gjk.py:538-548 | genesis/engine/solvers/rigid/collider/epa.py:1200-1212 — 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:126— genesis/engine/solvers/rigid/collider/epa.py:126-136 | genesis/engine/solvers/rigid/collider/epa.py:1067-1079 — 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:126` 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 (9 lines × 3) genesis/engine/couplers/sap_coupler.py:2878— genesis/engine/couplers/sap_coupler.py:2878-2886 | genesis/engine/couplers/sap_coupler.py:3344-3352 | genesis/engine/couplers/sap_coupler.py:3882-3890 — 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:450— genesis/engine/sensors/point_cloud_tactile.py:450-458 | genesis/engine/sensors/point_cloud_tactile.py:1441-1449 | genesis/engine/sensors/point_cloud_tactile.py:1599-1607 — 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) genesis/engine/entities/pbd_entity.py:242— genesis/engine/entities/pbd_entity.py:242-250 | genesis/engine/entities/pbd_entity.py:634-642 | genesis/engine/entities/pbd_entity.py:704-712 — 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) 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/ik_duck.py` and `examples/rigid/ik_franka.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (4–6 lines × 3) genesis/engine/entities/pbd_entity.py:234— genesis/engine/entities/pbd_entity.py:234-237 | genesis/engine/entities/pbd_entity.py:624-629 | genesis/engine/entities/pbd_entity.py:697-702 — 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 (4–6 lines × 3) genesis/engine/solvers/rigid/abd/accessor.py:995— genesis/engine/solvers/rigid/abd/accessor.py:995-998 | genesis/engine/solvers/rigid/abd/accessor.py:1013-1018 | genesis/engine/solvers/rigid/abd/accessor.py:1032-1037 — 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:1013` calls `ndrange` and `genesis/engine/solvers/rigid/abd/accessor.py:995` 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 (4–6 lines × 3) genesis/engine/solvers/rigid/constraint/solver.py:2337— genesis/engine/solvers/rigid/constraint/solver.py:2337-2340 | genesis/engine/solvers/rigid/constraint/solver.py:2396-2401 | genesis/engine/solvers/rigid/constraint/solver.py:2510-2515 — 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.
Duplicated block (4–6 lines × 3) genesis/engine/solvers/rigid/constraint/solver.py:3117— genesis/engine/solvers/rigid/constraint/solver.py:3117-3122 | genesis/engine/solvers/rigid/constraint/solver.py:3158-3161 | genesis/engine/solvers/rigid/constraint/solver.py:3241-3246 — 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.
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/engine/sensors/sensor_manager.py:123— `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:280— `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:601— `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.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (5 members, 50+ identical tokens) genesis/engine/solvers/rigid/abd/accessor.py:42— genesis/engine/solvers/rigid/abd/accessor.py:42-60 | genesis/engine/solvers/rigid/abd/accessor.py:74-92 | genesis/engine/solvers/rigid/abd/accessor.py:107-131 | genesis/engine/solvers/rigid/abd/accessor.py:147-175 | genesis/engine/solvers/rigid/abd/accessor.py:188-206 — 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/abd/forward_kinematics.py:543— genesis/engine/solvers/rigid/abd/forward_kinematics.py:543-566 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:775-810 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:1149-1235 | genesis/engine/solvers/rigid/abd/manual_bw.py:245-267 | genesis/engine/solvers/rigid/abd/manual_bw.py:432-449 — 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:454— genesis/engine/solvers/rigid/constraint/backward.py:454-642 | genesis/engine/solvers/rigid/constraint/backward.py:791-1478 | genesis/engine/solvers/rigid/constraint/solver.py:710-867 | genesis/engine/solvers/rigid/constraint/solver.py:924-1089 | genesis/engine/solvers/rigid/constraint/solver.py:1782-1834 — 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 (24 lines × 2) genesis/engine/solvers/rigid/collider/box_contact.py:522— genesis/engine/solvers/rigid/collider/box_contact.py:522-545 | genesis/engine/solvers/rigid/collider/box_contact.py:803-826 — 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:1248— genesis/engine/solvers/rigid/collider/collider.py:1248-1271 | genesis/engine/solvers/rigid/collider/collider.py:1298-1321 — 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 (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 (14–15 lines × 2) genesis/engine/sensors/kinematic_tactile.py:326— genesis/engine/sensors/kinematic_tactile.py:326-340 | genesis/engine/sensors/kinematic_tactile.py:819-832 — 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/kinematic_tactile.py:817` calls `template` and `genesis/engine/sensors/kinematic_tactile.py:324` 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/engine/solvers/rigid/collider/narrowphase.py:2977— genesis/engine/solvers/rigid/collider/narrowphase.py:2977-2990 | genesis/engine/solvers/rigid/collider/narrowphase.py:3574-3588 — 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/utils/geom.py:884— genesis/utils/geom.py:884-898 | genesis/utils/geom.py:996-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.
Duplicated block (10–13 lines × 2) genesis/engine/solvers/kinematic_solver.py:1124— genesis/engine/solvers/kinematic_solver.py:1124-1133 | genesis/engine/solvers/rigid/rigid_solver.py:2133-2145 — 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 (10–13 lines × 2) genesis/engine/solvers/rigid/constraint/backward.py:673— genesis/engine/solvers/rigid/constraint/backward.py:673-682 | genesis/engine/solvers/rigid/constraint/solver.py:2071-2083 — 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 (11–12 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:2566— genesis/engine/solvers/rigid/collider/narrowphase.py:2566-2577 | genesis/engine/solvers/rigid/collider/narrowphase.py:3282-3292 — 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–12 lines × 2) genesis/utils/array_class.py:1863— genesis/utils/array_class.py:1863-1874 | genesis/utils/array_class.py:1913-1923 — 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/array_class.py:1863` 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 (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 (10 lines × 3) genesis/engine/couplers/sap_coupler.py:2282— genesis/engine/couplers/sap_coupler.py:2282-2291 | genesis/engine/couplers/sap_coupler.py:2383-2392 | genesis/engine/couplers/sap_coupler.py:2399-2408 — 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/rigid_solver.py:2042— genesis/engine/solvers/rigid/rigid_solver.py:2042-2051 | genesis/engine/solvers/rigid/rigid_solver.py:2168-2177 | genesis/engine/solvers/rigid/rigid_solver.py:2461-2470 — 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) 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–10 lines × 2) genesis/engine/sensors/kinematic_tactile.py:604— genesis/engine/sensors/kinematic_tactile.py:604-612 | genesis/engine/sensors/kinematic_tactile.py:683-692 — 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:446— genesis/engine/solvers/rigid/collider/box_contact.py:446-454 | genesis/engine/solvers/rigid/collider/box_contact.py:717-726 — 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:707-715 — 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 × 4) genesis/engine/solvers/pbd_solver.py:564— genesis/engine/solvers/pbd_solver.py:564-568 | genesis/engine/solvers/pbd_solver.py:609-613 | genesis/engine/solvers/pbd_solver.py:631-635 | genesis/engine/solvers/pbd_solver.py:686-690 — 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/rigid/constraint/backward.py:587— genesis/engine/solvers/rigid/constraint/backward.py:587-591 | genesis/engine/solvers/rigid/constraint/backward.py:1047-1051 | genesis/engine/solvers/rigid/constraint/backward.py:1246-1250 | genesis/engine/solvers/rigid/constraint/solver.py:790-794 — 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 (5 lines × 4) genesis/utils/mesh.py:1034— genesis/utils/mesh.py:1034-1038 | genesis/utils/mesh.py:1055-1059 | genesis/utils/mesh.py:1076-1080 | genesis/utils/mesh.py:1142-1146 — 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.
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/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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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.
Repeated repair: genesis/engine/entities/fem_entity.py genesis/engine/entities/fem_entity.py:260— genesis/engine/entities/fem_entity.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 11 (its worst body is FEMEntity.set_position at line 260), 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] Support envs_idx mask in FEM vertex constraints. (#3241)”; “[BUG FIX] Support FEM vertex constraints and topology queries in multi-entity scenes. (#3239)”; “[MISC] Fix support of FEM entities in Nyx plugin. (#3131)”. 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 15:52:48 +02:00' --until='2026-10-20 15:52:48 +02: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.
Change-coupling hub: rigid_solver.py → REDACTED, pbd_solver.py, broadphase.py, diff_gjk.py, sph_solver.py genesis/engine/solvers/rigid/rigid_solver.py— `genesis/engine/solvers/rigid/rigid_solver.py` changes together with 5 other files — `REDACTED`, `genesis/engine/solvers/pbd_solver.py`, `genesis/engine/solvers/rigid/collider/broadphase.py`, `genesis/engine/solvers/rigid/collider/diff_gjk.py`, `genesis/engine/solvers/sph_solver.py` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 5.
Change-coupling hub: mpm_solver.py → legacy_coupler.py, pbd_solver.py, sph_solver.py genesis/engine/solvers/mpm_solver.py— `genesis/engine/solvers/mpm_solver.py` changes together with 3 other files — `genesis/engine/couplers/legacy_coupler.py`, `genesis/engine/solvers/pbd_solver.py`, `genesis/engine/solvers/sph_solver.py` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
Duplicated block (29 lines × 2) genesis/engine/sensors/kinematic_tactile.py:341— genesis/engine/sensors/kinematic_tactile.py:341-369 | genesis/engine/sensors/kinematic_tactile.py:833-861 — 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:341` 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 lines × 2) genesis/engine/entities/particle_entity.py:150— genesis/engine/entities/particle_entity.py:150-174 | 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 (25 lines × 2) genesis/utils/path_planning.py:439— genesis/utils/path_planning.py:439-463 | genesis/utils/path_planning.py:805-829 — 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:1048— genesis/engine/sensors/kinematic_tactile.py:1048-1069 | genesis/engine/sensors/kinematic_tactile.py:1330-1351 — 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:1048` 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) 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–22 lines × 2) genesis/engine/solvers/kinematic_solver.py:1425— genesis/engine/solvers/kinematic_solver.py:1425-1446 | genesis/engine/solvers/rigid/rigid_solver.py:2927-2947 — 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:1425` 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 (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 (19–20 lines × 3) genesis/engine/couplers/sap_coupler.py:2915— genesis/engine/couplers/sap_coupler.py:2915-2934 | genesis/engine/couplers/sap_coupler.py:3563-3581 | genesis/engine/couplers/sap_coupler.py:3919-3938 — 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:410— genesis/engine/sensors/kinematic_tactile.py:410-429 | genesis/engine/sensors/kinematic_tactile.py:908-926 | genesis/engine/sensors/kinematic_tactile.py:933-951 — 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:929` calls `static` and `genesis/engine/sensors/kinematic_tactile.py:430` 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 × 2) genesis/engine/sensors/point_cloud_tactile.py:1158— genesis/engine/sensors/point_cloud_tactile.py:1158-1177 | genesis/engine/sensors/point_cloud_tactile.py:1224-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. The matched lines also transfer control out of the body holding them, 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:1156` calls `template` and `genesis/engine/sensors/point_cloud_tactile.py:1222` 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:505— genesis/engine/solvers/rigid/collider/epa.py:505-524 | genesis/engine/solvers/rigid/collider/epa.py:635-653 — 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:476— genesis/utils/path_planning.py:476-493 | genesis/utils/path_planning.py:844-861 — 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:246— genesis/utils/particle.py:246-262 | genesis/utils/particle.py:270-286 — 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:451— genesis/engine/solvers/rigid/collider/diff_gjk.py:451-466 | genesis/engine/solvers/rigid/collider/epa.py:141-154 | genesis/engine/solvers/rigid/collider/epa.py:1081-1096 — 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:451` 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 (13–14 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:521— genesis/engine/solvers/rigid/abd/forward_dynamics.py:521-534 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:726-738 — 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:1018— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1018-1031 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1077-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. Read the line range as the matched WINDOW rather than a finished unit: at `genesis/engine/solvers/rigid/abd/forward_dynamics.py:1018` 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–13 lines × 3) genesis/engine/solvers/rigid/collider/broadphase.py:199— genesis/engine/solvers/rigid/collider/broadphase.py:199-210 | genesis/engine/solvers/rigid/collider/broadphase.py:258-269 | genesis/engine/solvers/rigid/collider/broadphase.py:295-307 — 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/broadphase.py:199` 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 (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 (12 lines × 4) genesis/engine/solvers/rigid/collider/epa.py:484— genesis/engine/solvers/rigid/collider/epa.py:484-495 | genesis/engine/solvers/rigid/collider/epa.py:617-628 | genesis/engine/solvers/rigid/collider/epa.py:737-748 | 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 (12 lines × 4) genesis/engine/solvers/rigid/collider/epa.py:533— genesis/engine/solvers/rigid/collider/epa.py:533-544 | genesis/engine/solvers/rigid/collider/epa.py:685-696 | genesis/engine/solvers/rigid/collider/epa.py:753-764 | genesis/engine/solvers/rigid/collider/epa.py:1302-1313 — 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:1161— genesis/utils/geom.py:1161-1170 | genesis/utils/geom.py:1202-1213 — 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:209— genesis/utils/geom.py:209-214 | genesis/utils/geom.py:239-244 | genesis/utils/geom.py:1018-1019 — 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 (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 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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_contact_overlap_axes (cyclomatic 133) genesis/engine/solvers/rigid/collider/narrowphase.py:1931— narrowphase.func_contact_overlap_axes has cyclomatic complexity 133 (threshold 15). To reduce it, separate the cases: extract each independent 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:189— 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.
narrowphase.func_add_polytope_vertex_contacts_sdf (cyclomatic 92) genesis/engine/solvers/rigid/collider/narrowphase.py:70— narrowphase.func_add_polytope_vertex_contacts_sdf has cyclomatic complexity 92 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
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:1191— 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:597— 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:2764— 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:456— 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.
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.
narrowphase.func_convex_convex_contact (cyclomatic 64) genesis/engine/solvers/rigid/collider/narrowphase.py:2475— narrowphase.func_convex_convex_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.
genesis.init (cyclomatic 62) genesis/__init__.py:59— genesis.init has cyclomatic complexity 62 (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.
Collider.get_contacts (cyclomatic 60) genesis/engine/solvers/rigid/collider/collider.py:881— 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.
contact.func_clamp_prune_contacts_coop (cyclomatic 59) genesis/engine/solvers/rigid/collider/contact.py:1446— contact.func_clamp_prune_contacts_coop 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.
narrowphase.func_recompute_perturbed_contact (cyclomatic 59) genesis/engine/solvers/rigid/collider/narrowphase.py:1543— 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:468— 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.
broadphase._func_broad_phase_sap (cyclomatic 58) genesis/engine/solvers/rigid/collider/broadphase.py:78— broadphase._func_broad_phase_sap 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.
island.func_build_islands_coop (cyclomatic 58) genesis/engine/solvers/rigid/constraint/island.py:514— 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.
urdf.parse_urdf (cyclomatic 58) REDACTED:135— urdf.parse_urdf 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.
backward.kernel_manual_add_equality_constraints_bw (cyclomatic 54) genesis/engine/solvers/rigid/constraint/backward.py:784— 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 52) genesis/engine/solvers/rigid/abd/inverse_kinematics.py:363— inverse_kinematics.func_inverse_kinematics has cyclomatic complexity 52 (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_multicontact_detect (cyclomatic 51) genesis/engine/solvers/rigid/collider/narrowphase.py:3163— narrowphase._func_multicontact_detect has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent 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_multicontact (cyclomatic 47) genesis/engine/solvers/rigid/collider/narrowphase.py:3734— narrowphase.func_narrowphase_multicontact 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:243— 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:301— 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.
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.
ImGuiOverlayPlugin._render_entity_browser (cyclomatic 44) genesis/ext/pyrender/overlay/plugin.py:1059— 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:262— 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:916— 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.
contact.func_contact_support_hull (cyclomatic 42) genesis/engine/solvers/rigid/collider/contact.py:953— contact.func_contact_support_hull 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.
mpr.func_mpr_contact_from_centers (cyclomatic 42) genesis/engine/solvers/rigid/collider/mpr.py:468— 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.
solver.func_hessian_direct_batch (cyclomatic 42) genesis/engine/solvers/rigid/constraint/solver.py:2589— solver.func_hessian_direct_batch 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.
contact.func_clamp_prune_contacts (cyclomatic 41) genesis/engine/solvers/rigid/collider/contact.py:1144— contact.func_clamp_prune_contacts has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
forward_dynamics.func_factor_mass_tree_shared (cyclomatic 40) genesis/engine/solvers/rigid/abd/forward_dynamics.py:856— 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:867— 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:351— 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:960— 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.
narrowphase.func_narrowphase_contact0 (cyclomatic 39) genesis/engine/solvers/rigid/collider/narrowphase.py:3959— narrowphase.func_narrowphase_contact0 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.
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:456— 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_integrate (cyclomatic 37) genesis/engine/solvers/rigid/abd/forward_dynamics.py:2163— forward_dynamics.func_integrate 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:295— 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.
RigidSolver.set_base_links_quat (cyclomatic 37) genesis/engine/solvers/rigid/rigid_solver.py:2132— RigidSolver.set_base_links_quat 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:396— 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:1538— 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.
Raytracer.build (cyclomatic 36) genesis/vis/raytracer.py:213— Raytracer.build 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.
narrowphase.func_contact_mpr_terrain (cyclomatic 35) genesis/engine/solvers/rigid/collider/narrowphase.py:1274— narrowphase.func_contact_mpr_terrain 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.
island.func_reorder_island_dofs (cyclomatic 35) genesis/engine/solvers/rigid/constraint/island.py:797— 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.
solver._add_friction_constraint (cyclomatic 34) genesis/engine/solvers/rigid/constraint/solver.py:699— 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.
solver.func_island_hessian_assemble_block (cyclomatic 34) genesis/engine/solvers/rigid/constraint/solver.py:3084— solver.func_island_hessian_assemble_block 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.
RigidSolver.set_base_links_pos (cyclomatic 34) genesis/engine/solvers/rigid/rigid_solver.py:2008— RigidSolver.set_base_links_pos 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:1057— 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.
multi_contact.func_clip_polygon (cyclomatic 33) genesis/engine/solvers/rigid/collider/multi_contact.py:891— 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.
solver.func_solve_init (cyclomatic 33) genesis/engine/solvers/rigid/constraint/solver.py:5565— solver.func_solve_init 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.
RigidSolver._jacobi_mass_spread_bound (cyclomatic 32) genesis/engine/solvers/rigid/rigid_solver.py:783— 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:510— 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:9— 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:148— 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:2263— 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.
forward_dynamics.func_midpoint_free_body (cyclomatic 30) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1949— forward_dynamics.func_midpoint_free_body 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:383— 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:1153— 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.
misc.indices_to_mask (cyclomatic 30) genesis/utils/misc.py:605— 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.
KinematicEntity._get_global_idx (cyclomatic 29) genesis/engine/entities/rigid_entity/rigid_entity.py:568— KinematicEntity._get_global_idx 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.
noslip.func_noslip_update_row (cyclomatic 29) genesis/engine/solvers/rigid/constraint/noslip.py:239— noslip.func_noslip_update_row 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.
Raytracer.update_scene (cyclomatic 29) genesis/vis/raytracer.py:675— Raytracer.update_scene 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:429— 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:1143— 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.
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:337— 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:1493— 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.
multi_contact.func_potential_box_normals (cyclomatic 27) genesis/engine/solvers/rigid/collider/multi_contact.py:285— 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:907— 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:749— 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.
KinematicEntity.inverse_kinematics_multilink (cyclomatic 26) genesis/engine/entities/rigid_entity/rigid_entity.py:1553— 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:498— 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.
diff_gjk.func_extended_epa (cyclomatic 26) genesis/engine/solvers/rigid/collider/diff_gjk.py:345— 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:30— 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:311— 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:1335— 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.
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:1506— 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:895— 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.
KinematicSolver.build (cyclomatic 24) genesis/engine/solvers/kinematic_solver.py:229— 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.
KinematicSolver.set_dofs_velocity (cyclomatic 24) genesis/engine/solvers/kinematic_solver.py:1240— KinematicSolver.set_dofs_velocity 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:578— 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:1838— 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.
LegacyCoupler.mpm_grid_op (cyclomatic 23) genesis/engine/couplers/legacy_coupler.py:315— LegacyCoupler.mpm_grid_op 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.
SAPCoupler.build (cyclomatic 23) genesis/engine/couplers/sap_coupler.py:244— 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:705— 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.
forward_kinematics.func_sweep_links_by_level (cyclomatic 23) genesis/engine/solvers/rigid/abd/forward_kinematics.py:990— forward_kinematics.func_sweep_links_by_level 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.
narrowphase._func_multicontact_run_detection (cyclomatic 23) genesis/engine/solvers/rigid/collider/narrowphase.py:3015— narrowphase._func_multicontact_run_detection 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.
narrowphase.func_narrow_phase_nonconvex_vs_nonterrain (cyclomatic 23) genesis/engine/solvers/rigid/collider/narrowphase.py:4533— narrowphase.func_narrow_phase_nonconvex_vs_nonterrain 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.
RigidSolver.set_state (cyclomatic 23) genesis/engine/solvers/rigid/rigid_solver.py:1785— RigidSolver.set_state 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.
array_class.get_constraint_state (cyclomatic 23) genesis/utils/array_class.py:1041— array_class.get_constraint_state has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
misc.broadcast_tensor (cyclomatic 23) genesis/utils/misc.py:996— 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.
RRT.plan (cyclomatic 23) genesis/utils/path_planning.py:512— 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.
terrain.parse_terrain (cyclomatic 23) REDACTED:18— terrain.parse_terrain 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.fem_surface_force (cyclomatic 22) genesis/engine/couplers/legacy_coupler.py:494— LegacyCoupler.fem_surface_force 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.
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:762— 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.
RigidSolver._set_dofs_info (cyclomatic 22) genesis/engine/solvers/rigid/rigid_solver.py:2593— 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.
MPMSolver.p2g (cyclomatic 21) genesis/engine/solvers/mpm_solver.py:354— 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:322— 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.
forward_kinematics.func_update_cartesian_space (cyclomatic 21) genesis/engine/solvers/rigid/abd/forward_kinematics.py:1141— forward_kinematics.func_update_cartesian_space 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.
contact.func_collider_clear_env (cyclomatic 21) genesis/engine/solvers/rigid/collider/contact.py:184— contact.func_collider_clear_env 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:423— 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.
ImGuiOverlayPlugin._render_file_browser (cyclomatic 21) genesis/ext/pyrender/overlay/plugin.py:786— 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:245— 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:249— 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.
RasterizerContext.update_rigid (cyclomatic 21) genesis/vis/rasterizer_context.py:537— RasterizerContext.update_rigid 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:269— 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.
Simulator.build (cyclomatic 20) genesis/engine/simulator.py:158— Simulator.build 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:1393— 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:446— 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:164— 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:638— 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:1164— 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:4224— 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.
RigidSolver.set_qpos (cyclomatic 20) genesis/engine/solvers/rigid/rigid_solver.py:2445— RigidSolver.set_qpos 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.
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.
Options._validation_error (cyclomatic 20) genesis/options/options.py:43— 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:1034— 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.
serialization._export_value (cyclomatic 20) REDACTED:362— 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._resolve_sensor_cls (cyclomatic 19) genesis/engine/sensors/sensor_manager.py:82— SensorManager._resolve_sensor_cls 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.
SensorManager.build (cyclomatic 19) genesis/engine/sensors/sensor_manager.py:133— 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:1331— 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:300— 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:819— 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:4068— 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.
ImGuiOverlayPlugin._render_sim_controls (cyclomatic 19) genesis/ext/pyrender/overlay/plugin.py:504— 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:799— 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.
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:2843— 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:3850— 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.
KinematicEntity.process_input_grad (cyclomatic 18) genesis/engine/entities/rigid_entity/rigid_entity.py:497— KinematicEntity.process_input_grad 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.
surface_distance_probe._kernel_surface_distance_probe_bvh (cyclomatic 18) genesis/engine/sensors/surface_distance_probe.py:171— 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.
forward_dynamics.kernel_refresh_invweight_and_meaninertia (cyclomatic 18) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1469— 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.
broadphase.func_check_collision_valid (cyclomatic 18) genesis/engine/solvers/rigid/collider/broadphase.py:18— broadphase.func_check_collision_valid 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.
epa.func_epa_init_polytope_2d (cyclomatic 18) genesis/engine/solvers/rigid/collider/epa.py:432— 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:1562— 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_cone_rank_update_island (cyclomatic 18) genesis/engine/solvers/rigid/constraint/solver.py:3893— 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:5047— 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.
Viewer.on_close (cyclomatic 18) genesis/ext/pyrender/viewer.py:645— 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.
array_class.iter_data (cyclomatic 18) genesis/utils/array_class.py:211— array_class.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.
FrameImageExporter.export_frame_single_camera (cyclomatic 18) genesis/utils/image_exporter.py:137— FrameImageExporter.export_frame_single_camera 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:726— 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:593— 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:576— 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:2579— 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:3501— 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:190— 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:696— 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:204— 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_apply_staged_rank_updates_island (cyclomatic 17) genesis/engine/solvers/rigid/constraint/solver.py:3717— solver.func_apply_staged_rank_updates_island 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_cone_rank_update_whole_env (cyclomatic 17) genesis/engine/solvers/rigid/constraint/solver.py:3989— 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__ (cyclomatic 17) genesis/engine/solvers/rigid/rigid_solver.py:228— RigidSolver.__init__ has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
_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:728— 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:1149— 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.
serialization.load (cyclomatic 17) REDACTED:596— 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:3280— 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:235— 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.
FEMSolver.accumulate_vertex_force_preconditioner (cyclomatic 16) genesis/engine/solvers/fem_solver.py:648— FEMSolver.accumulate_vertex_force_preconditioner 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_init_link_invweight (cyclomatic 16) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1262— 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:2360— 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:587— 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:193— 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.
mpr.mpr_find_pos (cyclomatic 16) genesis/engine/solvers/rigid/collider/mpr.py:285— 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:1135— 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.
backward.kernel_compute_gradients (cyclomatic 16) genesis/engine/solvers/rigid/constraint/backward.py:160— backward.kernel_compute_gradients 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_add_relative_motion_rows (cyclomatic 16) genesis/engine/solvers/rigid/constraint/solver.py:1767— 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:3499— 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.
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:217— 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.
HackComment REDACTED:60— # 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.
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.
narrowphase.func_contact_overlap_axes (cognitive 558) genesis/engine/solvers/rigid/collider/narrowphase.py:1931— narrowphase.func_contact_overlap_axes has cognitive complexity 558 (threshold 15). Drivers by points: if/else 63 (276 pts), loops 44 (220 pts), ternaries 12 (44 pts), boolean chains 18 (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.
narrowphase.func_add_polytope_vertex_contacts_sdf (cognitive 406) genesis/engine/solvers/rigid/collider/narrowphase.py:70— narrowphase.func_add_polytope_vertex_contacts_sdf has cognitive complexity 406 (threshold 15). Drivers by points: if/else 60 (294 pts), loops 20 (97 pts), boolean chains 14, ternaries 1 (nesting depth added 311). 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:189— 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.
broadphase._func_broad_phase_sap (cognitive 284) genesis/engine/solvers/rigid/collider/broadphase.py:78— broadphase._func_broad_phase_sap has cognitive complexity 284 (threshold 15). Drivers by points: if/else 38 (188 pts), loops 19 (86 pts), ternaries 2 (7 pts), boolean chains 3 (nesting depth added 222). 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:1191— 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:597— 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:784— 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.
contact.func_clamp_prune_contacts_coop (cognitive 249) genesis/engine/solvers/rigid/collider/contact.py:1446— contact.func_clamp_prune_contacts_coop has cognitive complexity 249 (threshold 15). Drivers by points: if/else 29 (153 pts), loops 20 (88 pts), boolean chains 8 (nesting depth added 192). 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_convex_convex_contact (cognitive 245) genesis/engine/solvers/rigid/collider/narrowphase.py:2475— narrowphase.func_convex_convex_contact has cognitive complexity 245 (threshold 15). Drivers by points: if/else 40 (188 pts), loops 6 (35 pts), boolean chains 15, ternaries 2 (7 pts) (nesting depth added 182). 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_inverse_kinematics (cognitive 213) genesis/engine/solvers/rigid/abd/inverse_kinematics.py:363— inverse_kinematics.func_inverse_kinematics has cognitive complexity 213 (threshold 15). Drivers by points: loops 28 (119 pts), if/else 16 (68 pts), ternaries 3 (20 pts), boolean chains 6 (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.
solver.func_island_assemble_factor_solve_tiled (cognitive 213) genesis/engine/solvers/rigid/constraint/solver.py:2764— 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.
narrowphase.func_narrowphase_multicontact (cognitive 210) genesis/engine/solvers/rigid/collider/narrowphase.py:3734— narrowphase.func_narrowphase_multicontact has cognitive complexity 210 (threshold 15). Drivers by points: if/else 28 (133 pts), loops 10 (59 pts), ternaries 2 (10 pts), boolean chains 8 (nesting depth added 162). 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 206) genesis/engine/solvers/rigid/collider/contact.py:1144— contact.func_clamp_prune_contacts has cognitive complexity 206 (threshold 15). Drivers by points: if/else 20 (122 pts), loops 15 (80 pts), boolean chains 4 (nesting depth added 167). 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_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.
forward_dynamics.func_factor_mass_tree_shared (cognitive 193) genesis/engine/solvers/rigid/abd/forward_dynamics.py:856— 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_recompute_perturbed_contact (cognitive 185) genesis/engine/solvers/rigid/collider/narrowphase.py:1543— 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.
narrowphase.func_contact_mpr_terrain (cognitive 183) genesis/engine/solvers/rigid/collider/narrowphase.py:1274— narrowphase.func_contact_mpr_terrain has cognitive complexity 183 (threshold 15). Drivers by points: if/else 17 (116 pts), loops 8 (41 pts), ternaries 3 (19 pts), boolean chains 7 (nesting depth added 148). 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:916— 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.
Collider.get_contacts (cognitive 151) genesis/engine/solvers/rigid/collider/collider.py:881— 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.
narrowphase._func_multicontact_detect (cognitive 147) genesis/engine/solvers/rigid/collider/narrowphase.py:3163— narrowphase._func_multicontact_detect has cognitive complexity 147 (threshold 15). Drivers by points: if/else 33 (104 pts), loops 6 (25 pts), boolean chains 10, ternaries 2 (8 pts) (nesting depth added 96). 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:351— 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:514— 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:1059— 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:456— 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.
solver.func_hessian_direct_batch (cognitive 128) genesis/engine/solvers/rigid/constraint/solver.py:2589— solver.func_hessian_direct_batch has cognitive complexity 128 (threshold 15). Drivers by points: if/else 21 (69 pts), loops 18 (55 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 86). 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.
urdf.parse_urdf (cognitive 127) REDACTED:135— urdf.parse_urdf has cognitive complexity 127 (threshold 15). Drivers by points: if/else 32 (79 pts), ternaries 7 (24 pts), loops 9 (16 pts), boolean chains 6, error handling 1 (2 pts) (nesting depth added 72). To reduce it, split the body into named stages: move each independent 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_build_bvh (cognitive 118) genesis/engine/bvh.py:243— 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.
solver.func_island_hessian_assemble_block (cognitive 116) genesis/engine/solvers/rigid/constraint/solver.py:3084— solver.func_island_hessian_assemble_block has cognitive complexity 116 (threshold 15). Drivers by points: if/else 21 (74 pts), loops 13 (42 pts) (nesting depth added 82). To reduce it, split the body into named stages: move each independent 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_tiled (cognitive 112) genesis/engine/solvers/rigid/abd/forward_dynamics.py:498— 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:301— 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:468— 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.
forward_dynamics.func_integrate (cognitive 106) genesis/engine/solvers/rigid/abd/forward_dynamics.py:2163— forward_dynamics.func_integrate has cognitive complexity 106 (threshold 15). Drivers by points: if/else 20 (58 pts), loops 9 (27 pts), ternaries 4 (17 pts), boolean chains 4 (nesting depth added 69). 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:396— 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.
narrowphase.func_narrowphase_contact0 (cognitive 101) genesis/engine/solvers/rigid/collider/narrowphase.py:3959— narrowphase.func_narrowphase_contact0 has cognitive complexity 101 (threshold 15). Drivers by points: if/else 20 (78 pts), boolean chains 11, loops 4 (9 pts), ternaries 1 (3 pts) (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.
LegacyCoupler.mpm_grid_op (cognitive 100) genesis/engine/couplers/legacy_coupler.py:315— LegacyCoupler.mpm_grid_op has cognitive complexity 100 (threshold 15). Drivers by points: if/else 12 (56 pts), loops 10 (44 pts) (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.
LegacyCoupler.fem_surface_force (cognitive 100) genesis/engine/couplers/legacy_coupler.py:494— LegacyCoupler.fem_surface_force has cognitive complexity 100 (threshold 15). Drivers by points: loops 11 (51 pts), if/else 10 (49 pts) (nesting depth added 79). 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_via_global_bvh (cognitive 100) genesis/engine/sensors/point_cloud_tactile.py:1493— 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:705— 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.
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.
RigidSolver._build_static_config (cognitive 94) genesis/engine/solvers/rigid/rigid_solver.py:468— RigidSolver._build_static_config has cognitive complexity 94 (threshold 15). Drivers by points: if/else 21 (43 pts), boolean chains 27, ternaries 6 (15 pts), loops 5 (9 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.
contact.func_contact_support_hull (cognitive 92) genesis/engine/solvers/rigid/collider/contact.py:953— contact.func_contact_support_hull has cognitive complexity 92 (threshold 15). Drivers by points: if/else 13 (37 pts), loops 14 (36 pts), boolean chains 12, 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:1538— 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.
RigidSolver._jacobi_mass_spread_bound (cognitive 91) genesis/engine/solvers/rigid/rigid_solver.py:783— 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.
point_cloud_tactile._kernel_elastomer_surface_state_bvh (cognitive 89) genesis/engine/sensors/point_cloud_tactile.py:1335— 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.
misc.indices_to_mask (cognitive 89) genesis/utils/misc.py:605— 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.
narrowphase.func_narrow_phase_nonconvex_vs_nonterrain (cognitive 88) genesis/engine/solvers/rigid/collider/narrowphase.py:4533— narrowphase.func_narrow_phase_nonconvex_vs_nonterrain has cognitive complexity 88 (threshold 15). Drivers by points: if/else 12 (59 pts), loops 5 (19 pts), ternaries 1 (6 pts), boolean chains 4 (nesting depth added 66). 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.
diff_gjk.func_gjk_contact (cognitive 84) genesis/engine/solvers/rigid/collider/diff_gjk.py:9— 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.
noslip.func_noslip_update_row (cognitive 84) genesis/engine/solvers/rigid/constraint/noslip.py:239— noslip.func_noslip_update_row has cognitive complexity 84 (threshold 15). Drivers by points: if/else 19 (57 pts), loops 6 (22 pts), boolean chains 5 (nesting depth added 54). 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:891— 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.
epa.func_safe_epa (cognitive 81) genesis/engine/solvers/rigid/collider/epa.py:960— 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:262— 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.
gjk.func_gjk_contact (cognitive 79) genesis/engine/solvers/rigid/collider/gjk.py:148— 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:354— 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:3989— 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:797— 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.
Raytracer.build (cognitive 77) genesis/vis/raytracer.py:213— Raytracer.build has cognitive complexity 77 (threshold 15). Drivers by points: loops 15 (36 pts), if/else 19 (33 pts), ternaries 2 (8 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.
forward_kinematics.func_sweep_links_by_level (cognitive 76) genesis/engine/solvers/rigid/abd/forward_kinematics.py:990— forward_kinematics.func_sweep_links_by_level has cognitive complexity 76 (threshold 15). Drivers by points: if/else 20 (62 pts), loops 4 (14 pts) (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.
island.func_build_islands (cognitive 74) genesis/engine/solvers/rigid/constraint/island.py:295— 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.
solver.func_solve_init (cognitive 73) genesis/engine/solvers/rigid/constraint/solver.py:5565— solver.func_solve_init has cognitive complexity 73 (threshold 15). Drivers by points: if/else 23 (47 pts), loops 8 (17 pts), boolean chains 6, ternaries 2 (3 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.
backward.kernel_manual_add_collision_constraints_bw (cognitive 72) genesis/engine/solvers/rigid/constraint/backward.py:446— 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:699— 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.
genesis.init (cognitive 70) genesis/__init__.py:59— genesis.init has cognitive complexity 70 (threshold 15). Drivers by points: if/else 31 (40 pts), boolean chains 18, 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.
gjk.func_safe_gjk (cognitive 70) genesis/engine/solvers/rigid/collider/gjk.py:1143— 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 69) genesis/vis/rasterizer_context.py:537— RasterizerContext.update_rigid has cognitive complexity 69 (threshold 15). Drivers by points: if/else 9 (40 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.
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.
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:762— 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.
RigidSolver.set_base_links_quat (cognitive 65) genesis/engine/solvers/rigid/rigid_solver.py:2132— RigidSolver.set_base_links_quat has cognitive complexity 65 (threshold 15). Drivers by points: if/else 25 (46 pts), boolean chains 15, 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.
ImGuiOverlayPlugin._render_scene_editor (cognitive 65) genesis/ext/pyrender/overlay/plugin.py:867— 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:3893— 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.
Viewer.start (cognitive 62) genesis/ext/pyrender/viewer.py:1153— 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:1331— 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:285— 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:1506— 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.
RigidSolver.set_base_links_pos (cognitive 60) genesis/engine/solvers/rigid/rigid_solver.py:2008— RigidSolver.set_base_links_pos has cognitive complexity 60 (threshold 15). Drivers by points: if/else 24 (43 pts), boolean chains 13, ternaries 2 (4 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
serialization._load_value (cognitive 60) REDACTED:456— 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:749— 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:726— 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:171— 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.
Raytracer.update_scene (cognitive 58) genesis/vis/raytracer.py:675— Raytracer.update_scene has cognitive complexity 58 (threshold 15). Drivers by points: if/else 13 (23 pts), loops 9 (19 pts), ternaries 4 (15 pts), boolean chains 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
solver.func_add_dynamic_constraint_rows_batch (cognitive 57) genesis/engine/solvers/rigid/constraint/solver.py:1838— 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:1562— 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:429— 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.
contact.func_collider_clear_env (cognitive 53) genesis/engine/solvers/rigid/collider/contact.py:184— contact.func_collider_clear_env has cognitive complexity 53 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 6 (16 pts), ternaries 2 (8 pts), boolean chains 3 (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.
diff_gjk.func_extended_epa (cognitive 53) genesis/engine/solvers/rigid/collider/diff_gjk.py:345— 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:383— 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.
solver._func_contact_row_direction (cognitive 53) genesis/engine/solvers/rigid/constraint/solver.py:638— 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:832— 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.
forward_dynamics.func_midpoint_free_body (cognitive 52) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1949— forward_dynamics.func_midpoint_free_body has cognitive complexity 52 (threshold 15). Drivers by points: if/else 16 (29 pts), loops 8 (13 pts), ternaries 4 (7 pts), boolean chains 3 (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.
epa.func_epa (cognitive 52) genesis/engine/solvers/rigid/collider/epa.py:30— 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.
narrowphase._func_multicontact_run_detection (cognitive 52) genesis/engine/solvers/rigid/collider/narrowphase.py:3015— narrowphase._func_multicontact_run_detection has cognitive complexity 52 (threshold 15). Drivers by points: if/else 13 (42 pts), boolean chains 6, loops 1 (4 pts) (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.
RigidSolver._set_links_info (cognitive 52) genesis/engine/solvers/rigid/rigid_solver.py:2263— 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.
linesearch.func_linesearch_islands_serial (cognitive 49) genesis/engine/solvers/rigid/constraint/linesearch.py:962— 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.
RigidSolver.set_state (cognitive 49) genesis/engine/solvers/rigid/rigid_solver.py:1785— RigidSolver.set_state has cognitive complexity 49 (threshold 15). Drivers by points: if/else 24 (45 pts), boolean chains 4 (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.
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.
KinematicEntity._get_global_idx (cognitive 48) genesis/engine/entities/rigid_entity/rigid_entity.py:568— KinematicEntity._get_global_idx has cognitive complexity 48 (threshold 15). Drivers by points: if/else 20 (37 pts), ternaries 2 (5 pts), boolean chains 4, error handling 1 (2 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.
KinematicSolver.set_dofs_velocity (cognitive 48) genesis/engine/solvers/kinematic_solver.py:1240— KinematicSolver.set_dofs_velocity has cognitive complexity 48 (threshold 15). Drivers by points: if/else 20 (36 pts), boolean chains 9, ternaries 1 (3 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.
forward_dynamics.func_mass_mat_assemble_tree_cooperative (cognitive 48) genesis/engine/solvers/rigid/abd/forward_dynamics.py:239— 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.
solver.func_add_cone_hessian_block_island (cognitive 48) genesis/engine/solvers/rigid/constraint/solver.py:2457— solver.func_add_cone_hessian_block_island has cognitive complexity 48 (threshold 15). Drivers by points: if/else 6 (27 pts), loops 5 (20 pts), boolean chains 1 (nesting depth added 36). 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:4068— 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.
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.
solver.func_cholesky_solve_batch (cognitive 47) genesis/engine/solvers/rigid/constraint/solver.py:4224— 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:311— 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:321— 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.
forward_dynamics.func_refresh_links_invweight_and_meaninertia (cognitive 45) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1393— 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:996— 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:235— 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.
forward_kinematics.func_update_cartesian_space (cognitive 44) genesis/engine/solvers/rigid/abd/forward_kinematics.py:1141— forward_kinematics.func_update_cartesian_space has cognitive complexity 44 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 7 (14 pts), ternaries 3 (8 pts), boolean chains 2 (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.
solver.add_limit_constraints (cognitive 44) genesis/engine/solvers/rigid/constraint/solver.py:1969— 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.
solver.func_apply_staged_rank_updates_island (cognitive 44) genesis/engine/solvers/rigid/constraint/solver.py:3717— solver.func_apply_staged_rank_updates_island has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (32 pts), loops 5 (11 pts), boolean chains 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.
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:92— 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:1262— 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:786— 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:1057— 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:510— 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.
forward_dynamics.func_implicit_damping (cognitive 42) genesis/engine/solvers/rigid/abd/forward_dynamics.py:2360— 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.
gjk.func_gjk_subdistance (cognitive 42) genesis/engine/solvers/rigid/collider/gjk.py:819— 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.
FEMSelfTetContactHandler.compute_pairs (cognitive 41) genesis/engine/couplers/sap_coupler.py:2843— 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:3850— 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:135— 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.
SensorManager._resolve_sensor_cls (cognitive 41) genesis/engine/sensors/sensor_manager.py:82— SensorManager._resolve_sensor_cls has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 3 (7 pts), error handling 1 (6 pts), boolean chains 4 (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.
PBDSolver._kernel_solve_density (cognitive 41) genesis/engine/solvers/pbd_solver.py:598— 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:164— 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.
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:249— 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:3501— 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:578— 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:423— 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.
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:1135— 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:901— 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:1105— 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.
solver.func_island_tiled_factor_solve_all (cognitive 39) genesis/engine/solvers/rigid/constraint/solver.py:3426— solver.func_island_tiled_factor_solve_all has cognitive complexity 39 (threshold 15). Drivers by points: if/else 7 (26 pts), ternaries 1 (7 pts), loops 2 (4 pts), boolean chains 2 (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.
solver.func_update_contact_force (cognitive 39) genesis/engine/solvers/rigid/constraint/solver.py:5926— solver.func_update_contact_force has cognitive complexity 39 (threshold 15). Drivers by points: loops 6 (18 pts), if/else 5 (15 pts), ternaries 1 (6 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RigidSolver.set_qpos (cognitive 39) genesis/engine/solvers/rigid/rigid_solver.py:2445— RigidSolver.set_qpos has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (31 pts), boolean chains 5, ternaries 1 (3 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.
TrajectoryFileWriter._compress_frames (cognitive 39) genesis/recorders/trajectory.py:799— 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.
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:133— 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:193— 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.
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:2064— 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.
RRTConnect.plan (cognitive 37) genesis/utils/path_planning.py:895— 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:1102— 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:320— 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:204— 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:512— 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:203— 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:300— 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.
broadphase.func_check_collision_valid (cognitive 35) genesis/engine/solvers/rigid/collider/broadphase.py:18— broadphase.func_check_collision_valid has cognitive complexity 35 (threshold 15). Drivers by points: if/else 6 (17 pts), boolean chains 8, ternaries 2 (8 pts), loops 1 (2 pts) (nesting depth added 18). 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.
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:576— 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:2579— 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:337— 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:133— 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:801— 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:587— 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:696— 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:438— 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.
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:3280— 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:349— 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:903— accessor.kernel_set_dofs_position has cognitive complexity 33 (threshold 15). Drivers by points: loops 7 (20 pts), if/else 3 (7 pts), ternaries 2 (6 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.
misc.func_hibernate_island_if_settled (cognitive 33) genesis/engine/solvers/rigid/abd/misc.py:159— 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:1843— 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.
solver.func_island_hessian_assemble_all (cognitive 33) genesis/engine/solvers/rigid/constraint/solver.py:3337— solver.func_island_hessian_assemble_all has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (28 pts), boolean chains 2, ternaries 1 (2 pts), 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:3499— 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.
solver._kernel_solve_monolith (cognitive 33) genesis/engine/solvers/rigid/constraint/solver.py:5850— solver._kernel_solve_monolith has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 3 (8 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:1034— 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.
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:244— 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:368— 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.
FEMSolver.accumulate_vertex_force_preconditioner (cognitive 32) genesis/engine/solvers/fem_solver.py:648— FEMSolver.accumulate_vertex_force_preconditioner has cognitive complexity 32 (threshold 15). Drivers by points: loops 11 (24 pts), if/else 4 (8 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.
forward_dynamics.kernel_refresh_invweight_and_meaninertia (cognitive 32) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1469— 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.
solver_breakdown._func_update_constraint_forces (cognitive 32) genesis/engine/solvers/rigid/constraint/solver_breakdown.py:77— solver_breakdown._func_update_constraint_forces has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 4 (10 pts), boolean chains 3, ternaries 1 (2 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.
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:593— 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:229— 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.
gjk.func_safe_gjk_support (cognitive 31) genesis/engine/solvers/rigid/collider/gjk.py:1586— 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:285— 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.
backward.kernel_compute_gradients (cognitive 31) genesis/engine/solvers/rigid/constraint/backward.py:160— backward.kernel_compute_gradients has cognitive complexity 31 (threshold 15). Drivers by points: loops 14 (28 pts), if/else 1 (3 pts) (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:1767— 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:5047— 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.
RasterizerContext.update_contact (cognitive 31) genesis/vis/rasterizer_context.py:621— RasterizerContext.update_contact has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 5 (14 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.
temperature._kernel_contact_heat (cognitive 30) genesis/engine/sensors/temperature.py:284— 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:1194— 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:633— 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.
forward_dynamics.func_update_force (cognitive 30) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1724— forward_dynamics.func_update_force has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (7 pts), ternaries 1 (5 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_add_cone_hessian_block (cognitive 30) genesis/engine/solvers/rigid/constraint/solver.py:2293— solver.func_add_cone_hessian_block has cognitive complexity 30 (threshold 15). Drivers by points: loops 5 (16 pts), if/else 4 (14 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.
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:245— 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.
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:322— 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:18— 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:755— 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:1164— 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.
solver.func_island_hessian_patch_block (cognitive 29) genesis/engine/solvers/rigid/constraint/solver.py:3257— solver.func_island_hessian_patch_block has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 4 (8 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.
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:43— 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.
misc.sanitize_index (cognitive 29) genesis/utils/misc.py:907— 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:217— 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:54— 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.
diff.func_integrate_dq_entity (cognitive 28) genesis/engine/solvers/rigid/abd/diff.py:285— diff.func_integrate_dq_entity 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.
inverse_kinematics.func_integrate_dq_scratch (cognitive 28) genesis/engine/solvers/rigid/abd/inverse_kinematics.py:299— 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:646— 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.
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.
KinematicEntity.process_input_grad (cognitive 27) genesis/engine/entities/rigid_entity/rigid_entity.py:497— KinematicEntity.process_input_grad has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (16 pts), boolean chains 5, loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forward_dynamics.func_compute_mass_matrix (cognitive 27) genesis/engine/solvers/rigid/abd/forward_dynamics.py:335— forward_dynamics.func_compute_mass_matrix has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 7 (11 pts), ternaries 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.
epa.func_epa_horizon (cognitive 27) genesis/engine/solvers/rigid/collider/epa.py:257— 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:5199— 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.
array_class.iter_data (cognitive 27) genesis/utils/array_class.py:211— array_class.iter_data has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, loops 2 (5 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.
FrameImageExporter.export_frame_single_camera (cognitive 27) genesis/utils/image_exporter.py:137— FrameImageExporter.export_frame_single_camera has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (19 pts), ternaries 2 (4 pts), loops 2 (3 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.
misc.qd_to_torch (cognitive 27) genesis/utils/misc.py:734— misc.qd_to_torch has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (17 pts), error handling 2 (5 pts), ternaries 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.
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.
KinematicEntity.inverse_kinematics_multilink (cognitive 26) genesis/engine/entities/rigid_entity/rigid_entity.py:1553— 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:269— 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:190— 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:1863— 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:2226— 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:2353— 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:4170— 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.assign_indexed_tensor (cognitive 26) genesis/utils/misc.py:1128— misc.assign_indexed_tensor has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 3, ternaries 1 (2 pts), error handling 1 (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.
terrain.parse_terrain (cognitive 26) REDACTED:18— terrain.parse_terrain has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 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.
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.update_pbd (cognitive 26) genesis/vis/rasterizer_context.py:872— RasterizerContext.update_pbd has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (21 pts), loops 2 (5 pts) (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.
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:2772— 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:3780— 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.
Simulator.build (cognitive 25) genesis/engine/simulator.py:158— Simulator.build has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 5, 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.
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:596— 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:442— 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:791— 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.
forward_dynamics.func_compute_mass_matrix_masked (cognitive 24) genesis/engine/solvers/rigid/abd/forward_dynamics.py:407— forward_dynamics.func_compute_mass_matrix_masked has cognitive complexity 24 (threshold 15). Drivers by points: loops 7 (10 pts), if/else 5 (9 pts), ternaries 2 (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.
gjk.func_gjk_intersect (cognitive 24) genesis/engine/solvers/rigid/collider/gjk.py:663— 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:1448— 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.
trajectory._encode_frames (cognitive 24) genesis/recorders/trajectory.py:382— 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.
geom.z_to_quat (cognitive 24) genesis/utils/geom.py:2114— 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.
serialization._export_value (cognitive 24) REDACTED:362— 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:536— 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.
gjk.func_gjk_subdistance_2d (cognitive 23) genesis/engine/solvers/rigid/collider/gjk.py:940— 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:1149— 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:1455— 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.
misc.qd_to_numpy (cognitive 23) genesis/utils/misc.py:798— misc.qd_to_numpy has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 2 (5 pts), ternaries 2 (5 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RRT._kernel_rrt_step2 (cognitive 23) genesis/utils/path_planning.py:466— 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:474— 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:196— 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:3441— 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:1928— 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:559— 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:453— 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:483— 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.
island.func_group_constraints_by_island (cognitive 22) genesis/engine/solvers/rigid/constraint/island.py:132— 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:396— 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:504— 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:645— 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.
array_class.get_constraint_state (cognitive 22) genesis/utils/array_class.py:1041— array_class.get_constraint_state has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 18, boolean chains 2, if/else 1, loops 1. 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.
urdf.principal_axes_rot (cognitive 22) REDACTED:527— 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.
IPCCoupler._setup_coupling_config (cognitive 21) genesis/engine/couplers/ipc_coupler/coupler.py:220— 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:1847— 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:790— 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.
MPMSolver.g2p (cognitive 21) genesis/engine/solvers/mpm_solver.py:476— MPMSolver.g2p has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PBDSolver._kernel_solve_viscosity (cognitive 21) genesis/engine/solvers/pbd_solver.py:666— 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:830— 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:108— 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.
epa.func_safe_attach_face_to_polytope (cognitive 21) genesis/engine/solvers/rigid/collider/epa.py:1327— 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:3534— 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:2593— 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.
_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.
misc.kernel_init_link_fields (cognitive 20) genesis/engine/solvers/rigid/abd/misc.py:310— 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.
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:2409— 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:2549— 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:5760— 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_breakdown._func_update_qfrc_constraint_per_dof (cognitive 20) genesis/engine/solvers/rigid/constraint/solver_breakdown.py:122— solver_breakdown._func_update_qfrc_constraint_per_dof has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (5 pts), boolean chains 1, ternaries 1 (nesting depth added 12). 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_breakdown._func_islands_linesearch_and_apply (cognitive 20) genesis/engine/solvers/rigid/constraint/solver_breakdown.py:177— solver_breakdown._func_islands_linesearch_and_apply has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (13 pts), ternaries 1 (4 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImGuiOverlayPlugin._render_visualization (cognitive 20) genesis/ext/pyrender/overlay/plugin.py:576— 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.
array_class.check_data (cognitive 20) genesis/utils/array_class.py:250— array_class.check_data has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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.
mesh.surface_uvs_to_trimesh_visual (cognitive 20) genesis/utils/mesh.py:236— 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:266— 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.
watertighten._neighbors (cognitive 20) genesis/utils/watertighten.py:569— 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:1143— 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.
RasterizerContext.on_pbd (cognitive 20) genesis/vis/rasterizer_context.py:807— RasterizerContext.on_pbd has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (5 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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:1141— 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:185— 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:600— 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:488— 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_is_before (cognitive 19) genesis/engine/solvers/rigid/collider/contact.py:808— contact.func_contact_is_before has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (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.
contact.func_contact_group_by_normal (cognitive 19) genesis/engine/solvers/rigid/collider/contact.py:896— 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.
RigidSolver._init_tree_fields (cognitive 19) genesis/engine/solvers/rigid/rigid_solver.py:953— RigidSolver._init_tree_fields has cognitive complexity 19 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 2 (6 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.
ImGuiOverlayPlugin._render_joints_euler_mode (cognitive 19) genesis/ext/pyrender/overlay/plugin.py:1213— 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:957— 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:67— 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.
misc.get_device (cognitive 19) genesis/utils/misc.py:172— misc.get_device has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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:959— 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:245— 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:1260— 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:159— 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:424— 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:130— 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:119— 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:614— 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_kinematics.func_update_geoms (cognitive 18) genesis/engine/solvers/rigid/abd/forward_kinematics.py:535— forward_kinematics.func_update_geoms 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.
forward_kinematics.func_forward_velocity (cognitive 18) genesis/engine/solvers/rigid/abd/forward_kinematics.py:768— 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.
epa.func_epa_init_polytope_2d (cognitive 18) genesis/engine/solvers/rigid/collider/epa.py:432— 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.
narrowphase.func_narrow_phase_diff_convex_vs_convex (cognitive 18) genesis/engine/solvers/rigid/collider/narrowphase.py:4287— narrowphase.func_narrow_phase_diff_convex_vs_convex has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
narrowphase.func_narrow_phase_convex_specializations (cognitive 18) genesis/engine/solvers/rigid/collider/narrowphase.py:4429— narrowphase.func_narrow_phase_convex_specializations has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
solver.kernel_get_equality_constraints (cognitive 18) genesis/engine/solvers/rigid/constraint/solver.py:512— 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:3803— 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:3847— 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:5275— 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:5504— 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.
RigidSolver.__init__ (cognitive 18) genesis/engine/solvers/rigid/rigid_solver.py:228— RigidSolver.__init__ has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 3 (5 pts), boolean chains 4 (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.
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.
Tensor.__torch_function__ (cognitive 18) genesis/grad/tensor.py:21— Tensor.__torch_function__ has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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:950— 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:384— 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.
Visualizer.update_visual_states (cognitive 18) genesis/vis/visualizer.py:227— Visualizer.update_visual_states has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SAPCoupler.compute_fem_matrix_vector_product (cognitive 17) genesis/engine/couplers/sap_coupler.py:1059— 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:2375— 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:135— 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:113— 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.
forward_kinematics.func_COM_root (cognitive 17) genesis/engine/solvers/rigid/abd/forward_kinematics.py:284— 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:946— 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:642— 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:4502— 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:4629— 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:1261— 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:860— misc.qd_zero_grad has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 2 (6 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.
raycast_qd.write_ray_hit (cognitive 17) genesis/utils/raycast_qd.py:687— 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:222— 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:244— 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_fem (cognitive 17) genesis/vis/rasterizer_context.py:927— 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:914— 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:3126— 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:1575— 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.
FEMSolver.one_linesearch_iter (cognitive 16) genesis/engine/solvers/fem_solver.py:871— 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._kernel_add_elements (cognitive 16) genesis/engine/solvers/fem_solver.py:1142— FEMSolver._kernel_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_update_acc (cognitive 16) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1684— forward_dynamics.func_update_acc has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 2 (5 pts), ternaries 1 (4 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.
forward_dynamics.func_compute_qacc (cognitive 16) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1834— 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.
misc.func_apply_link_external_wrench (cognitive 16) genesis/engine/solvers/rigid/abd/misc.py:895— 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.
narrowphase.func_narrow_phase_convex_vs_convex (cognitive 16) genesis/engine/solvers/rigid/collider/narrowphase.py:4227— narrowphase.func_narrow_phase_convex_vs_convex has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
noslip.func_noslip (cognitive 16) genesis/engine/solvers/rigid/constraint/noslip.py:549— 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:4993— 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.
solver_breakdown._func_islands_update_search_direction (cognitive 16) genesis/engine/solvers/rigid/constraint/solver_breakdown.py:241— solver_breakdown._func_islands_update_search_direction 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.
ImGuiOverlayPlugin._render_control_panel (cognitive 16) genesis/ext/pyrender/overlay/plugin.py:466— 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:434— 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.
Trajectory.play (cognitive 16) genesis/recorders/trajectory.py:1257— Trajectory.play has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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.
mesh.create_box (cognitive 16) genesis/utils/mesh.py:1149— 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.
particle.particles_to_mesh (cognitive 16) genesis/utils/particle.py:321— particle.particles_to_mesh has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 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.
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:243— 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.
RasterizerContext.on_rigid (cognitive 16) genesis/vis/rasterizer_context.py:516— RasterizerContext.on_rigid has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (7 pts), loops 3 (6 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.
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:362— genesis/engine/solvers/rigid/collider/diff_gjk.py:362-550 | genesis/engine/solvers/rigid/collider/epa.py:45-221 | genesis/engine/solvers/rigid/collider/epa.py:976-1212 — 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:2844— genesis/engine/couplers/sap_coupler.py:2844-2975 | genesis/engine/couplers/sap_coupler.py:3509-3620 | genesis/engine/couplers/sap_coupler.py:3851-3985 — 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 (134 shared lines) genesis/engine/solvers/rigid/collider/contact.py:1153— genesis/engine/solvers/rigid/collider/contact.py:1153-1442 | genesis/engine/solvers/rigid/collider/contact.py:1453-1776 — These two members are variants of one another: 134 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 (85 shared lines) genesis/engine/solvers/rigid/collider/narrowphase.py:101— genesis/engine/solvers/rigid/collider/narrowphase.py:101-593 | genesis/engine/solvers/rigid/collider/narrowphase.py:617-995 — These two members are variants of one another: 85 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:526— genesis/utils/path_planning.py:526-661 | genesis/utils/path_planning.py:909-1062 — 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 (64 shared lines) genesis/engine/solvers/rigid/collider/narrowphase.py:3040— genesis/engine/solvers/rigid/collider/narrowphase.py:3040-3159 | genesis/engine/solvers/rigid/collider/narrowphase.py:3972-4223 — These two members are variants of one another: 64 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' 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 (62 shared lines) genesis/utils/path_planning.py:387— genesis/utils/path_planning.py:387-463 | genesis/utils/path_planning.py:737-829 — These two members are variants of one another: 62 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:773— genesis/engine/solvers/rigid/constraint/linesearch.py:773-897 | genesis/engine/solvers/rigid/constraint/linesearch.py:970-1101 — 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:1004— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1004-1058 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1070-1116 — 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:552— genesis/engine/sensors/kinematic_tactile.py:552-613 | genesis/engine/sensors/point_cloud_tactile.py:1077-1138 — 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:857— genesis/engine/entities/rigid_entity/rigid_entity.py:857-889 | 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 (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:707-723 — 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:990— genesis/engine/sensors/kinematic_tactile.py:990-1001 | genesis/engine/sensors/kinematic_tactile.py:1236-1268 — 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:814— genesis/engine/solvers/rigid/constraint/solver.py:814-867 | genesis/engine/solvers/rigid/constraint/solver.py:1043-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.
Duplicated block (53–54 lines × 2) genesis/utils/path_planning.py:609— genesis/utils/path_planning.py:609-661 | genesis/utils/path_planning.py:1009-1062 — 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:402— genesis/engine/solvers/rigid/collider/narrowphase.py:402-452 | genesis/engine/solvers/rigid/collider/narrowphase.py:741-774 — 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:408-438 — 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:420— genesis/engine/solvers/rigid/abd/inverse_kinematics.py:420-465 | genesis/engine/solvers/rigid/abd/inverse_kinematics.py:550-593 — 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:2689— genesis/engine/solvers/rigid/collider/narrowphase.py:2689-2730 | genesis/engine/solvers/rigid/collider/narrowphase.py:4132-4173 — 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:1418— genesis/engine/sensors/point_cloud_tactile.py:1418-1456 | genesis/engine/sensors/point_cloud_tactile.py:1578-1614 — 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:360— genesis/engine/solvers/rigid/collider/narrowphase.py:360-393 | genesis/engine/solvers/rigid/collider/narrowphase.py:725-739 — 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:569— genesis/engine/sensors/kinematic_tactile.py:569-601 | genesis/engine/sensors/kinematic_tactile.py:646-678 | genesis/engine/sensors/point_cloud_tactile.py:1095-1126 — 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:642` calls `qd_int`, `zero` and `genesis/engine/sensors/kinematic_tactile.py:566` 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:1374— genesis/engine/sensors/point_cloud_tactile.py:1374-1406 | genesis/engine/sensors/point_cloud_tactile.py:1407-1408 | genesis/engine/sensors/point_cloud_tactile.py:1537-1566 | genesis/engine/sensors/point_cloud_tactile.py:1567-1568 — 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:1407` 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:1407` calls `Vector`, `qd_float` and `genesis/engine/sensors/point_cloud_tactile.py:1408` 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:1388— genesis/engine/solvers/rigid/collider/contact.py:1388-1420 | genesis/engine/solvers/rigid/collider/contact.py:1725-1749 — 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:837— genesis/engine/solvers/rigid/constraint/linesearch.py:837-869 | genesis/engine/solvers/rigid/constraint/linesearch.py:1047-1079 — 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:837— genesis/engine/solvers/rigid/constraint/linesearch.py:837-867 | genesis/engine/solvers/rigid/constraint/linesearch.py:1047-1077 | genesis/engine/solvers/rigid/constraint/linesearch.py:1477-1507 — 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:453— genesis/engine/sensors/kinematic_tactile.py:453-482 | genesis/engine/sensors/kinematic_tactile.py:722-750 — 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:720` calls `template` and `genesis/engine/sensors/kinematic_tactile.py:451` 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 (30 lines × 2) genesis/engine/solvers/rigid/collider/contact.py:1322— genesis/engine/solvers/rigid/collider/contact.py:1322-1351 | genesis/engine/solvers/rigid/collider/contact.py:1637-1666 — 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:1634` calls `qd_block_max` and `genesis/engine/solvers/rigid/collider/contact.py:1320` 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 (24–29 lines × 2) genesis/engine/solvers/rigid/constraint/backward.py:1048— genesis/engine/solvers/rigid/constraint/backward.py:1048-1076 | genesis/engine/solvers/rigid/constraint/backward.py:1247-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 (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:824— genesis/utils/raycast_qd.py:824-851 | genesis/utils/raycast_qd.py:926-944 — 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–27 lines × 3) genesis/engine/solvers/rigid/collider/narrowphase.py:2643— genesis/engine/solvers/rigid/collider/narrowphase.py:2643-2669 | genesis/engine/solvers/rigid/collider/narrowphase.py:3071-3095 | genesis/engine/solvers/rigid/collider/narrowphase.py:4065-4089 — 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:2643` 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 (24–26 lines × 3) genesis/engine/solvers/rigid/collider/narrowphase.py:2684— genesis/engine/solvers/rigid/collider/narrowphase.py:2684-2707 | genesis/engine/solvers/rigid/collider/narrowphase.py:3105-3130 | genesis/engine/solvers/rigid/collider/narrowphase.py:4127-4150 — 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:3105` 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–25 lines × 2) genesis/engine/solvers/rigid/collider/contact.py:1282— genesis/engine/solvers/rigid/collider/contact.py:1282-1306 | genesis/engine/solvers/rigid/collider/contact.py:1597-1617 — 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–21 lines × 3) genesis/engine/solvers/rigid/collider/broadphase.py:177— genesis/engine/solvers/rigid/collider/broadphase.py:177-197 | genesis/engine/solvers/rigid/collider/broadphase.py:236-256 | genesis/engine/solvers/rigid/collider/broadphase.py:275-292 — 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/broadphase.py:177` 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 (20–21 lines × 2) genesis/engine/couplers/sap_coupler.py:3567— genesis/engine/couplers/sap_coupler.py:3567-3586 | genesis/engine/couplers/sap_coupler.py:3923-3943 — 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:3567` 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 (18–21 lines × 2) genesis/engine/solvers/rigid/abd/forward_dynamics.py:1440— genesis/engine/solvers/rigid/abd/forward_dynamics.py:1440-1460 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1512-1529 — 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 × 3) genesis/engine/solvers/rigid/collider/diff_gjk.py:473— genesis/engine/solvers/rigid/collider/diff_gjk.py:473-492 | genesis/engine/solvers/rigid/collider/epa.py:159-178 | genesis/engine/solvers/rigid/collider/epa.py:1103-1122 — 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:116— genesis/engine/solvers/rigid/collider/narrowphase.py:116-124 | genesis/engine/solvers/rigid/collider/narrowphase.py:691-699 | genesis/engine/solvers/rigid/collider/narrowphase.py:1087-1106 — 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:104— genesis/engine/sensors/kinematic_tactile.py:104-121 | genesis/engine/sensors/kinematic_tactile.py:142-161 — 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:738— genesis/engine/solvers/rigid/constraint/solver.py:738-753 | genesis/engine/solvers/rigid/constraint/solver.py:957-976 — 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–19 lines × 2) genesis/engine/solvers/rigid/collider/contact.py:1247— genesis/engine/solvers/rigid/collider/contact.py:1247-1265 | genesis/engine/solvers/rigid/collider/contact.py:1554-1570 — 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:488— genesis/engine/solvers/rigid/collider/narrowphase.py:488-504 | genesis/engine/solvers/rigid/collider/narrowphase.py:819-832 — 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:977— genesis/engine/solvers/rigid/constraint/backward.py:977-993 | genesis/engine/solvers/rigid/constraint/backward.py:1170-1185 — 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:1170` 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:441-455 — 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 (16 lines × 3) genesis/engine/solvers/rigid/collider/capsule_contact.py:62— genesis/engine/solvers/rigid/collider/capsule_contact.py:62-77 | genesis/engine/solvers/rigid/collider/capsule_contact.py:128-143 | genesis/engine/solvers/rigid/collider/capsule_contact.py:208-223 — 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 (4–16 lines × 4) genesis/engine/solvers/rigid/constraint/backward.py:953— genesis/engine/solvers/rigid/constraint/backward.py:953-966 | genesis/engine/solvers/rigid/constraint/backward.py:1118-1133 | genesis/engine/solvers/rigid/constraint/solver.py:1187-1190 | genesis/engine/solvers/rigid/constraint/solver.py:1908-1911 — 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:5172— genesis/engine/solvers/rigid/constraint/solver.py:5172-5186 | 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:5172` 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–16 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:5200— genesis/engine/solvers/rigid/constraint/solver.py:5200-5213 | genesis/engine/solvers/rigid/constraint/solver_breakdown.py:78-93 — 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:5200` 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–15 lines × 4) genesis/engine/solvers/rigid/rigid_solver.py:1907— genesis/engine/solvers/rigid/rigid_solver.py:1907-1921 | genesis/engine/solvers/rigid/rigid_solver.py:2112-2126 | genesis/engine/solvers/rigid/rigid_solver.py:2246-2260 | genesis/engine/solvers/rigid/rigid_solver.py:2503-2515 — 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/solvers/rigid/rigid_solver.py:1907` 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, `genesis/engine/solvers/rigid/rigid_solver.py:2110` calls `kernel_set_links_pos` and `genesis/engine/solvers/rigid/rigid_solver.py:1906` 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–15 lines × 2) genesis/engine/sensors/point_cloud_tactile.py:527— genesis/engine/sensors/point_cloud_tactile.py:527-541 | genesis/engine/sensors/point_cloud_tactile.py:543-555 — 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:605— genesis/engine/solvers/rigid/collider/contact.py:605-619 | genesis/engine/solvers/rigid/collider/diff_gjk.py:676-686 — 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 (3–15 lines × 3) genesis/engine/solvers/rigid/collider/narrowphase.py:2638— genesis/engine/solvers/rigid/collider/narrowphase.py:2638-2640 | genesis/engine/solvers/rigid/collider/narrowphase.py:3055-3069 | genesis/engine/solvers/rigid/collider/narrowphase.py:4048-4062 — 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:2638` 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–15 lines × 2) genesis/engine/solvers/rigid/constraint/solver_breakdown.py:184— genesis/engine/solvers/rigid/constraint/solver_breakdown.py:184-198 | genesis/engine/solvers/rigid/constraint/solver_breakdown.py:247-256 — 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 × 4) genesis/engine/sensors/kinematic_tactile.py:344— genesis/engine/sensors/kinematic_tactile.py:344-357 | genesis/engine/sensors/kinematic_tactile.py:464-477 | genesis/engine/sensors/kinematic_tactile.py:732-745 | genesis/engine/sensors/kinematic_tactile.py:836-849 — 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:531— genesis/engine/solvers/rigid/constraint/backward.py:531-541 | genesis/engine/solvers/rigid/constraint/backward.py:985-998 | genesis/engine/solvers/rigid/constraint/backward.py:1187-1196 — 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:1197` calls `qd_vec3` and `genesis/engine/solvers/rigid/constraint/backward.py:542` 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 (9–14 lines × 2) genesis/engine/solvers/rigid/collider/narrowphase.py:2669— genesis/engine/solvers/rigid/collider/narrowphase.py:2669-2682 | genesis/engine/solvers/rigid/collider/narrowphase.py:4117-4125 — 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–14 lines × 2) genesis/engine/solvers/rigid/constraint/linesearch.py:812— genesis/engine/solvers/rigid/constraint/linesearch.py:812-825 | genesis/engine/solvers/rigid/constraint/linesearch.py:1026-1037 — 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:812` 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–14 lines × 2) genesis/engine/solvers/rigid/constraint/noslip.py:53— genesis/engine/solvers/rigid/constraint/noslip.py:53-66 | genesis/engine/solvers/rigid/constraint/noslip.py:91-97 — 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 × 3) genesis/engine/solvers/rigid/collider/broadphase.py:191— genesis/engine/solvers/rigid/collider/broadphase.py:191-203 | genesis/engine/solvers/rigid/collider/broadphase.py:250-262 | genesis/engine/solvers/rigid/collider/broadphase.py:377-387 — 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/broadphase.py:191` 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 (10–13 lines × 3) genesis/ext/isaacgym/terrain_utils.py:378— genesis/ext/isaacgym/terrain_utils.py:378-387 | REDACTED:282-294 | REDACTED:320-329 — 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 (10–11 lines × 3) genesis/engine/solvers/rigid/constraint/backward.py:568— genesis/engine/solvers/rigid/constraint/backward.py:568-578 | genesis/engine/solvers/rigid/constraint/backward.py:1016-1025 | genesis/engine/solvers/rigid/constraint/backward.py:1224-1233 — 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:3358— genesis/engine/couplers/sap_coupler.py:3358-3368 | genesis/engine/couplers/sap_coupler.py:3584-3591 — 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:3358` 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–11 lines × 5) genesis/engine/solvers/rigid/abd/forward_kinematics.py:551— genesis/engine/solvers/rigid/abd/forward_kinematics.py:551-551 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:1164-1166 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:1222-1224 | genesis/engine/solvers/rigid/abd/manual_bw.py:245-260 | genesis/engine/solvers/rigid/abd/manual_bw.py:432-442 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `genesis/engine/solvers/rigid/abd/forward_kinematics.py:1164` 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 (2–10 lines × 4) genesis/engine/solvers/rigid/abd/accessor.py:1208— genesis/engine/solvers/rigid/abd/accessor.py:1208-1209 | genesis/engine/solvers/rigid/abd/accessor.py:1210-1211 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1579-1588 | genesis/engine/solvers/rigid/abd/forward_dynamics.py:1627-1636 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `genesis/engine/solvers/rigid/abd/accessor.py:1210` 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 (6–10 lines × 2) genesis/engine/solvers/rigid/constraint/linesearch.py:1286— genesis/engine/solvers/rigid/constraint/linesearch.py:1286-1291 | genesis/engine/solvers/rigid/constraint/linesearch.py:1400-1409 — 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–10 lines × 2) genesis/engine/solvers/rigid/constraint/solver.py:3138— genesis/engine/solvers/rigid/constraint/solver.py:3138-3145 | genesis/engine/solvers/rigid/constraint/solver.py:3195-3204 — 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–9 lines × 3) genesis/engine/solvers/rigid/constraint/backward.py:491— genesis/engine/solvers/rigid/constraint/backward.py:491-498 | genesis/engine/solvers/rigid/constraint/solver.py:721-729 | genesis/engine/solvers/rigid/constraint/solver.py:942-950 — 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 (4–9 lines × 3) genesis/engine/solvers/rigid/abd/accessor.py:923— genesis/engine/solvers/rigid/abd/accessor.py:923-926 | genesis/engine/solvers/rigid/abd/diff.py:297-305 | genesis/engine/solvers/rigid/abd/inverse_kinematics.py:320-326 — 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. The matched lines also transfer control out of the body holding them, 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 (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–8 lines × 3) genesis/engine/solvers/rigid/constraint/solver.py:2241— genesis/engine/solvers/rigid/constraint/solver.py:2241-2247 | genesis/engine/solvers/rigid/constraint/solver.py:2606-2613 | genesis/engine/solvers/rigid/constraint/solver.py:2802-2809 — 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/solver.py:2616` calls `static` and `genesis/engine/solvers/rigid/constraint/solver.py:2248` 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 (6–8 lines × 3) genesis/engine/solvers/rigid/constraint/solver.py:3934— genesis/engine/solvers/rigid/constraint/solver.py:3934-3941 | genesis/engine/solvers/rigid/constraint/solver.py:4016-4023 | genesis/engine/solvers/rigid/constraint/solver.py:4483-4488 — 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 (4–8 lines × 3) genesis/engine/solvers/rigid/abd/forward_kinematics.py:543— genesis/engine/solvers/rigid/abd/forward_kinematics.py:543-550 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:775-788 | genesis/engine/solvers/rigid/abd/forward_kinematics.py:1163-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. 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/forward_kinematics.py:539` calls `template` and `genesis/engine/solvers/rigid/abd/forward_kinematics.py:771` 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 (7 lines × 5) 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:108-114 | genesis/engine/solvers/rigid/abd/accessor.py:148-154 | genesis/engine/solvers/rigid/abd/accessor.py:188-194 — 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 (6–7 lines × 4) genesis/engine/couplers/legacy_coupler.py:373— genesis/engine/couplers/legacy_coupler.py:373-378 | genesis/engine/couplers/legacy_coupler.py:394-400 | genesis/engine/couplers/legacy_coupler.py:612-617 | genesis/engine/couplers/legacy_coupler.py:633-638 — 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/legacy_coupler.py:373` 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 × 4) genesis/engine/couplers/sap_coupler.py:2533— genesis/engine/couplers/sap_coupler.py:2533-2539 | genesis/engine/couplers/sap_coupler.py:3356-3362 | genesis/engine/couplers/sap_coupler.py:3582-3588 | genesis/engine/couplers/sap_coupler.py:3939-3945 — 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:415— genesis/options/surfaces.py:415-418 | genesis/options/surfaces.py:499-505 | genesis/options/surfaces.py:589-595 | genesis/options/surfaces.py:686-692 — 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 (5–7 lines × 3) genesis/vis/rasterizer_context.py:1023— genesis/vis/rasterizer_context.py:1023-1027 | genesis/vis/rasterizer_context.py:1048-1052 | genesis/vis/rasterizer_context.py:1067-1073 — 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:1023` 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 (6 lines × 4) genesis/engine/solvers/rigid/abd/accessor.py:221— genesis/engine/solvers/rigid/abd/accessor.py:221-226 | genesis/engine/solvers/rigid/abd/accessor.py:338-343 | genesis/engine/solvers/rigid/abd/accessor.py:365-370 | genesis/engine/solvers/rigid/abd/accessor.py:390-395 — 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 × 5) genesis/engine/solvers/rigid/constraint/backward.py:584— genesis/engine/solvers/rigid/constraint/backward.py:584-588 | genesis/engine/solvers/rigid/constraint/backward.py:1043-1048 | genesis/engine/solvers/rigid/constraint/backward.py:1242-1247 | genesis/engine/solvers/rigid/constraint/solver.py:995-1000 | genesis/engine/solvers/rigid/constraint/solver.py:1805-1810 — 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:583` calls `qd_float` and `genesis/engine/solvers/rigid/constraint/backward.py:1042` 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–5 lines × 6) genesis/engine/couplers/sap_coupler.py:2694— genesis/engine/couplers/sap_coupler.py:2694-2698 | genesis/engine/couplers/sap_coupler.py:2706-2710 | genesis/engine/couplers/sap_coupler.py:3032-3034 | genesis/engine/couplers/sap_coupler.py:3038-3041 | genesis/engine/couplers/sap_coupler.py:3055-3058 | genesis/engine/couplers/sap_coupler.py:3062-3065 — 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:2698` calls `static` and `genesis/engine/couplers/sap_coupler.py:3034` 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:3204— genesis/engine/couplers/sap_coupler.py:3204-3205 | genesis/engine/couplers/sap_coupler.py:3270-3274 | genesis/engine/couplers/sap_coupler.py:3435-3436 | genesis/engine/couplers/sap_coupler.py:3770-3774 — 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:3270` 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 (3–5 lines × 4) genesis/engine/solvers/rigid/collider/narrowphase.py:4247— genesis/engine/solvers/rigid/collider/narrowphase.py:4247-4251 | genesis/engine/solvers/rigid/collider/narrowphase.py:4444-4448 | genesis/engine/solvers/rigid/collider/narrowphase.py:4505-4507 | genesis/engine/solvers/rigid/collider/narrowphase.py:4548-4550 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `genesis/engine/solvers/rigid/collider/narrowphase.py:4246` calls `min` and `genesis/engine/solvers/rigid/collider/narrowphase.py:4505` 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.
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 (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) · ×1
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.
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 (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 (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 (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 — 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: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 (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/utils/array_class.py:240— `iter_data` is public and takes `owner: object` from its caller, and it calls itself at line 240 (`iter_data`) with a piece of `owner` — and nowhere in `iter_data` 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 `iter_data` 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:443— `error` at line 443 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/assets/tower/generate_tower.py:293— `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.
Interpolated log message defeats structured logging genesis/assets/tower/generate_tower.py:320— `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.
Interpolated log message defeats structured logging genesis/assets/tower/generate_tower.py:402— `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.
Interpolated log message defeats structured logging genesis/engine/couplers/ipc_coupler/coupler.py:243— `debug` at line 243 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:249— `debug` at line 249 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:255— `debug` at line 255 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:262— `debug` at line 262 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:400— `debug` at line 400 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:427— `debug` at line 427 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:600— `debug` at line 600 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:682— `debug` at line 682 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:788— `debug` at line 788 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:801— `warning` at line 801 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/trajectory.py:525— `warning` at line 525 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/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/utils/video_encoder.py:178— `debug` at line 178 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/misc.py:87— `warning` at line 87 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: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.
Duplicated predicate genesis/engine/solvers/rigid/collider/diff_gjk.py:522— `(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/entities/fem_entity.py:759— `_tgt_actu is not None and _tgt_actu.requires_grad` appears character-identically in 2 files — genesis/engine/entities/fem_entity.py, genesis/engine/entities/mpm_entity.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/entities/fem_entity.py:765— `_tgt_pos is not None and _tgt_pos.requires_grad` appears character-identically in 3 files — genesis/engine/entities/fem_entity.py, genesis/engine/entities/particle_entity.py, genesis/engine/entities/tool_entity/tool_entity.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/entities/fem_entity.py:762— `_tgt_vel is not None and _tgt_vel.requires_grad` appears character-identically in 3 files — genesis/engine/entities/fem_entity.py, genesis/engine/entities/particle_entity.py, genesis/engine/entities/tool_entity/tool_entity.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:3385— `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:644— `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:225— `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:1717— `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:853— `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:436— `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:307— `gs.use_zerocopy and gs.backend == gs.metal` appears character-identically in 3 files — genesis/engine/simulator.py, 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:1524— `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:474— `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:1213— `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:1248— `not IS_OLD_TORCH or 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 genesis/vis/rasterizer_context.py:1195— `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:1199— `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:1481— `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:1123— `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:1107— `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:1071— `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:680— `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:5174— `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.
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/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/engine/couplers/ipc_coupler/coupler.py:400— `debug` at line 400 is called with an argument built by `set(self._coup_type_by_entity.values())` (line 400), 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/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.
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/constraint/linesearch.py, genesis/recorders/trajectory.py, genesis/utils/watertighten.py, genesis/engine/solvers/rigid/constraint/island.py, REDACTED, genesis/utils/sdf.py, genesis/utils/particle.py, genesis/ext/pyrender/light.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 and example/demo trees and test files identified by path convention, largest first; 191 of the 265 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)` (136173 LoC, 871 module-visible types across 58 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.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 6 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/sampler.py (7 orphaned of 191 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 191 of the 265 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'.
README/code drift README.md:142— README.md runs `powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1`, but `https:/astral.sh/uv/install.ps1` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
No SAST — 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 52748 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:280— `_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 01a15a3b-562a-7214-a363-1ad45ad7fc80 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 52 · Warnings: 1585 · Recommendations: 81 · Info: 3 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 20-10-2026 @ 16:53 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.