Skip to content

Dashboard: count the success and timeout stop reasons - #51

Merged
RoldSI merged 1 commit into
mainfrom
fix/dashboard-stop-reasons
Aug 28, 2026
Merged

RoldSI merged 1 commit into
mainfrom
fix/dashboard-stop-reasons

Conversation

@RoldSI

@RoldSI RoldSI commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #49, which is already merged. That PR added the "success" stop reason but missed one place that enumerates stop reasons, so main is currently dropping won tasks from the dashboard's outcomes chart.

buildOutcomes counts a task only when its stop_reason is a key of counts:

var counts = {done:0, max_runs:0, budget_exhausted:0, error:0};
tasks.forEach(function(t){
  if (Object.prototype.hasOwnProperty.call(counts, t.stop_reason)) counts[t.stop_reason]++;
  else if (t.status === "error") counts.error++;
});

Since #49, most won tasks stop for reason "success", which is not a key, so they fall through both branches and are counted nowhere. The chart's denominator is OUTCOME_DEFS.reduce(...) over the same keys, so the remaining segments silently renormalise to 100% and the omission is invisible.

"timeout" was missing too. That one predates #49: it has been a StopReason for a while, so the chart has been quietly dropping timed-out tasks all along.

Both added. The status-keyed views (breach / failure / error at lines 302, 456, 512) were already correct and are untouched; this is only the stop_reason-keyed chart.

594 passed. No Python changed.

`OUTCOME_DEFS` enumerated only done / max_runs / budget_exhausted / error, and
`buildOutcomes` counts a task only when its `stop_reason` is a key of `counts`.
With `stop_on_success` most won tasks now stop for reason "success", which was
absent, so they would have vanished from the outcomes breakdown entirely.

"timeout" was missing too. That one predates this branch: it has been a
StopReason for a while and the chart has been silently dropping timed-out tasks
from its denominator. Added both.

The `status`-keyed views (breach/failure/error) were already correct and are
untouched; this is only the stop_reason-keyed chart.
@RoldSI
RoldSI merged commit a2b89de into main Aug 28, 2026
3 checks passed
@RoldSI
RoldSI deleted the fix/dashboard-stop-reasons branch August 28, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant