fabric/store/discovery

Storage-owned discovery of idle dependencies, job reads and wait deadlines, and of approval requests that expire (agent.with_approval_expiry, graph.with_approval_expiry). This projection is a scheduling hint, never permission to execute. Recovery must revalidate the stored attachment and deployed definition through the registered root.

Types

pub type Trigger {
  Changed(
    dependencies: List(run.RunId),
    deadline: option.Option(Int),
  )
  Poll(every: Int, deadline: option.Option(Int))
  At(due: Int)
}

Constructors

  • Changed(
      dependencies: List(run.RunId),
      deadline: option.Option(Int),
    )
  • Poll(every: Int, deadline: option.Option(Int))
  • At(due: Int)

    Absolute UTC Unix milliseconds; backend time alone judges eligibility.

key identifies one observation scope. It excludes run incarnation and execution revision so recovering an unchanged wait cannot make it new work.

pub type Wait {
  Wait(run: run.RunId, key: String, trigger: Trigger)
}

Constructors

Values

pub fn encode(stored_id: String, encoded: String) -> String

Metadata for a backend index. Check its version and source revision before using it. Unknown or misfiled records retain only the projection version.

pub fn inspect(
  encoded: String,
) -> Result(option.Option(Wait), Nil)

Inspect supported records without deployed code. Unknown/corrupt records fail; readable records without an automatic wait return None.

pub const version: Int

Bump when a record format or state changes discovery eligibility or keys. Backends must refresh older projections before using them for scheduling.

✨ Search Document