specs: Document Healthy status of continuous runs
Merged
SC
12d ago+11+11+01234567890123456789-0-0-0123456789
Summary
Spec 083 never said when the UI shows a continuous run as Healthy instead of
Running. This adds the rule that main already implements, so the spec and the
UI agree.
Changes
specs/083-continuous-runs.md, User Interface: a Running run reads Healthy
while a continuous step runs and no node has failed or been rejected, for
every DAG. A failed node, a stopped continuous step or any other run status
shows the normal status.- Test Scenarios: one scenario for the Healthy rule.
- Status: names the UI tests that check the Healthy status.
No runtime change. The UI behaves the same before and after.
Core change
The spec paragraph restates the one function that decides the status a run
shows, ui/src/lib/runDisplayStatus.ts:77-89:
export function runDisplayStatus(run: RunLike): RunDisplayStatus {
if (run.status !== Status.Running) return normal(run.status);
const nodes = run.nodes ?? [];
const failed = nodes.some(
(n) => n.status === NodeStatus.Failed || n.status === NodeStatus.Rejected
);
if (failed) return normal(run.status);
// A continuous step that repeats has the status Running between two runs.
const continuous = nodes.some(
(n) => n.status === NodeStatus.Running && isContinuousStep(n.step)
);
return continuous ? { status: run.status, ...HEALTHY } : normal(run.status);
}
Testing
cd ui && pnpm vitest run src/lib/__tests__/runDisplayStatus.test.ts:
16 passed. The new scenario is covered by the existing cases: Healthy for a
running continuous step, a failed or rejected node, a stopped continuous
step, a run that is not Running, and a repeat with a limit.- Every relative link in spec 083 resolves.
Performance
No risk: spec text only, no code or runtime change.
Summary by cubic
Documents the Healthy run status rule in spec 083: a running run reads Healthy while a continuous step runs and no node has failed, for every DAG. The earlier note tied Healthy to service DAGs only and linked to a nonexistent Spec 099; both are corrected, and the test scenario now points to the UI tests that check the behavior.