Skip to content

The job status summary has one shape on every path

The rule

Normative: this is the rule
  1. A run's job_status_summary MUST carry total and one integer counter per job status of PIPE-10, with no status omitted.
  2. The same key set MUST be published when the jobs are read successfully, when the run cannot be found, and when the read fails.
  3. In the latter two cases every counter MUST be zero.
  4. The job API's own status_summary MUST 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.

The zeroed summaryzeroed
{"total": 0, "idle": 0, "pending": 0, "dispatched": 0, "running": 0, "polling": 0, "interrupted": 0, "completed": 0, "failed": 0, "cancelled": 0, "skipped": 0}

Why

Recorded under OPEN-23, OPEN-25, OPEN-55.

Rule identifiers are permanent and are never renumbered. Each implementation publishes its own standing against these rules; this specification does not.spec 1.0 · PIPE-2 · changed in spec 1.1