mirror of
https://github.com/BaaRai/ARTEX.git
synced 2026-11-13 11:40:53 +08:00
Add intercept_pending.decided_by (human | rule | model | system; empty while pending or for rows decided before the column existed). Approval semantics are unchanged: only the actor is recorded. - rule-matched and model-judged rows written by CreateDecidedIntercept record rule or model; - ResolveIntercept takes the actor explicitly and rejects any other value before touching the database; - Decide (human allow/deny) records human; timeouts and work-cancelled denials record system. Work-cancelled is a system refusal, not a human one. - decided_by is exposed on the pending and approval records and filterable with decided_by=human|rule|model|system (anything else is a 400). - Legacy rows show decision_source as their actor when decided_by is empty. The filter uses the stored column only, so decided_by=model cannot match older human decisions or timeouts. - Archive restore fills decided_by for archives that predate the column, and marks a restored pending row as system.