Repository navigation
Commit 7fa7a5d
fix(resilience): replace bare assert with -O-safe guard + cross-ref note
- Retry.__call__: assert last_exc is not None is stripped by python -O,
which would convert the structural invariant into an AttributeError
("NoneType has no attribute add_note") in optimized runtimes. Replace
with an if guard that raises AssertionError unconditionally.
- test_budget_exhausted_raises_retry_budget_exhausted_error: add a NOTE
warning Task 11 not to duplicate this test (it lives in Task 7 only
because the budget gate's RetryBudgetExhaustedError branch needs coverage
from the Retry-loop side).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 555bc6c commit 7fa7a5d
2 files changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
142 | 145 | | |
143 | 146 | | |
144 | 147 | | |
| |||
0 commit comments