Address SQA bug: list variations without policy.#951
Conversation
🤖 Isaac Lab-Arena Review BotSummarySmall, well-scoped fix: Findings🟡 Warning: policy_runner.py:179 — Test CoverageThis is a bug fix, and VerdictMinor fixes needed |
Greptile SummaryThis PR fixes a bug where
Confidence Score: 4/5The change is logically correct and fixes the reported bug; the only weak point is a user-facing validation guard that can be silenced by Python's optimizer. The refactoring cleanly separates the --list_variations path from policy loading, and making --policy_type optional with a manual check is the right approach. However, the guard is implemented as an assert statement, which Python's -O flag strips at runtime — leaving get_policy_cls(None) to be called without any check in an optimized environment. Using args_parser.error() would be the correct idiom here. The assert on line 179 of policy_runner.py is the only line that needs attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[main] --> B[get_isaaclab_arena_cli_parser]
B --> C[add_policy_runner_arguments\n--policy_type default=None]
C --> D[parse_known_args]
D --> E{args_cli.list_variations?}
E -- Yes --> F[list_variations\nargs_parser]
F --> F1[get_isaaclab_arena_environments_cli_parser]
F1 --> F2[parse_known_args]
F2 --> F3[get_arena_builder_from_cli]
F3 --> F4[print variations catalogue]
F4 --> G[return]
E -- No --> H{policy_type is None?}
H -- Yes --> I[args_parser.error\n--policy_type is required\n currently uses assert]
H -- No --> J[get_policy_cls]
J --> K[get_isaaclab_arena_environments_cli_parser]
K --> L[get_arena_builder_from_cli]
L --> M[rollout_policy]
Reviews (1): Last reviewed commit: "Address SQA bug, list variations without..." | Re-trigger Greptile |
Summary
Address issue that listing variations used to fail without a policy specified.
Detailed description