Expand description
The chase sweep: the pass that makes the board drive instead of report.
Every pass derives crossings from the boardβs own marks and the chase log: a row past its estimate asks its owner once per estimate, a lead hears at the rungβs class cadence while its state holds, and a row that died, moved and died again is a new occurrence, named at once. The cadences are the settled two: five minutes for a state burning a resource (a drifting worker, a row at 1.5x its estimate), thirty for one parked and stuck (a dead row, a stalled queue, a stuck wait, a retro or a close owed). The chase log is the whole slate: every naming is deduped by it, so a restart re-reads it rather than re-firing, and a state that clears has its naming forgotten - off the log, where a fresh process reads - so a recurrence is named at once, whatever happened in between.
Delivery degrades, never wakes: a live owner is asked; with a dead owner the lead is; with every seat asleep the mark alone stands - except the user-wait nudge, whose one shot per row is kept unspent until a live lead takes it. A chase NEVER spawns a session - the board already shows the state, and waking a project is a cost the chase does not get to spend.
Re-exportsΒ§
use std::sync::Arc;πuse std::time::SystemTime;πuse forge_primitives::tasks::By;πuse forge_primitives::tasks::ChaseRung;πuse forge_primitives::tasks::TaskChase;πuse forge_primitives::tasks::TaskId;πuse forge_primitives::tasks::TaskStatus;πuse forge_primitives::tasks::TaskTransition;πuse forge_primitives::tasks::WaitingKind;πuse tracing::Instrument;πuse crate::SessionSlot;πuse crate::board::BoardRow;πuse crate::tasks::parked_on_user;πuse crate::workspace::Workspace;π
StructsΒ§
- Crossing
- One message the sweep decided to send.
- Prompt
Deliver π - The production delivery: a prompt into a live session, and the turn its words draw as.
EnumsΒ§
- Delivery
- What a delivery attempt found.
ConstantsΒ§
- CADENCE_
BURNING_ πSECS - The cadence of a rung whose state is burning a resource: a drifting worker, a row past 1.5x its estimate.
- CADENCE_
STUCK_ πSECS - The cadence of a rung whose state is parked and stuck: a dead row, a stalled queue, a stuck wait, a retro or a close owed.
- CHASE_
INTERVAL_ SECS - How long between sweeps. The same number bounds how stale a time-derived mark can be in a held client snapshot.
- WAIT_
RESOLVED_ πWINDOW_ SECS - How long after a wait resolves its message is still worth sending.
TraitsΒ§
- Deliver
- Where a chase message goes. A trait so tests can watch the ladder without a live session; the production impl injects a prompt.
FunctionsΒ§
- crossings π
- The crossings one projectβs board implies, given what already fired.
- due π
- Whether a recurring rung has waited out its cadence: it is due when
nothing fired since
since(the instant its state appeared, where the history says), or when the newest firing since then is at leastcadenceseconds old. - durable_
last_ πnamed - The logβs most recent naming of
labelby the seat-level rung. - failed_
at π - When a row last died, if the history says: a row that moved and died again is a new occurrence.
- fired_
already π - Whether
rungalready fired foridand this subject - a restated estimate changes the subject, which arms the nudge again. - fired_
since π - Whether
rungalready fired foridat or afterat- the shape a rung recurring with a new occurrence needs. - fmt_
secs π - ladder π
- The delivery ladder: the seat the crossing prefers when it is live, else the lead when it is, else nobody - and nobody means the mark alone stands.
- released_
at π - When a released wait landed, if one did: a transition out of waiting into pending that the core drove.
- retro_
prompt π - What an epicβs owner is asked when its children have all stopped: the numbers, computed here and authoritative, and the ask.
- since_
secs π - How long
nowis afterat, saturating: anatin the future reads as the longest age, so a skewed stamp never silences a rung. - waiting_
since π - When the row entered waiting, if the history says: the newest transition into waiting is the episode a user nudge is deduped on.