Commit 5ef9581
authored
fix(debug-files): accurate upload count and preserve --require-all hint (#1167)
Follow-up to #1146, addressing two bot findings on that PR.
## 1. `filesUploaded` over-counted (Bugbot/Seer, Low)
#1146 surfaces size-dropped files as `error` results so a partial drop
exits non-zero. But `doUpload` reported `filesUploaded: results.length`,
which then included those `error`/`not_found` entries — over-reporting
the number of files actually uploaded in the JSON output.
Fixed: compute `failures` before the summary and report `results.length
- failures.length`.
## 2. `--require-all` hint dropped after a failure (Bugbot, Medium)
When an upload failure or a size-drop returned first, `doUpload`
returned before the `--require-all` branch, so the "missing requested
debug id(s)" note was omitted from the hint. The exit code was still
correctly non-zero, but the actionable feedback was lost.
Fixed: build a `requireAllNote` once and append it to whichever hint
returns (failure / size-drop), so the missing-id feedback is never
swallowed.
## Tests
- `filesUploaded excludes failed/dropped results` — mixed ok/error
results ⇒ `filesUploaded` counts only the ok one.
- `--require-all note is preserved alongside an upload failure` —
failure + missing required id ⇒ hint contains both "had failures" and
the missing id.
`typecheck`, `lint`, and the debug-files upload suite (36 tests) all
pass.1 parent 47cffe8 commit 5ef9581
2 files changed
Lines changed: 75 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
453 | 459 | | |
454 | 460 | | |
455 | 461 | | |
| |||
460 | 466 | | |
461 | 467 | | |
462 | 468 | | |
463 | | - | |
| 469 | + | |
464 | 470 | | |
465 | 471 | | |
466 | 472 | | |
| |||
471 | 477 | | |
472 | 478 | | |
473 | 479 | | |
474 | | - | |
475 | | - | |
476 | | - | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
477 | 487 | | |
478 | 488 | | |
479 | 489 | | |
| |||
483 | 493 | | |
484 | 494 | | |
485 | 495 | | |
486 | | - | |
| 496 | + | |
487 | 497 | | |
488 | 498 | | |
489 | 499 | | |
490 | 500 | | |
491 | 501 | | |
492 | 502 | | |
493 | | - | |
| 503 | + | |
494 | 504 | | |
495 | 505 | | |
496 | 506 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
464 | 523 | | |
465 | 524 | | |
466 | 525 | | |
| |||
0 commit comments