ADR 0005: Stratified negation over stages

Decision

A stage may apply [:not [:stage-reached X]] only to stages in a strictly earlier stratum of the process graph (stratum = longest :after path depth). tik lint enforces this as an error. (A dedicated :not-stage alias for the same guard existed through plan v5 and was removed in the v6 subtraction — one spelling means the linter polices one shape.)

Context

[:not [:stage-reached X]] is negation inside a fixpoint — non-monotone. Without stratification, two stages in the same stratum can both derive in the same fixpoint sweep against the pre-sweep snapshot (e.g. :escalated guarded by [:not [:stage-reached :triaged]] co-deriving with :triaged), producing a state that is deterministic only by accident of iteration strategy. Datalog solved this decades ago: evaluate strata in order, negate only what earlier strata have finished deciding. Adopting the same rule makes determinism provable rather than incidental and connects the guard language to well-understood theory.

Negation over facts ([:not [:fact …]]) is unaffected: facts are inputs to the fixpoint, not derived by it.

Consequences

see history · edit this page