mod: Phase 3 — lifecycle state machine + escalation + appeal, 106/106
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 54s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 54s
Pure SX state machine (lib/mod/lifecycle.sx) over the engine: open→triaged→decided→appealed→final, transition table guards illegal moves. Auto-tier resolves terminal actions; escalate parks at human-tier (resolve blocked until review supplies evidence). Appeal re-runs the engine — new exonerated-keep rule at top precedence lets exoneration override a prior hide. Api façade (mod/triage/resolve/review/appeal/finalize) over a case registry, logging committed decisions to the audit trail. +46 escalation tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,10 @@
|
||||
;; cond->goal takes an id-term so the same condition can be compiled with the
|
||||
;; head variable "Id" (for clause bodies) or a concrete report id (for proof-tree
|
||||
;; goal-by-goal re-querying in the engine).
|
||||
;;
|
||||
;; Precedence (top wins): exoneration evidence (appeal override) > confirmed-abuse
|
||||
;; evidence (human review) > spam/abuse classification > repeated-report count >
|
||||
;; default keep.
|
||||
|
||||
(define mod/mk-rule (fn (name action conds) {:when conds :name name :action action}))
|
||||
|
||||
@@ -19,6 +23,9 @@
|
||||
(define
|
||||
mod/default-rules
|
||||
(list
|
||||
(mod/mk-rule
|
||||
"exonerated-keep"
|
||||
:keep (list (list :evidence "exonerated")))
|
||||
(mod/mk-rule
|
||||
"reviewer-remove"
|
||||
:remove (list (list :evidence "confirmed-abuse")))
|
||||
|
||||
Reference in New Issue
Block a user