The job status summary has one shape on every path
The rule
- A run's
job_status_summaryMUST carrytotaland one integer counter per job status of PIPE-10, with no status omitted. - The same key set MUST be published when the jobs are read successfully, when the run cannot be found, and when the read fails.
- In the latter two cases every counter MUST be zero.
- The job API's own
status_summaryMUST publish that same shape.
What it means
A run with no jobs yet, and a run whose jobs could not be read at all, both report the identical set of counters a run that ran normally would report — the same keys, only every one of them zero instead of populated. That parity is what lets a caller treat "we do not know yet" and "there is genuinely nothing" the same way it treats "there were zero of every status," rather than having to branch on which of several build paths happened to answer. The counter set itself is derived from nothing narrower than the whole job-status vocabulary of PIPE-10, so no path can leave out a status that another path counts.
Example
No jobs have run yet, so every counter is zero and none of the vocabulary's
statuses is missing, including dispatched and polling, which an
implementation that never uses them still counts at zero. The keys carry no
order.
{"total": 0, "idle": 0, "pending": 0, "dispatched": 0, "running": 0, "polling": 0, "interrupted": 0, "completed": 0, "failed": 0, "cancelled": 0, "skipped": 0}