Skip to content

Preserve Newton defaults across DexSim configuration API versions - #975

Open
han-xudong wants to merge 1 commit into
DexForce:mainfrom
han-xudong:fix/issue-904-review-newton
Open

han-xudong wants to merge 1 commit into
DexForce:mainfrom
han-xudong:fix/issue-904-review-newton

Conversation

@han-xudong

@han-xudong han-xudong commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Preserve the installed DexSim SDK's Newton solver default when the configuration API no longer exports AutoSolverCfg. Explicit auto mappings resolve to that same default type, including the grouped DexUni option layout; omitted solver configuration and explicit solver selection keep their SDK-defined behavior.

Refs #904. This is the independent Newton compatibility prerequisite; USD closed-loop support is handled separately. The existing SDK dependency pin is unchanged.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Screenshots

Not applicable.

Checklist

  • I have run the black . command to format the code base.
  • I reviewed affected documentation and agent context, updated it where needed, or explained why no update was needed.
  • Public API changes are reflected in the API docs (python docs/scripts/check_api_docs.py), if applicable
  • I verified appropriate behavioral coverage, reviewed the necessity of added or extended tests, and explained when no new tests were needed.
  • Dependencies have been updated, if applicable.

Validation

Validated source commit: 75dc1461488c3242680fadd4c4e104ca235ff195; base: 017968d4326c08c4c6d44aa7faddf7221d8d965f.

Check Result
black . using Black 26.10.1 Passed; no formatting changes
python docs/scripts/check_api_docs.py Passed
pytest tests/sim/test_sim_manager_cfg.py tests/sim/test_cfg.py tests/sim/test_startup_summary.py tests/sim/test_no_renderer.py --run-gpu -q with SDK 0.5.1 238 passed
Same affected suite with locally built SDK 0.5.1.dev2026110403 238 passed
Current PR CI Passed: run 41784517304, exact source commit above; lint, test-plan, documentation, simulation test, docs build and final Test gate succeeded; release-build intentionally skipped for this PR

The runtime cases exercise real NoRender stepping, reset and topology rebuild with explicit MuJoCo Warp and the SDK's default Newton solver. Existing production tests are extended for the missing export and explicit-auto boundaries; no tutorial tests are added. The schema comparison explicitly excludes three asset-loading adapter fields that are not owned by native shape configuration.

The code and docstring describe both SDK API families. Agent context was reviewed read-only and left unchanged at the user's explicit request. The current-SDK matrix uses an explicit local test override; it is not a claim that the candidate is available from the normal package index. This PR retains its existing dependency pin and does not merge or publish any artifact.

@han-xudong han-xudong added bug Incorrect existing behavior or a fix restoring the intended behavior. physics Physics backends, dynamics, contacts, fluids, deformables and physics solvers. dexsim DexSim SDK interfaces, version adaptation and integration. labels Nov 4, 2026
@greptile-apps

greptile-apps Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes reach Newton solver setup and its simulation checks.

The PR appears safe to merge, with a non-blocking test gap around explicit-auto solver options.

Fix All in CodexFindings

  1. P2 Auto options lack coverage ▶
Fix with agent prompt
### Issue 1
tests/sim/test_sim_manager_cfg.py:167-169
These explicit-auto cases supply no solver options, so they still pass if the new DexUni branch condition is reverted. Add a case where `auto` resolves to grouped `DexUniSolverCfg` and receives `iterations` and `step_rigid_bodies`. Check the resulting `vbd_options`, not just the compatibility attributes added with `setattr`. This would catch broken option forwarding without blocking this fix.

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!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Preserves the installed DexSim solver default without importing AutoSolverCfg.

  • Newton configs keep the solver default from the installed DexSim version.
  • The native shape-field test skips three adapter-only settings.

Reviews (1) · Last reviewed commit: "fix(sim): preserve Newton defaults acros..." · Reviewed by Greptile

Comment on lines +167 to +169
for solver_cfg in (None, {"solver_type": "auto"}):
converted = NewtonPhysicsCfg(solver_cfg=solver_cfg).to_dexsim_cfg(gpu_id=0)
assert converted.solver_cfg == newton_physics.NewtonCfg().solver_cfg

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Auto options lack coverage

These explicit-auto cases supply no solver options, so they still pass if the new DexUni branch condition is reverted. Add a case where auto resolves to grouped DexUniSolverCfg and receives iterations and step_rigid_bodies. Check the resulting vbd_options, not just the compatibility attributes added with setattr. This would catch broken option forwarding without blocking this fix.

Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/sim/test_sim_manager_cfg.py
Line: 167-169

Comment:
**Auto options lack coverage**

These explicit-auto cases supply no solver options, so they still pass if the new DexUni branch condition is reverted. Add a case where `auto` resolves to grouped `DexUniSolverCfg` and receives `iterations` and `step_rigid_bodies`. Check the resulting `vbd_options`, not just the compatibility attributes added with `setattr`. This would catch broken option forwarding without blocking this fix.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

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!

Fix in Codex Fix in Claude Code

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Incorrect existing behavior or a fix restoring the intended behavior. dexsim DexSim SDK interfaces, version adaptation and integration. physics Physics backends, dynamics, contacts, fluids, deformables and physics solvers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant