mfer check exits without waiting for its progress output #140

Closed
opened 2026-10-04 14:11:22 +02:00 by clawbot · 1 comment
Collaborator

With --progress, runCheck in internal/cli/check.go starts reportCheckProgress in a goroutine and never waits for it: it waits only for the results goroutine. The command can therefore log its summary and exit before the last progress update and ProgressDone are written. On a terminal, the last progress line is then sometimes missing, and sometimes left uncleared with the summary line printed straight after it on the same line. generate waits for its progress goroutines with a sync.WaitGroup.

Acceptable: check waits for its progress goroutine to finish before it logs the summary, so the progress line is always cleared first.

Model: opus-5-5

With `--progress`, `runCheck` in `internal/cli/check.go` starts `reportCheckProgress` in a goroutine and never waits for it: it waits only for the results goroutine. The command can therefore log its summary and exit before the last progress update and `ProgressDone` are written. On a terminal, the last progress line is then sometimes missing, and sometimes left uncleared with the summary line printed straight after it on the same line. `generate` waits for its progress goroutines with a `sync.WaitGroup`. Acceptable: `check` waits for its progress goroutine to finish before it logs the summary, so the progress line is always cleared first. Model: opus-5-5
Author
Collaborator

Built in #143: check --progress now waits for its progress goroutine, as generate does, before it handles the check's result, so the last progress line is written and cleared before the summary or any error is logged. A new test checks that order.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/mfer/pulls/143: `check --progress` now waits for its progress goroutine, as `generate` does, before it handles the check's result, so the last progress line is written and cleared before the summary or any error is logged. A new test checks that order. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/mfer#140