Skip to content

TUI never surfaces sweeps_refused: a refused auto-sweep looks identical to one that ran #603

Description

@pbean

#501 added RunState.sweeps_refused (trigger → not-started / failed / dirty) so that a run
whose deferred-work sweep was refused stops looking exactly like one that swept. It is surfaced on
four paths:

  • the end-of-run summary (Engine.summary() / RunSummary.render(), which also reaches the
    ATTENTION file and the desktop notification),
  • documents.status_document, hence bmad-loop status --json,
  • the human bmad-loop status print,
  • both bmad-loop diagnose renders.

The TUI is not one of them. src/bmad_loop/tui/ references neither sweeps_refused nor
sweeps_triggered, and tui/data.py reads state.json directly (through journal.load_state)
rather than going through status_document, so it picks up neither field for free.

An operator watching a run in the dashboard therefore still sees a run that swept and a run whose
sweep was refused as identical — the exact gap #501 closed on every other surface. Under
[sweep] auto = "run-end" there is one trigger per run and nothing re-asks it, so the refusal is
not something a later screen will reveal.

Real work rather than a rename: the field has to be read in tui/data.py and given a surface (the
run detail pane is the obvious home, beside the other terminal-state fields).

Follow-up to #501.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Robustness, enhancement, tests, or docs worth schedulingarea:deferred-workdeferred-work.md ledger and sweeparea:tuiTextual TUIenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions