Skip to main content

Module tasks

Module tasks 

Source
Expand description

The task cluster on Workspace: the durable task store accessor and its mutation helpers, a second impl block beside crons.rs so every caller keeps its path.

The core polices the moves here, so no caller can talk a row into an impossible state: the verify gate lives in the transition into completed, closing is completing a root, a claim is one atomic write, a cancel of a row waiting on the user carries the reason it records, and every status change lands in the history.

Re-exportsΒ§

use std::time::SystemTime; πŸ”’
use forge_primitives::tasks::Verify; πŸ”’
use forge_primitives::tasks::Attestation; πŸ”’
use forge_primitives::tasks::By; πŸ”’
use forge_primitives::tasks::ReservedBy; πŸ”’
use forge_primitives::tasks::Task; πŸ”’
use forge_primitives::tasks::TaskId; πŸ”’
use forge_primitives::tasks::TaskStatus; πŸ”’
use forge_primitives::tasks::TaskTransition; πŸ”’
use forge_primitives::tasks::Waiting; πŸ”’
use forge_primitives::tasks::WaitingKind; πŸ”’
use crate::SessionSlot; πŸ”’
use crate::protocol::RankMove; πŸ”’
use crate::protocol::SessionUpdate; πŸ”’
use crate::workspace::Workspace; πŸ”’

StructsΒ§

IdCandidate πŸ”’
One row an ambiguous id could have named.

EnumsΒ§

ClaimError πŸ”’
Why a claim was refused.
IdError πŸ”’
Why a stated id did not land on exactly one row.
MoveError πŸ”’
Why a move was refused.

FunctionsΒ§

ambiguous_words πŸ”’
The rows an ambiguous id matched, as one line: each row’s id and what it is, so a caller picks one without going back to the board.
append_words πŸ”’
Append the user’s words to a row’s detail, keeping what was there. A blank append writes nothing - an empty detail is no detail, and a Some("") left by a wordless send-back would read as an empty ask.
bound_verify πŸ”’
The verify a row is bound by: the gate it was MINTED with, or none. An epic’s verify: user governs the epic’s own completion, never its children’s (#2423) - a child that owes no look is not parked on one because its epic carries the gate.
effective_verify πŸ”’
The verify the row at index is bound by.
find_task_index πŸ”’
Resolve a caller-stated id against a project’s live rows: an exact id, or a unique prefix of one, since a caller is often handed the short form a person writes.
is_terminal πŸ”’
Whether a status is an end: nothing more happens on the row.
parked_on_look πŸ”’
Whether a row is parked on the user’s own look - the verification wait the gate lands a user-bound completion on. The completion guard reads it: only the user’s approve completes such a row. A row merely BOUND by the gate, never parked on it, is work the caller may abandon.
parked_on_user πŸ”’
Whether a row presents as waiting on the user: a decision wait or a verification park. The removal guards and the withdraw door read this set - an ask on the user leaves by the user’s own answer or approve, or by a reasoned withdraw. The fleet count and the chase’s user nudge derive the same set from the stored fields.
wait_words πŸ”’
The words a refusal names a wait by: its kind, and the row it waits on when the wait names one.