docs/generated/contracts.mdgenerated from code

Reference · 2 min read

api-checks

Contracts: api-checks.

Source: crates/lvcs-api/src/checks.rs.

ruston main
1/// `checks.list` (discussion:owner/427): the checks on `peer`'s latest saves (by2/// default the caller's), as the stop gate knows them: while some of the3/// files it changed through this daemon are held by no change-set frontier4/// yet (`unheld`), one check per action whose `paths` or `uses` those5/// files touch: `pending` (`waiting` while the change set can't move6/// without someone else), or its newest run's state while that run is7/// running or failed. Once every one is held, everything is decided, and8/// it shows every action at its newest run, the newest frontier its9/// channel ran.10#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]11pub struct ChecksListParams {12    /// A peer of the project, by alias or participant id.13    #[serde(default, skip_serializing_if = "Option::is_none")]14    pub peer: Option<String>,15}1617/// `checks.list` result: failing checks first, then by action.18#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]19pub struct ChecksListResult {20    #[serde(default)]21    pub checks: Vec<Check>,22    /// The files of the peer's latest saves no frontier holds yet, sorted.23    #[serde(default, skip_serializing_if = "Vec::is_empty")]24    pub unheld: Vec<String>,25}2627/// One action's check of the peer's latest saves.28#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]29pub struct Check {30    /// The action, which names its channel.31    pub action: String,32    /// A `check_state` value.33    #[serde(serialize_with = "vocab_to", deserialize_with = "vocab_from")]34    pub state: CheckState,35    /// The frontier it decided on, or runs or waits on, in36    /// `ID_ENCODING`; absent while `pending` with no frontier yet.37    #[serde(default, skip_serializing_if = "Option::is_none")]38    pub frontier: Option<String>,39    /// The run's id (`run.view`), when a run exists.40    #[serde(default, skip_serializing_if = "Option::is_none")]41    pub run: Option<String>,42    /// The runner's name, when a run exists.43    #[serde(default, skip_serializing_if = "Option::is_none")]44    pub runner: Option<String>,45    /// When its state was last set, in Unix milliseconds: the run's end,46    /// else its start.47    #[serde(default, skip_serializing_if = "Option::is_none")]48    pub at_ms: Option<i64>,49    /// Why a `waiting` check waits, and the step that moves it.50    #[serde(default, skip_serializing_if = "Option::is_none")]51    pub reason: Option<ErrorData>,52}5354/// Server push, JSON-RPC notification method `checks` (`watch`): a run55/// or a channel moved, so any peer's checks may have changed; a client56/// calls `checks.list` again.57#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]58pub struct ChecksPush {59    /// The `watch` it is pushed for.60    pub sub: u64,61    /// The channel that moved or whose run changed.62    pub channel: String,63}