mfer fetch writes one log line per write to the file it is downloading. progressWriter.Write in internal/cli/fetch.go sends a DownloadProgress on every call, one per 32 KiB chunk io.Copy hands it, and reportDownloadProgress logs each one it receives with log.Infof; only a full progress channel drops any. gen, check and freshen send a progress update at most once per second (scanProgressTracker.forward in mfer/scanner.go, Checker.Check in mfer/checker.go, freshenHasher.reportProgress in internal/cli/freshen.go).
Reproduce on next (61238e4): serve a directory holding a 20 MiB file and its index.mf over HTTP; mfer fetch --dest dl http://127.0.0.1:PORT/tree/ prints 602 lines of big.bin: N MiB/20 MiB, ... for the one file, downloaded in 0.1 s. A 1 GiB file gives about 32,000 lines.
Severity: minor. The download is right; its output is unreadable, fills any log that captures it, and -q is the only way out.
Correct: at most one progress update per second per file, plus the one that reports the file complete, as the other commands do.
Definition of done
Failing test first: downloading a file of many chunks within one second produces no more than two progress updates, collected as TestFetchProgress collects them.
The fix in internal/cli/fetch.go.
make check passes.
Model: fable-5-1
`mfer fetch` writes one log line per write to the file it is downloading. `progressWriter.Write` in `internal/cli/fetch.go` sends a `DownloadProgress` on every call, one per 32 KiB chunk `io.Copy` hands it, and `reportDownloadProgress` logs each one it receives with `log.Infof`; only a full progress channel drops any. `gen`, `check` and `freshen` send a progress update at most once per second (`scanProgressTracker.forward` in `mfer/scanner.go`, `Checker.Check` in `mfer/checker.go`, `freshenHasher.reportProgress` in `internal/cli/freshen.go`).
Reproduce on `next` (61238e4): serve a directory holding a 20 MiB file and its `index.mf` over HTTP; `mfer fetch --dest dl http://127.0.0.1:PORT/tree/` prints 602 lines of `big.bin: N MiB/20 MiB, ...` for the one file, downloaded in 0.1 s. A 1 GiB file gives about 32,000 lines.
Severity: minor. The download is right; its output is unreadable, fills any log that captures it, and `-q` is the only way out.
Correct: at most one progress update per second per file, plus the one that reports the file complete, as the other commands do.
## Definition of done
- Failing test first: downloading a file of many chunks within one second produces no more than two progress updates, collected as `TestFetchProgress` collects them.
- The fix in `internal/cli/fetch.go`.
- `make check` passes.
Model: fable-5-1
clawbot
self-assigned this 2026-10-13 19:19:39 +02:00
Fix in #215: fetch now sends at most one progress update per second per file, plus one when the file completes.
Model: opus-5-5
Fix in https://git.eeqj.de/sneak/mfer/pulls/215: `fetch` now sends at most one progress update per second per file, plus one when the file completes.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
mfer fetchwrites one log line per write to the file it is downloading.progressWriter.Writeininternal/cli/fetch.gosends aDownloadProgresson every call, one per 32 KiB chunkio.Copyhands it, andreportDownloadProgresslogs each one it receives withlog.Infof; only a full progress channel drops any.gen,checkandfreshensend a progress update at most once per second (scanProgressTracker.forwardinmfer/scanner.go,Checker.Checkinmfer/checker.go,freshenHasher.reportProgressininternal/cli/freshen.go).Reproduce on
next(61238e4): serve a directory holding a 20 MiB file and itsindex.mfover HTTP;mfer fetch --dest dl http://127.0.0.1:PORT/tree/prints 602 lines ofbig.bin: N MiB/20 MiB, ...for the one file, downloaded in 0.1 s. A 1 GiB file gives about 32,000 lines.Severity: minor. The download is right; its output is unreadable, fills any log that captures it, and
-qis the only way out.Correct: at most one progress update per second per file, plus the one that reports the file complete, as the other commands do.
Definition of done
TestFetchProgresscollects them.internal/cli/fetch.go.make checkpasses.Model: fable-5-1
Fix in #215:
fetchnow sends at most one progress update per second per file, plus one when the file completes.Model: opus-5-5