Skip to content

fix(debug-files): accurate upload count and preserve --require-all hint - #1167

Merged
BYK merged 1 commit into
mainfrom
byk/fix/debug-files-upload-count-hint
Jul 2, 2026
Merged

BYK merged 1 commit into
mainfrom
byk/fix/debug-files-upload-count-hint

Conversation

@BYK

@BYK BYK commented Jul 2, 2026

Copy link
Copy Markdown
Member

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.

Follow-up to #1146.

- `filesUploaded` counted every result, including the error/not_found
  entries that represent files the server (or the size gate) rejected —
  over-reporting the number of files actually uploaded. Compute `failures`
  before the summary and subtract them.
- When an upload failure or a size-drop returned first, the `--require-all`
  "missing requested debug id(s)" note was dropped from the hint (the exit
  code was still non-zero, but the feedback was lost). Append that note to
  whichever hint returns.
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/_preview/pr-1167/

Built to branch gh-pages at 2026-07-02 12:41 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

✅ Patch coverage is 100.00%. Project has 5133 uncovered lines.
✅ Project coverage is 81.55%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    81.51%    81.55%    +0.04%
==========================================
  Files          399       399         —
  Lines        27811     27815        +4
  Branches     18065     18081       +16
==========================================
+ Hits         22669     22682       +13
- Misses        5142      5133        -9
- Partials      1863      1865        +2

Generated by Codecov Action

@BYK
BYK merged commit 5ef9581 into main Jul 2, 2026
30 checks passed
@BYK
BYK deleted the byk/fix/debug-files-upload-count-hint branch July 2, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant