Skip to content

[Tests] Prune OVPhysX tests with the test-audit skill - #8010

Merged
ooctipus merged 6 commits into
isaac-sim:developfrom
StafaH:test/audit-ov-tests
Sep 25, 2026
Merged

ooctipus merged 6 commits into
isaac-sim:developfrom
StafaH:test/audit-ov-tests

Conversation

@StafaH

@StafaH StafaH commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

OVPhysX/OVRTX test suite: 11:29 → 6:32 (−43%)

The isaaclab_ov suite runs through pytest tools on the same machine with a warm Warp cache, both device passes, and the ov extra. All 36 files pass.

develop this PR
Suite wall time 11:29 6:32
Test functions 473 345
Test lines 19,636 16,136

What changed

The whole test surface was pruned with the isaaclab-auditing-tests skill (#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 on both devices. An independent review then restored every gap it found. Only test files changed.

  • Merged:
    • frame transformer: 6 builds → 1
    • IMU/PVA sanity tests into the analytic keepers
    • articulation tests that rebuilt a sibling's fixture (5 Anymal builds → 1)
    • test_ovphysx_view.py error micro-tests into parametrized keepers
  • Deleted:
    • tests of the mock fixtures themselves
    • private ordering-state checks
    • WrenchComposer and effort-limit replays
    • joint-wrench identity copies
    • contact tests that can never run (production raises NotImplementedError)
    • OVRTX dtype × layout replays
  • Fixed tests that could not fail:
  • Test bug fixed: a test mutated the shared FRANKA_PANDA_CFG, so every later Panda test ran on a robot that went NaN and still passed.

Product defect found (not fixed here)

  • OVPhysX has no ArticulationRootAPI guard for rigid objects. Pinned with a strict xfail.

Release backport

  • Backport this pull request to the active release branch after it merges into develop

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • My changes generate no new warnings
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

- Remove three joint-wrench tests that only compared the sensor with the
  OVPhysX tensor it copies; the shared analytic frame test and the shape
  tests fail when the split kernel swaps force and torque.
- Fold the full joint-wrench reset into the partial-reset test.
- Use material-randomization ranges that exclude the asset's defaults;
  the old ranges passed with the write removed.
- Give the IMU env_ids propagation test assertions, and make its skipped
  placeholders fail if they are ever un-skipped without a body.
- Assert the contact-report threshold unconditionally on one device.
- Remove a copied mock-shape test and two read_into tests implied by
  their siblings, and run the FrameView factory dispatch on one device.
@StafaH
StafaH requested a review from a team September 24, 2026 19:12
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Sep 24, 2026
@greptile-apps

greptile-apps Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Low risk] Removes and consolidates test cases.

The PR appears safe to merge, with non-blocking gaps in regression coverage for ordered articulation behavior.

Findings

  1. P2 Ordered acceleration goes unchecked ▶
  2. P2 Ordered friction reads go unchecked ▶
  3. P2 Ordered wrench composition goes unchecked ▶
  4. P2 Interior joint check removed ▶
  5. P2 Unused scene configuration remains ▶

Summary

The PR consolidates OVPhysX and OVRTX tests, removes duplicate and unreachable cases, and strengthens several assertions and reset checks. The latest pruning also removes distinct regression coverage for ordered articulation acceleration, friction reads, and wrench composition.

Reviews (2) · Last reviewed commit: "Restore partial deformable write index c..."

cart_idx = robot.body_names.index("cart")
raw_wrench = _ovphysx_incoming_joint_wrench(sensor)
assert torch.any(raw_wrench[:, cart_idx, :] != 0.0)
# Checked against analytic loads by the shared ``test_joint_wrench_frame`` imported above.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Interior joint check removed The removed cartpole test was the only check here that an interior joint reports a nonzero wrench. The shared analytic test checks only the Arm in a single-joint articulation, and the remaining multi-body tests compare sensor output with the same raw binding. They could pass if both returned zero for an interior joint, allowing that regression to go unnoticed.

Knowledge Base Used: Omniverse backend

