Commit 9d7286b
pit: raise the paste ceiling to 1000 and stop on the clock, not a count
A real paste hit the old cap: 195 claimed, "389 past the 200 limit, not
attempted" — and nothing said what to do about the 389.
Two changes.
The ceiling goes 200 -> 1000, but it is no longer the thing that usually stops
a paste. Claiming now runs against a 20s budget and stops when the budget is
spent. A count cannot know how slow the database is today; the failure it was
guarding against was a request dying halfway with no report of what landed, and
a clock guards that directly. A fast database gets through hundreds, a slow one
stops early, and neither ends as a timed-out request whose result nobody sees.
The budget is checked before each write and never before the first, so an
already-slow database still claims one rather than reporting a paste that did
nothing and looks broken.
Whatever is left is now named and actionable: "N not attempted — paste them
again to carry on", covering both the over-ceiling and out-of-time cases, which
are the same problem from the user's side.
Caught while testing: the single-ending shortcut in summarizeBulkClaim did not
know about leftovers, so one claim plus four unattempted reported as ".x is
yours." and silently lost the four.
6 more tests. 262 across the pwa suite.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 54402e8 commit 9d7286b
3 files changed
Lines changed: 96 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | | - | |
120 | | - | |
121 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
122 | 136 | | |
123 | | - | |
| 137 | + | |
124 | 138 | | |
125 | 139 | | |
126 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
578 | 578 | | |
579 | 579 | | |
580 | 580 | | |
| 581 | + | |
581 | 582 | | |
582 | 583 | | |
| 584 | + | |
| 585 | + | |
583 | 586 | | |
584 | 587 | | |
585 | 588 | | |
586 | 589 | | |
587 | 590 | | |
588 | 591 | | |
589 | 592 | | |
590 | | - | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
591 | 600 | | |
592 | 601 | | |
593 | 602 | | |
| |||
619 | 628 | | |
620 | 629 | | |
621 | 630 | | |
622 | | - | |
| 631 | + | |
623 | 632 | | |
624 | 633 | | |
625 | 634 | | |
| |||
654 | 663 | | |
655 | 664 | | |
656 | 665 | | |
657 | | - | |
| 666 | + | |
| 667 | + | |
658 | 668 | | |
659 | 669 | | |
660 | 670 | | |
| |||
671 | 681 | | |
672 | 682 | | |
673 | 683 | | |
674 | | - | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
675 | 688 | | |
676 | 689 | | |
677 | 690 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
0 commit comments