fix(bootstrap): keep snapshot progress bar live during ranged download#1026
Conversation
The bar only advanced once per completed 64 MiB chunk, so it sat still for seconds at a time and looked frozen even though the download was progressing. Increment progress as bytes arrive within each chunk (rolling a failed attempt's bytes back before retry so the count never overshoots the total), and enable a steady tick so the bar keeps redrawing while the downloader is blocked on window backpressure. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe ranged download helper ChangesRanged download progress bar improvements
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
Follow-up to #1025 (ranged ring-buffer snapshot download). During a bootstrap the progress bar looked frozen even though the download was clearly progressing.
Root cause
In the ranged downloader, progress was advanced once per completed 64 MiB chunk. So the bar sat motionless for seconds at a time while a chunk downloaded, then jumped — the opposite of the old single-stream path, which incremented on every small read and therefore looked smooth.
Fix
Verification
cargo build+cargo clippyclean.ranged_matches_direct_fetch,--ignored) passes, including itsprogress.position() == totalassertion — confirming per-read increments sum exactly to the total with no double-count.🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes