Split manager behavior from environment lifecycle tests#6576
Conversation
Separate simulator-free observation manager semantics from environment lifecycle coverage and verify the GUI gate constructs the real RL window.
Use focused doubles for recorder buffering and export semantics while retaining real environment step and close integration coverage.
Greptile SummaryThis PR splits simulator-free manager behavior verification from manager-based environment lifecycle coverage, moving
Confidence Score: 4/5The split is structurally clean and the new unit tests are well-isolated. One test in the new integration file calls env.close() twice on every run, which should be fixed before merge. Five of the six changed files are straightforward: shared factory adoption, boilerplate removal, and two new well-structured test files. The new integration test in test_recorder_manager_integration.py closes the environment inside the try block as the operation under test, then closes it again unconditionally in finally. ManagerBasedEnv.close() flushes the recorder and tears down the simulation context; calling it a second time can raise or silently misbehave. All other changes are test-only refactors with no production impact. source/isaaclab/test/managers/test_recorder_manager_integration.py — the try/finally structure always double-closes the environment. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[test_manager_based_env.py\nintegration] -->|uses| F[make_empty_manager_based_env_cfg\nshared factory]
B[test_manager_based_rl_env_ui.py\nintegration] -->|uses| G[make_empty_manager_based_rl_env_cfg\nshared factory]
C[test_observation_manager_history.py\nunit - NEW] -->|DummyEnv double| H[ObservationManager\nupdate_history semantics]
D[test_recorder_manager.py\nunit - refactored] -->|DummyEnv double| I[RecorderManager\nregistration + buffering + HDF5]
E[test_recorder_manager_integration.py\nintegration - NEW] -->|uses| F
E -->|ManagerBasedEnv| J[env.close exports\nbuffered recorder data]
A -->|ManagerBasedEnv| K[step advances\nobs history]
B -->|ManagerBasedRLEnv| L[has_gui gate controls\nwindow construction]
style C fill:#d4f5d4
style E fill:#d4f5d4
style J fill:#ffe0e0
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[test_manager_based_env.py\nintegration] -->|uses| F[make_empty_manager_based_env_cfg\nshared factory]
B[test_manager_based_rl_env_ui.py\nintegration] -->|uses| G[make_empty_manager_based_rl_env_cfg\nshared factory]
C[test_observation_manager_history.py\nunit - NEW] -->|DummyEnv double| H[ObservationManager\nupdate_history semantics]
D[test_recorder_manager.py\nunit - refactored] -->|DummyEnv double| I[RecorderManager\nregistration + buffering + HDF5]
E[test_recorder_manager_integration.py\nintegration - NEW] -->|uses| F
E -->|ManagerBasedEnv| J[env.close exports\nbuffered recorder data]
A -->|ManagerBasedEnv| K[step advances\nobs history]
B -->|ManagerBasedRLEnv| L[has_gui gate controls\nwindow construction]
style C fill:#d4f5d4
style E fill:#d4f5d4
style J fill:#ffe0e0
Reviews (1): Last reviewed commit: "test: Split recorder manager coverage" | Re-trigger Greptile |
Keep cleanup guaranteed through the finally block while performing post-close export assertions only after teardown succeeds.
Track real window construction through the public configuration seam so the GUI gate test does not depend on environment storage internals.
Explain the test-only unit and integration split while retaining the no-bump changelog fragment.
Keep the original observation behavior while retaining the named helper introduced by the manager test refactor.
Retain the original vectorized unit-test coverage while keeping the close test at its prior two-environment size.
Description
Split simulator-free manager behavior from manager-based environment lifecycle coverage:
ManagerBasedEnvinitialization, stepping, observation-history wiring, and recorder close/export integration testsObservationManager.compute(update_history=...)andRecorderManagerregistration, buffering, HDF5 creation, and direct-close behavior into focused unit testsThis is PR5 of the focused replacement series for #6526.
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there