Skip to main content

SCHEMA

Constant SCHEMA 

Source
pub const SCHEMA: u32 = 4;
Expand description

On-disk format for a queued task. Bumped when a field’s meaning changes.

4: added Task::blocked_from, the status a task had the moment it became TaskStatus::Blocked, so Task::unblock restores it instead of always landing on TaskStatus::Queued. Without it, a task a human or crate::triage had deliberately left TaskStatus::Held — machine or manual — would lose that the instant crate::conduct blocked it on a follow-up question, and come back Queued the moment the question was answered, regardless of what the answer said: exactly the loop where a task the operator told to stay held instead re-enters the competition queue every time someone answers a question about it. #[serde(default)] so an older record reads as None; Task::unblock then falls back to inferring Held from surviving hold evidence (Task::hold_reason / Task::hold_source, never cleared by Task::block) rather than guessing Queued outright — see Task::unblock’s own doc.

3: added HoldSource so conductor recovery cannot release a hold an operator deliberately placed. Old records default to None and are protected as operator-held until an explicit release; the safe direction when their author was never recorded.

2: added TaskStatus::Blocked, Task::blocked_by and Task::block_reason (crate::conduct’s decisions) and Task::answers (operator answers carried forward to the next conductor prompt and the next run’s instruction). All three are #[serde(default)], so [read_path] accepts anything up to and including this schema rather than only an exact match — a task written by a build that only knew about schema 1 has nothing to say about blocking or answers, and defaulting those fields is exactly as good a reading as a value that build never had a chance to write.