pub fn validate_transition(
from: PendingState,
op: PendingOp,
) -> Result<TransitionResult>Expand description
Apply the state-machine matrix from specs/pending-system.md §4.
| from \ op | Gate | Ungate | MarkDone |
|---|---|---|---|
| Open | → Gated | error | → Done |
| Gated | no-op | → Open | → Done |
| Done | error | error | no-op |
Rationale (spec §4):
gatefrom Done is an error: a fully-complete item cannot be re-gated; the intended workflow is to add a new pending item describing the follow-up gate.ungatefrom Open or Done is an error: ungate is the inverse of gate, not a generic “reset” — it requires an explicit[/]source.Gateon Gated andMarkDoneon Done are idempotent no-ops, not errors, so the granular CLI flags can be re-run safely (skill retries, watch loops).