Skip to content

fix: stop bandwidth measurements on terminal HTTP errors - #155

Open
devandrepascoa wants to merge 4 commits into
mainfrom
apascoa/authorization-refresh-recovery
Open

fix: stop bandwidth measurements on terminal HTTP errors#155
devandrepascoa wants to merge 4 commits into
mainfrom
apascoa/authorization-refresh-recovery

Conversation

@devandrepascoa

@devandrepascoa devandrepascoa commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator
  • surface HTTP status codes from bandwidth connection errors and stop the top-level engine for terminal responses
  • preserve retries for network failures, 408, 429, and 5xx responses
  • forward loaded-latency side-engine failures through the parent bandwidth engine
  • keep authorization tokens fixed for the lifetime of each engine instance

Comment thread src/index.ts Outdated
Comment thread src/index.ts Outdated
@ask-bonk

ask-bonk Bot commented Sep 2, 2026

Copy link
Copy Markdown

PR adds token replacement and treats HTTP authorization failures as terminal for bandwidth requests.

Submitted 2 inline correctness findings.

Validation passed: focused unit test, TypeScript check, oxlint, and format check.

github run

@devandrepascoa
devandrepascoa marked this pull request as ready for review September 2, 2026 15:39
@devandrepascoa

Copy link
Copy Markdown
Collaborator Author

/bonk

Comment thread src/index.ts
Comment thread src/engines/BandwidthEngine/BandwidthEngine.ts
Comment thread src/engines/BandwidthEngine/ParallelLatency.ts
@ask-bonk

ask-bonk Bot commented Sep 2, 2026

Copy link
Copy Markdown

Summary
Propagates bandwidth HTTP status codes through onError, stops the engine on non-OK responses, and adds HTTP-error E2E coverage.

Submitted 3 inline correctness findings.

Validation: git diff --check passed. Unit tests could not run because pnpm is unavailable in this environment.

github run

Comment thread src/engines/BandwidthEngine/BandwidthEngine.ts
@devandrepascoa devandrepascoa changed the title fix: stop measurements after authorization rejection fix: stop bandwidth measurements on terminal HTTP errors Sep 2, 2026
@cloudflare cloudflare deleted a comment from ask-bonk Bot Sep 2, 2026
@devandrepascoa
devandrepascoa marked this pull request as draft September 2, 2026 16:47
@devandrepascoa
devandrepascoa marked this pull request as ready for review September 2, 2026 16:51
andre-j3sus
andre-j3sus previously approved these changes Sep 3, 2026
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.

2 participants