cart_idx = robot.body_names.index("cart")
raw_wrench = _ovphysx_incoming_joint_wrench(sensor)
assert torch.any(raw_wrench[:, cart_idx, :] != 0.0)
# Checked against analytic loads by the shared ``test_joint_wrench_frame`` imported above.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Unused scene configuration remains Removing the cartpole at-rest test leaves _CartpoleDampedSceneCfg with no users in this test module. It now adds fixture code to maintain without exercising any test; remove it along with the test.

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!

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isaac Lab Review Bot

The test-only OVPhysX audit consolidates redundant coverage and strengthens previously ineffective assertions without changing production behavior. The retained tests continue to cover material writes, selective resets, contact-threshold authoring, joint-wrench correctness, and buffer reinterpretation.

  • Design and architecture: The consolidation paths were traced to their retained coverage: joint-wrench pass-through checks defer to the shared analytic frame test, full-reset assertions are incorporated into the selective-reset test, and structured-buffer and float32 passthrough behavior remains covered by the existing read-identity tests. These changes align with the repository guidance to remove overlapping tests while retaining distinct behavioral coverage.
  • API: No production API, public symbol, export, or configuration contract changes. The only non-test addition is an appropriate .skip changelog fragment for this non-user-facing test audit. CPU-only parametrization is limited to USD-authoring and backend-dispatch checks whose asserted behavior is not device-specific.
  • Implementation: The added assertions use existing fixtures and imports with device-compatible tensors. The IMU reset test now verifies both clearing the selected environment and preserving an unselected environment, while the material test establishes that sampled ranges exclude the fixture defaults before checking the resulting values. The skipped placeholder failures remain intentionally dormant until their skip markers are removed, serving as a guard against future vacuous activation.

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.

@StafaH
StafaH marked this pull request as draft September 24, 2026 19:26
Consolidate same-fixture rebuilds into keeper tests, delete per-backend
replays of backend-independent helpers and tests of test fixtures, trim
parametrize axes that select no distinct code path, and repair assertions
that could not fail.

Repairs found real test defects: the made-floating-base test mutated the
shared FRANKA_PANDA_CFG, so later panda tests ran on a floating robot that
went non-finite while test_apply_joint_command's weak assertion passed; the
articulation-root rigid-object fixture file contains no cube, so its guard
test passed for an unrelated reason and is now a strict xfail documenting
that OVPhysX has no ArticulationRootAPI guard.
- Fold the frame-transformer scene rebuilds into one Anymal+cube scene
  with five sensors, carrying every assertion.
- Fold IMU/PVA sanity tests (initialization, freefall, gravity at rest,
  pose_w packing, projected gravity, print, indirect attachment, env_ids)
  into the analytic constant-velocity/acceleration, offset, and reset keepers.
- Drop the joint-wrench identity copier, the cartpole shape duplicate, and
  the print test; the reset keeper now reads public data after a full reset
  (isaac-sim#4970 guard).
- Delete contact tests that cannot run (production raises
  NotImplementedError for friction/contact points) and a vacuous no-filter
  test; trim parametrize axes that reach no new branch. Keep the aged-clock
  row at 2.5 s, since 10 s passes with a fixed 1e-8 tolerance.
- Drive the material randomization test through the public term so the
  backend dispatch is covered, and merge the body-subset guard into it.
- Prune OVRTX kernel, USD, contract, and shader-cache duplicates, private
  attribute checks, and source greps; remove the uncollected check scripts.
…ation review

The installed-model test is the only check that HIERARCHY_COMPUTATION_MODEL is computed from the installed OVStage version (fails when the constant is hard-coded). The ray-caster tripwires make a static-tracking fallback fail explicitly instead of through an unpatched stage lookup.
Also remove a helper the pruning left unused.
@StafaH StafaH changed the title Audit OVPhysX tests with the test-audit skill Prune OVPhysX tests with the test-audit skill Sep 25, 2026
@StafaH StafaH changed the title Prune OVPhysX tests with the test-audit skill [Tests] Prune OVPhysX tests with the test-audit skill Sep 25, 2026
@StafaH
StafaH marked this pull request as ready for review September 25, 2026 01:36
@StafaH

StafaH commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 25, 2026
@pytest.mark.parametrize("device", ["cuda:0", "cpu"])
def test_reversed_joint_ordering_joint_state_index_writes_backend_order(sim, selection, device):
"""Write full and partial indexed joint state through a nonidentity public joint axis."""
def test_reversed_joint_ordering_joint_state_index_writes_backend_order(sim, device):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Ordered acceleration goes unchecked The deleted test was the only check that joint acceleration is converted from backend order to public order. This retained test checks ordered positions, velocities, dynamics, and writes, but never reads joint_acc. A regression in the separate acceleration calculation could therefore pass the suite.

Knowledge Base Used: Omniverse backend

Comment on lines +2814 to +2817
# The public getters expose the same coefficients.
torch.testing.assert_close(articulation.data.joint_friction_coeff.torch, friction)
torch.testing.assert_close(articulation.data.joint_dynamic_friction_coeff.torch, dynamic_friction)
torch.testing.assert_close(articulation.data.joint_viscous_friction_coeff.torch, viscous_friction)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Ordered friction reads go unchecked The removed friction test checked these getters with a nonidentity joint order. The new assertions use identity-ordered joints, so they would not catch friction values returned in backend order for a reordered articulation.

Knowledge Base Used: Omniverse backend

@pytest.mark.parametrize("device", ["cpu"])
def test_com_orientation_write_invalidates_static_inertia_cache_with_body_ordering(sim, device):
"""A COM rotation refreshes the static inertia cache in non-identity body order."""
"""Partial COM writes and COM rotations follow non-identity body order.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Ordered wrench composition goes unchecked The removed test checked that a body-frame wrench uses the selected physical body's pose when body order differs from backend order. This retained test checks COM writes and inertia instead. A wrench sent to the wrong body or rotated using the wrong pose would no longer be caught here.

Knowledge Base Used: Omniverse backend

@ooctipus

Copy link
Copy Markdown
Collaborator

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 25, 2026
@ooctipus
ooctipus merged commit ae94c3c into isaac-sim:develop Sep 25, 2026
53 checks passed
@ooctipus
ooctipus deleted the test/audit-ov-tests branch September 25, 2026 05:40
ooctipus added a commit that referenced this pull request Sep 25, 2026
…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.
@ooctipus ooctipus self-assigned this Sep 25, 2026
@ooctipus ooctipus added this to the Isaac Lab 3.0 GA milestone Sep 25, 2026
StafaH added a commit that referenced this pull request Sep 25, 2026
…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]>
@marcodiiga marcodiiga mentioned this pull request Sep 28, 2026
5 tasks done
StafaH added a commit that referenced this pull request Oct 26, 2026
## Summary

This is a test-side follow-up to #8818. I audited the slowest CI test
files package by package (core, Newton, PhysX/OV, tasks/standalone),
using per-case junit times from a recent PR run and the
`isaaclab-auditing-tests` criteria.

The main finding is that most slow files are slow for real reasons:
one-time Kit or Warp warmup in the first case, or axes that really reach
different backends or assets. They are not slow because they repeat each
other. Recent audits (#8010 and others) had already pruned a lot. So
this PR is a small set of high-confidence cuts, plus two CI changes that
save the most time.

The diff has no production changes: 21 lines added, 176 removed, all in
tests and CI.

## Changes

**CI routing (largest time savings)**
- **Standalone demos jobs now run only the launch matrix.** Both demos
jobs were re-running the file's 40 supervisor, AST-discovery and
script-wiring tests. Those tests ignore the runtime group and already
pass in `isaaclab (core) [1/3]`. That was about 58 s of test time per
demos job (measured in junit). I checked locally that the new `-k` still
collects all 16 demo launch cases.
- **Newton solver-matrix kernels are now warmed after merges.**
`test_initialize_solver_populates_canonical_state[kamino_internal_contacts]`
took 142 s in CI, and almost all of it is compiling Kamino's collision
detector: 1.7 s with a warm cache. Nothing in the post-merge warmer
compiles Kamino, so this case is the long pole of the `isaaclab_newton`
job. The file is now in `warp-cache-warm`.

**Removed tests, each with its keeper**

| Removed | Keeper |
|---|---|
| `test_franka_pose_abs` (OSC) |
`test_franka_pose_abs_with_nullspace_centering` uses the identical
controller config plus a nullspace term.
`..._fixed_impedance_with_gravity_compensation` keeps the
`nullspace_control="none"` branch. |
|
`test_{training,play}_dispatches_libraries_to_explicitly_named_adapters`
(8 cases) | These string-matched the private
`dispatch._RL_WORKFLOW_MODULES`. `test_training_and_play_write_bundles`
goes through the same dispatch map and asserts `run.framework ==
library`, which each adapter hard-codes. |
| `test_adapters_default_to_one_warmup_step` (8 cases) | The same bundle
test asserts `warmup_steps == 1` for every library in both train and
play. That value is `args_cli.warmup_steps`. |
| OV IMU/PVA `test_single_dof_pendulum` and `test_indirect_attachment` |
None needed. These were permanent `@skip` stubs whose bodies were just
`pytest.fail("port from …")`, pointing at PhysX tests that no longer
exist. |

**Parametrization**
- **OV `test_frame_transformer_duplicate_body_names`: 4 cases → 2.** Its
comment says each value is covered once, but device was crossed with the
path cases. Device is now folded into those two cases;
`test_frame_transformer_feet_wrt_base` still covers both devices.
- **Newton `test_filtered_contact_forces_and_points`: CUDA only.** It
was the only test in the file crossing device with the pipeline. The
file documents that the sensor has no device-specific path, and the
rotated lifecycle and horizontal-collision cases keep CPU coverage.

**Test quality**
- **`test_terrain_generator.py` no longer depends on test order.** Three
tests edited the module-level `ROUGH_TERRAINS_CFG` in place, so
`test_terrain_flat_patches` ran with whatever cache, seed and curriculum
settings an earlier test left. Each test now takes
`ROUGH_TERRAINS_CFG.copy()`, which is a deep copy.

## Checked and kept
- **The three backend env-smoke files** (PhysX, OvPhysX, Newton): each
forces a different physics preset.
- **The benchmark e2e over 4 RL libraries:** each library has its own
train and play adapter.
- **`test_valid_configs`** (131 s): it is the only per-asset spawn
contract.
- **Newton `test_newton_cfg_post_init_propagates_class_type`:** it costs
about 0 s, needs no simulation, and pinpoints the failure better than
the GPU test that would also catch it.
- **The 142 s Kamino case:** it is the only coverage of that solver
path. The fix is warming its kernels, not deleting it.
- **Big first-case times:** OSC 101 s, OV articulation 97 s, Newton
actuators-on-PhysX 113 s. These are app and kernel warmup.

## Follow-ups (not in this PR, lower confidence)
-
**`test_bam_actuator_mjwarp::test_native_pendulum_matches_recorded_trajectory[cpu-*]`**
(about 26 s, mostly CPU kernel compile). This is the only CPU-device run
of the full BAM trajectory against its golden; deciding whether to drop
it needs the actuator owners.
- **`test_rl_device_separation::test_sb3_device_separation_gpu`** could
fold into the SB3 case of `test_wrappers.py` by adding the numpy type
assertions there.
- **OV contact sensor `test_multi_body_per_sensor_indexing`** crosses
device with detail mode (8 cases). 4 rotated cases would still cover
each flag on and off.
- **OV IMU/PVA `test_reset` and
`test_no_stale_data_after_scene_reset`:** the CPU cases could move to
`test_devices(DeviceScope.CUDA)`.
- **Perf outliers to profile:** `Isaac-Reach-Franka-OSC` takes 103 s on
PhysX and 93 s on OvPhysX, vs 2 s on Newton.
`IsaacContrib-Velocity-Flat-UnitreeA1` takes 99 s, vs 14 s for the Rough
variant.

## Test plan
- [x] `test_terrain_generator.py`: 27 passed locally.
- [x] Newton `test_contact_sensor.py -k filtered`: passes on CUDA.
- [x] Standalone `-k` collects exactly the 16 launch-matrix cases (it
was 16 plus 24 duplicated cases).
- [x] `py_compile` on changed files, YAML load, pre-commit, and the
changelog check against upstream main.
- [ ] CI: the OSC (needs Kit) and OV (needs the `ovphysx` wheel) files
run in CI only. The benchmark adapter files already fail locally on the
baseline (missing `skrl`/`sb3`, no Kit) and run in CI.
- [ ] CI: the `warp-cache-warm` change only runs post-merge.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants