Commit 1c95d6e
committed
refactor: standardize attempt counting
Remove Logger's +1 transformation and have all code pass current attempt
(1, 2, 3...) consistently throughout the codebase.
Previously, Logger added +1 internally, creating confusion about whether
code should pass 'current attempt' or 'checkpointed attempt'. This
standardization removes the hidden transformation.
Changes:
- Remove +1 from Logger.from_log_info() (logger.py line 75)
- Update StepContext to pass current attempt by adding +1 (step.py lines 205-208)
- Update logger tests to expect current attempt values
This ensures all components use the same convention: current attempt =
checkpointed attempts + 1, with no hidden transformations.1 parent 9d2a859 commit 1c95d6e
3 files changed
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
| 206 | + | |
206 | 207 | | |
207 | | - | |
| 208 | + | |
208 | 209 | | |
209 | 210 | | |
210 | 211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| |||
0 commit comments