Repository navigation
[Tests] Prune PhysX tests with the test-audit skill - #8009
Conversation
- Remove the Fabric view's local scale tests that shadowed the shared FrameView contract tests of the same name; the contract versions write a different scale per row on both devices and catch a broadcast bug the overrides passed. - Enforce the physx_replicate vs. USD-parsing trajectory match, which passes on both devices but sat behind a non-strict xfail. - Make the IMU stale-data regression settle on the ground and check a non-zero reading first; the freefall version passed with the timestamp guard removed. - Give the IMU and PVA env_ids propagation tests assertions for the partially reset environments. - Assert the contact-report API and threshold unconditionally, fold the assertion-free sensor print test into it, and remove the duplicate rigid-body material round trip. - Run device-independent ordering and writer-lock tests on CUDA only.
|
|
|
||
|
|
||
| @pytest.mark.parametrize("device", ["cuda:0", "cpu"]) | ||
| @pytest.mark.parametrize("device", test_devices(DeviceScope.CUDA)) |
There was a problem hiding this comment.
DeviceScope.CUDA drops the CPU case that this test previously ran. On a CPU-only run, the contact-reporter and threshold assertions now skip entirely, so a CPU-specific regression can go unnoticed. The same change removes CPU coverage from two articulation-ordering tests and two Fabric writer-scope tests. Please retain CPU in the test scope while respecting the runtime device mask.
Knowledge Base Used: PhysX backend
There was a problem hiding this comment.
Isaac Lab Review Bot
The test audit consolidates duplicate and shadowed PhysX coverage, strengthens IMU/PVA reset assertions, makes the contact-threshold contract unconditional, and enforces the cloner trajectory comparison. The changed test-selection and launch-order paths do not establish a concrete defect requiring action before merge.
- Design and architecture: The consolidation preserves focused contract coverage: shared FrameView scale tests replace local overrides, the contact sensor summary check joins the existing threshold fixture, and redundant material-property coverage is removed in favor of the existing view round-trip test.
- API: No production or public API is changed. The added uses of
test_devicesandDeviceScoperely on existing test utilities and replace hard-coded device matrices without altering user-facing behavior. - Implementation: The reset tests now establish non-vacuous preconditions and verify selective per-environment zeroing. The contact threshold and cloner checks are directly asserted rather than guarded or non-strictly xfailed. The inherited CI marker and pre-launch test-utility imports were checked, but the supplied evidence does not demonstrate a material failure or unsupported dependency initialization.
No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.
Automated review; human maintainers own approval decisions.
Retire redundant layers in source/isaaclab_physx/test/assets and repair vacuous assertions, keeping one owner per contract: - Delete wrench-composer self-readback, PhysX view round-trip, private ordering-map, tautological implicit-feedforward, and OSC tracking tests whose keepers were proven red by production mutations. - Merge init, shape, mass-matrix refresh, int64-selector, and state consistency checks into the tests that already build the same fixture. - Repair tests that passed without the behavior: external-force tests on a free-falling robot, reset tests that never set a wrench, the inverted joint-command check, spatial-tendon setters with no readback, neural actuator tests that only checked finiteness, and the private-ID collection test. - Trim parametrize axes that select no distinct branch, keeping N=1 initialization coverage per asset type and CPU coverage for writers.
…tion review The shape-only iface alias tests did not cover the reordered values of body_com_pos_b/quat_b and body_pos_w/quat_w. Also replace the neural-actuator effort clamp, which could not fail, with a check that the network output follows the joint state.
- Merge frame-transformer, IMU, and PVA property tests that rebuilt the same scene into one driven-loop keeper per sensor, and drop the duplicate pendulum fixture. - Delete joint-wrench tests that compared the sensor to the raw PhysX tensor it copies; the shared analytic frame contract keeps the physics proof. - Fold view-caching counters into the fallback tests, sensor print checks into their keepers, and the isaac-sim#3498 threshold checks into the lazy contact test. - Assert the signed friction direction and the exact ValueError messages for invalid contact data configs. - Trim parametrize axes that select no distinct branch (dead contact processing flag, aged-clock and num_envs rows, device on bookkeeping). - Remove the always-xfail and always-skipped cloner tests, assert the replicated body count, and fold env consistency into replicate-vs-USD. - Remove Fabric view tests that re-assert shared contract tests through private matrices and selections. - Remove renderer tests that restate a class property, a private table, a source grep, or mock pass-through, and cover the Isaac Sim 5.x output gate.
…ion review The Kuka golden-image keeper is excluded from every CI shard, so restore the Fabric visual-material writer, tensor layout, and runtime-only tests it was meant to replace, and check that the frame transformer reuses its recorded launch.
|
run-ci |
| OperationalSpaceController, | ||
| OperationalSpaceControllerCfg, | ||
| ) | ||
| from isaaclab.controllers import DifferentialIKController, DifferentialIKControllerCfg |
There was a problem hiding this comment.
PhysX controller coverage removed
Removing the operational-space-controller tests leaves no PhysX test that checks whether gravity compensation holds the Franka arm steady while an uncompensated controller lets it sag. The Newton tests cannot catch a PhysX-specific regression in that behavior.
Knowledge Base Used: PhysX backend
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| sim.play() | ||
| for _ in range(10): | ||
| sim.step() | ||
| # Spawn cone with density instead of mass |
There was a problem hiding this comment.
Deformable simulation coverage removed
The combined cone test checks the authored mass and density attributes but no longer starts or steps the simulation. It can therefore pass even if PhysX fails to initialize or simulate either deformable cone, which the removed tests exercised.
Knowledge Base Used: PhysX backend
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Comments Outside DiffThese findings sit on lines the diff does not cover, so they could not be posted inline. Each one leaves this list once its file changes.
|
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
These files boot Kit on the default GPU, so scope their device rows to the default GPU instead of every CUDA device, which the multi-GPU discovery would pick up.
Signed-off-by: Octi Zhang <[email protected]>
|
run-ci |
…ts (#8018) ## Description Completes the missing `develop` backports to `release/3.0.0` from the 48-hour audit window ending September 25, 2026 at 05:55 UTC. Of 30 merged source PRs, 25 were already present on release, three had no backport, and two had inferred draft backports. - #7978: report Newton reaction wrenches for fixed connections while preserving articulation control-joint ownership. - #7997: correct OVPhysX joint-wrench frames and move the shared analytic sensor contract into the test tree. - #7989: correct body-offset Jacobians in task-space actions without mutating backend buffers. - #8010 and #8009: backport the OVPhysX and PhysX test audits after their wrench prerequisite. All five source patches apply without conflicts in this order. This supersedes the now-closed inferred draft backports #8016 and #8017, which were generated without #7997 and adapted their sensor tests around the old release implementation. Source commit hashes are recorded in the commit message. ## Validation - Audited all 778 paths touched by the 30 source PRs. Remaining differences in those paths are existing release metadata, cloning documentation, a CLI test version example, and release-only renderer tests. - **55 focused checks passed:** 6 Jacobian/shared-contract unit tests, 14 Newton sensor tests, 9 OVPhysX sensor tests across CPU/GPU, 9 PhysX sensor tests, 14 changed shared-ordering cases, and 3 live PhysX OSC tracking/gravity cases. Seven PhysX ordering variants skipped in the direct invocation; the live PhysX checks ran separately with Kit. - Backend validation used Newton 1.6.0, Warp 1.17.0, OVPhysX 0.6.3, and the pinned Isaac Sim 6.1.0 installation. Package imports were verified to resolve to this backport checkout. - `uv run --no-sync isaaclab -f`, `git diff --check`, and the full `make -C docs current-docs` build with warnings as errors passed. - Additional renderer contract coverage: 53 passed; two live-render cases could not initialize the local native CRenderApi library despite installing the pinned `ov` extra. Full Docker/GPU CI is running on the PR head. - The broader shared ordering file has 14 OVPhysX failures on both this branch and unchanged release, with identical failing node IDs and no added failures. The changed cases listed above passed. ## Controller coverage review The live PhysX OSC tests remain in `source/isaaclab/test/controllers/test_operational_space.py`; its fixture uses `SimulationCfg`'s default `PhysxCfg`, and the file is included in CI. The existing absolute-pose tracking, gravity-compensation, and nullspace-centering cases passed against Isaac Sim 6.1.0. The test audit removes the duplicate asset-suite cases while retaining this controller-suite coverage. ## Existing release CI failures The latest [release run](https://github.com/isaac-sim/IsaacLab/actions/runs/36097576980) and [develop run](https://github.com/isaac-sim/IsaacLab/actions/runs/36099567240) fail the same five OvStage image comparisons in `rendering-correctness-kitless (ovstage)` and `ovrtx-cache-warm`: Cartpole on Newton and OVPhysX, plus Newton Franka cable, cloth, and soft. Cartpole is 2.03–2.04% different against a 1.50% threshold on both branches; cloth is 32.48% on both. These shared rendering failures predate this catch-up; this PR does not change rendering output or image thresholds. ## Checklist - [x] Contribution guidance followed and formatting checks passed - [x] Original package changelog fragments and documentation included - [x] File-by-file backport audit completed - [x] Warning-free documentation build completed - [ ] Full CI completed Targets `release/3.0.0`; no further backport is needed.
…8031) Backports the two test-prune PRs whose automatic backports failed to `release/3.0.0`: - #8022 — prune core `isaaclab` tests with the test-audit skill (core job 32:18 → ~22:40 locally). The bot could not replay it because the PR contained a merge commit. - #8008 — prune Newton tests with the test-audit skill. The bot's cherry-pick applied, but its validation rejected the result. Each is a `git cherry-pick -x` of the squash commit on `develop`: - **#8008** applies identically. - **#8022** applies identically except for three asset-interface test fixtures, which `release/3.0.0` already has in #8022's final form. Test-only changes plus `.skip` changelog fragments. Tests are validated by this PR's CI. The rest of this test-audit series is already on `release/3.0.0`: - #8003 via #8002 - #8009 and #8010 via #8018 - #8006, #8007, #8019 and #8020 by the backport bot --------- Signed-off-by: Octi Zhang <[email protected]> Co-authored-by: Octi Zhang <[email protected]>
# Description `isaaclab_physx.assets.RigidObjectCollection` has three bugs in its inertial-property setters. #8009 and #8022 found the first one during the test audit (`set_coms_index` raises `KeyError`) and left it unfixed. 1. **`set_coms_index` raises `KeyError: <class 'warp._src.types.transformf'>`.** The COM poses were reshaped into view order but passed to the PhysX tensor API as `wp.transformf`. Every other view write in this class already calls `.view(wp.float32)`; this path now does too. 2. **A partial COM write zeroes the cached `body_com_pose_b`.** `body_com_pose_b` is filled lazily from the view. `set_coms_index` wrote the selected cells into the buffer and then marked it fresh, so cells that had never been read back returned all-zero poses (including a zero quaternion) whenever the setter ran before the first read. An example is a COM randomization event applied to a subset of bodies at startup. The setter no longer marks the cache fresh, so the next read refreshes from the view, which is what `RigidObject` does. 3. **`set_inertias_index` fails with `Failed to set rigid body inertias in backend`.** The `(num_instances, num_bodies, 9)` inertias were flattened with the 2D reshape helper. They now use `reshape_data_to_view_3d(..., 9)`. Only the PhysX collection is affected. `RigidObject` and `Articulation` handle these paths correctly, and the mocked interface tests accept either layout, which is why this was missed. ## Testing A new test, `test_inertial_property_subset_writes_reach_selected_view_entries`, writes COM and inertia to a non-sorted subset of (env, body) cells. It then checks both the PhysX view readback and the data buffers, on CPU and CUDA. Each bug turns it red on its own: | Code state | Result | |---|---| | `develop` | `KeyError: transformf` in `set_coms_index` | | + float32 COM view | `body_com_pose_b` mismatch: 4/42 elements (zero quaternion `w` in unselected cells) | | + cache freshness fix | `Exception: Failed to set rigid body inertias in backend` | | + inertia 3D reshape (this PR) | passes | - `source/isaaclab_physx/test/assets/test_rigid_object_collection.py`: 40 passed - `source/isaaclab/test/assets/test_rigid_object_collection_iface.py`: 107 passed - `./isaaclab.sh -f`: all hooks pass ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Release backport - [ ] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Checklist Docker and GPU tests run on demand. Push the commits you want tested, then comment `run-ci` on the pull request. - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `uv run isaaclab --format` - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have validated the changed behavior with focused coverage and applied the [test-audit criteria](https://github.com/isaac-sim/IsaacLab/blob/develop/skills/developer/test-audit/SKILL.md) to any test changes - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package (do **not** edit `CHANGELOG.rst` or bump package versions — CI handles that) - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there --------- Co-authored-by: Mustafa Haiderbhai <[email protected]>
PhysX test suite: 12:54 → 7:09 (−45%)
The
isaaclab_physxsuite runs throughpytest toolson the same machine with a warm Warp cache. 26/27 files pass.test_spawn_meshes.pyneeds thetetrahedralizationextra, which is missing locally and fails identically ondevelop; it passes with the extra.developWhat changed
The whole test surface was pruned with the
isaaclab-auditing-testsskill (#8007).Method. Every test was marked keep, fix, merge or delete. Whenever a deletion's keeper does not carry the assertions verbatim, a deliberate production mutation proves the keeper fails. An independent review then restored every gap it found. Only test files changed.
apply_joint_command(inverted assertion)physx_replicate, which was a non-strict xfailtest_differential_ik.py) never run in CI.Product defects found (not fixed here)
RigidObjectCollection.set_coms_indexraisesKeyError.reset()leaves the wrench composers active.FrameTransformer.__str__swaps the frame count and the frame names.Release backport
developChecklist
pre-commitchecks with./isaaclab.sh --formatsource/<pkg>/changelog.d/for every touched packageCONTRIBUTORS.mdor my name already exists there