On a run where 46 of 58 files failed, the GUI's headline card read:
COMPLETED
58 / 58 [████████████████████ full green bar]
and the pipeline said finished. The card immediately beside it, at a third of the size, read 12 ok · 46 failed.
A user glancing at the top of the window sees a completed run. The run was 79% failure.
Cause
The card is fed by dl_done / dl_total, and _dl_done is incremented on every terminal outcome, not just success — moon_engine.py lines 166, 178 and 194 cover the already-exists, ok and failure paths alike. It is an accurate count of files the engine has finished dealing with; it is displayed under a label that promises something else.
The DOWNLOAD 58 / 58 bar in the pipeline section has the same source and the same problem: it fills to 100% in success green regardless of how many of those files exist on disk.
The data needed to render this correctly is already in the same snapshot — ok and fail are right there, and the smaller card prints them.
What is needed
Decide what the headline number means and make the label and the bar agree with it. Say which you chose:
- Show successes:
12 / 58, with the bar filled to 12/58. Honest, and makes an in-progress run look slower than it is because a finished-but-failed file stops counting.
- Keep progress, colour the outcome: bar still reaches 100% because everything has been dealt with, but rendered in the failure colour, with
12 ok · 46 failed promoted so it cannot be missed at a glance.
The second is probably better — progress and outcome are genuinely two different things and the bar is the wrong place to encode outcome. But a full green bar on a run that mostly failed is not defensible in either reading.
Whatever is chosen, finished should not be the only word describing a run where most files did not arrive.
Acceptance criteria
Found by running the program: the run in question failed 46 files to a full disk and the interface reported it as finished.
On a run where 46 of 58 files failed, the GUI's headline card read:
and the pipeline said finished. The card immediately beside it, at a third of the size, read
12 ok · 46 failed.A user glancing at the top of the window sees a completed run. The run was 79% failure.
Cause
The card is fed by
dl_done/dl_total, and_dl_doneis incremented on every terminal outcome, not just success —moon_engine.pylines 166, 178 and 194 cover the already-exists, ok and failure paths alike. It is an accurate count of files the engine has finished dealing with; it is displayed under a label that promises something else.The
DOWNLOAD 58 / 58bar in the pipeline section has the same source and the same problem: it fills to 100% in success green regardless of how many of those files exist on disk.The data needed to render this correctly is already in the same snapshot —
okandfailare right there, and the smaller card prints them.What is needed
Decide what the headline number means and make the label and the bar agree with it. Say which you chose:
12 / 58, with the bar filled to 12/58. Honest, and makes an in-progress run look slower than it is because a finished-but-failed file stops counting.12 ok · 46 failedpromoted so it cannot be missed at a glance.The second is probably better — progress and outcome are genuinely two different things and the bar is the wrong place to encode outcome. But a full green bar on a run that mostly failed is not defensible in either reading.
Whatever is chosen,
finishedshould not be the only word describing a run where most files did not arrive.Acceptance criteria
tests/test_snapshot.pyis the place to pin whatever the metric ends up meaning — see test: Engine.snapshot() has no unit tests, and it is the contract every front-end depends on #57Found by running the program: the run in question failed 46 files to a full disk and the interface reported it as finished.