Repository navigation
fix(vfox): flush downloaded files before returning - #10833
Conversation
Entire-Checkpoint: 513d37ab50aa
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds explicit file flush operations after write_all calls in two download functions within the Lua HTTP module, with corresponding error handling paths converted to Lua errors or nil/error tuples. ChangesDownload Flush Handling
Estimated code review effort: 1 (Trivial) | ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
Greptile SummaryThis PR fixes a CI flake in the vfox backend where downloaded files were occasionally read back as empty. The root cause was that
Confidence Score: 5/5Minimal, targeted fix that closes a real data-availability gap; no logic is altered beyond ensuring writes are settled before returning. The change adds two flush calls that were simply missing. Both follow the existing error-handling patterns in the file exactly, the new behavior is covered by the passing test suite, and there are no altered data paths or side effects outside the two functions. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "fix(vfox): flush downloaded files before..." | Re-trigger Greptile |
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.7.1 x -- echo |
24.0 ± 1.6 | 19.6 | 29.9 | 1.00 |
mise x -- echo |
25.4 ± 3.3 | 20.8 | 83.7 | 1.06 ± 0.15 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.7.1 env |
23.4 ± 1.6 | 20.5 | 28.8 | 1.00 |
mise env |
24.3 ± 1.5 | 20.3 | 31.2 | 1.04 ± 0.09 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.7.1 hook-env |
23.8 ± 1.1 | 20.6 | 29.8 | 1.00 |
mise hook-env |
25.1 ± 1.5 | 21.0 | 31.2 | 1.05 ± 0.08 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.7.1 ls |
19.9 ± 1.0 | 17.6 | 25.2 | 1.00 |
mise ls |
20.6 ± 1.2 | 17.2 | 27.3 | 1.04 ± 0.08 |
xtasks/test/perf
| Command | mise-2026.7.1 | mise | Variance |
|---|---|---|---|
| install (cached) | 187ms | 190ms | -1% |
| ls (cached) | 70ms | 71ms | -1% |
| bin-paths (cached) | 76ms | 79ms | -3% |
| task-ls (cached) | 150ms | 153ms | -1% |
Summary
tokio::fs::Fileafterwrite_allinhttp.download_filehttp.try_download_fileinstead of reporting success before bytes are settledtest_try_download_file_successCI flake from the release PR where the file was read back as emptyTest
mise --cd crates/vfox run test test_try_download_file -- --nocapturemise --cd crates/vfox run lintmise --cd crates/vfox run testThis PR was generated by an AI coding assistant.
Note
Low Risk
Small, localized change to plugin download I/O with clearer error handling on flush; no auth or data-model impact.
Overview
Fixes a race where vfox plugin HTTP downloads could return before bytes were visible on disk, which showed up in CI as empty files right after a successful download.
download_fileandtry_download_fileincrates/vfox/src/lua_mod/http.rsnow callflushon the output file afterwrite_all.try_download_filepropagates flush failures as an error instead of reporting success.Reviewed by Cursor Bugbot for commit 9c11a90. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit