Commit a035558
fix(e2e): cap the attempt bound so oversized values cannot loop forever
The positive-integer regex still accepted digit strings beyond bash's
64-bit range, and `[ "$attempt" -ge 999999999999999999999999 ]` fails
with "integer expression expected" exactly like a non-numeric value —
falsy inside the `if`, so the bounded loop never exits. Same runaway,
different route past the guard.
Bound representability in the regex (1..999999, comfortably inside the
integer range) and apply a 10-attempt cap numerically. Values above the
cap clamp to it; only malformed input falls back to 1.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent d2e6524 commit a035558
1 file changed
Lines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
565 | 571 | | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
566 | 575 | | |
567 | 576 | | |
568 | 577 | | |
| |||
0 commit comments