Skip to main content

live_row_identity

Function live_row_identity 

Source
pub fn live_row_identity(
    runner: &str,
    harness: &str,
    harness_step_ref: Option<&str>,
    run_id: &str,
    step_id: &str,
    attempt: u64,
) -> (String, String)
Expand description

The identity (harness, step_ref) of the row the provider serves for a step a runner announced on the bus (step.finished.v1), from that event’s members. Plain strings, so it needs nothing from the runner contract crate.

The live row must carry the identity of the row the provider later records from a durable read, or last-row-wins could not replace it:

  • With a harness_step_ref (the runner declares history_key: "harness" and the host’s own store is the durable source): harness is the event’s harness, the hosting program, and step_ref is the host’s record id.
  • Without one: harness is the event’s runner, the runner’s module id, and step_ref is <run_id>#<step_id>#<attempt>, with attempt in decimal and 1-based, as the runner contract pins it. Each attempt actually sent is its own row, because a billed retry is spend and its cache behaviour differs. For a runner that is its own durable source (history_key: "step_ref") this is the identity the provider gives the attempt when it reads the runner’s step log. For a host-keyed runner with no host record, the row stays live-only.