Commit 3bcd74c
Gates the failure cap on generation_guarantee, as its own docstring promised
Review on #7433 caught a contradiction I introduced: the field's docstring says it is meaningful
only together with generation_guarantee, but the loop check ran unconditionally. With the guarantee
off and a cap below generation_num_trials, a fixed-attempt run would have ended before delivering
the attempts it was asked for.
The guarantee is also the only mode that needs the cap. Without it the existing check already stops
on generation_num_trials attempts, so there is no unbounded run to bound and the cap has nothing to
add. Gating the condition makes the code match the contract rather than loosening the contract to
match the code.
The attempt-mode test was parametrised over caps of None and 100 against 10 requested attempts, so
it never exercised a cap that could fire; a cap of 3 is added, which is the case the reviewer
identified as uncovered.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JFz91VMgmrjS4XR6f9Q9Z21 parent c7e64b5 commit 3bcd74c
3 files changed
Lines changed: 17 additions & 8 deletions
File tree
- source
- isaaclab_mimic
- isaaclab_mimic/datagen
- test
- isaaclab/isaaclab/envs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
145 | 147 | | |
146 | | - | |
| 148 | + | |
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
114 | 118 | | |
115 | 119 | | |
116 | 120 | | |
| |||
0 commit comments