Skip to content

Cases for spec#8 (Steps) #8

Closed

Description

@marlon-sousa

Cases for itinera-dev/spec#8 (Steps)

Opened before the proposal is accepted, so the checklist exists while it is evaluated (waiting for spec). Updated on 2026-10-02 to match the agreed design in spec#8 (failures retriable or not; the Skipped outcome). The cases pull request may be merged once spec#8 is status: ready.

What the cases must check

Building a step

  • Each attempt gets a fresh step instance; nothing carries over from a failed attempt.
  • A step whose constructor fails aborts the journey (building fails), without entering the retry loop.

Running a step

  • An error or panic escaping a running step is an abnormal termination: it goes through the retry loop, and the hook can request the error.
  • A failure that is not retriable is terminal: by default the journey fails. A failure is not retriable unless the step says so.
  • A retriable failure is tried again by default while the retry budget lasts, and the retry hook receives its reason.
  • Failure carries a reason (code, message, details); the failure hook receives the code, message and details the step gave.
  • When retries run out, the failure hook is called with the cause "retries exhausted".

Skipped

  • A step that reports Skipped is out of the flow: no hook is called for it, and the next step runs.
  • A journey whose steps all ended as succeeded or skipped succeeds.
  • A skipped step's reason appears in the "step skipped" event.
  • A skipped step's contributions are discarded, and an event records it; a later step requiring such a key aborts the journey, and an optional one receives it absent.
  • A skipped step is final: it is never run again, and the result lists it as Skipped.

Contributions

  • Contributions are committed to the data bag only on success: a failed attempt's contributions, retriable or not, never reach later steps or the result.
  • Contributions are visible to that attempt's hooks whatever the outcome.
  • An abnormal termination carries no contributions.
  • The same key contributed twice in one attempt: the last value wins.
  • A committed contribution may overwrite a key already in the data bag; the last committed value wins, and the overwrite event is emitted.

Identity

  • Duplicate step names in one workflow are refused at admission.
  • Step names are case-sensitive: "Charge" and "charge" are different steps.

Activity

  1. added
    tier: 1
    implements-proposal
    waiting for spec
    on Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    implements-proposaltier: 1waiting for spec

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions