Skip to main content

Module phase_outcome

Module phase_outcome 

Source
Expand description

SRD-76 phase outcome disposition (structured per-phase status + error list). SRD-76 — Phase Outcome Disposition.

Structured per-phase terminal-state record. One canonical shape carries both the per-phase status (Completed / Failed / Skipped / CursorSuspended) and the chronological error list, so the realtime status surface AND nmbrs replay consume from one projection.

This module is Push 1 of the SRD-76 migration plan: it defines the data model and provides the no-side-effects API. Push 2 wires the executor’s per-phase population; Push 3 adds sqlite persistence; Push 4 adds the new Readouts; Push 5 wires nmbrs replay.

Cross-refs:

  • SRD-03 §“Error scoping” — error-class strings here match the strings the errors: policy routes on.
  • SRD-44 §“Phase identity” — PhaseIdentity matches the checkpoint writer’s identity tuple.
  • SRD-68 §“I-6 Workload-load pre-flight is non-mutating” — op_template is the operator’s pristine YAML verbatim; op_resolved is the wire-rendered form.
  • SRD-63 — The Readout layer that will render this in Push 4.
  • SRD-75 — Phase-poll; poll_timeout is one of the error classes that lands here.

Structs§

Outcome
SRD-82 Part 1 — the two-axis result of any execution shell, and the effect of an SRD-83 stop condition. The four meaningful quadrants: Completed+Succeeded (clean), Completed+Failed (ran fully, garbage), Interrupted+Succeeded (partial, re-usable), Interrupted+Failed (partial, discard).
PhaseErrorDetail
One error recorded against a phase. Captures the originating cycle (when an op error), the dispenser’s pristine + resolved op text (per SRD-68), and the class string the errors: policy matches on.
PhaseIdentity
Phase identity tuple per SRD-44 §“Phase identity” — (name, labels). The combination is unique within a session: even sweep cells that share a phase name have distinct labels (the striated coord path).
PhaseOutcome
ResumeCursor
SRD-44 cursor-resume state. Stub for Push 1 (the resume machinery is independent of this SRD); future pushes populate it with the actual restart-cursor payload.

Enums§

Disposition
SRD-82 Part 1 — how much of a shell’s work ran. Orthogonal to Validity: a result can be Interrupted yet Succeeded (re-usable partial progress) or Completed yet Failed (ran fully but the result is garbage).
ReasonClass
SRD-76 — complete description of how a single phase ended. Built once at phase end by the executor, installed on the scene tree, optionally persisted to sqlite (Push 3), and rendered via the SRD-76 readouts (Push 4). SRD-83 (C3) — the closed vocabulary of failure-reason classes on a phase outcome. Derived from the first PhaseErrorDetail.class (see PhaseOutcome::reason_class); the stable strings below are the sqlite reason_class column values and the report-layer grouping keys.
SessionDisposition
Session-wide pass/fail disposition. Projected from the per-phase statuses by walking every populated PhaseOutcome on the scene tree.
Validity
SRD-82 Part 1 — whether the produced result is usable. Orthogonal to Disposition.

Traits§

Payload
SRD-92 / ExecUnification — the opaque return payload a unit may carry on its Outcome, above the leaf-projection boundary.