mod: Ext 7 — repeat-offender escalation (audit log as evidence), 223/223
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m13s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m13s
mod/subject-sanctions counts prior hide/remove/ban decisions about a subject from the append-only audit log; mod/decide-escalating upgrades a sanction to :ban when the subject has >= k priors. Non-sanction outcomes (keep/escalate) pass through. Closes the loop between audit and policy — the trail feeds future decisions. Own suite. +19 tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,7 @@ federation extension.
|
||||
|
||||
## Status (rolling)
|
||||
|
||||
`bash lib/mod/conformance.sh` → **204/204** (roadmap + 6 extensions complete)
|
||||
`bash lib/mod/conformance.sh` → **223/223** (roadmap + 7 extensions complete)
|
||||
|
||||
## Ground rules
|
||||
|
||||
@@ -147,6 +147,13 @@ lib/mod/fed.sx
|
||||
derivation goal-by-goal with `[proved]`/`[unproved]` marks and unification
|
||||
bindings. E.g. `Report rc: escalate (rule: repeated-escalate)` … `[proved]
|
||||
report(rc, B, S), report_count(S, N), N >= 3 {B=ann, N=3, S=dave}`.
|
||||
- [x] **Ext 7 — repeat-offender escalation** (`lib/mod/offenders.sx`, +19). The
|
||||
audit log as evidence: `mod/subject-sanctions` counts prior hide/remove/ban
|
||||
decisions about a subject; `mod/decide-escalating id k` decides normally then
|
||||
upgrades a *sanction* to `:ban` when the subject already has ≥k prior sanctions.
|
||||
Non-sanction outcomes (keep/escalate) pass through untouched. First decision
|
||||
whose input spans history beyond the single report — read from the trail, not
|
||||
re-derived.
|
||||
- [x] **Ext 6 — strictest-wins strategy** (`lib/mod/severity.sx`, +14). Alternative
|
||||
to first-match: `mod/decide-strictest` collects every proven rule (`pl-query-all`)
|
||||
and picks the highest-`mod/action-severity` action (keep<escalate<hide<remove<ban).
|
||||
@@ -165,6 +172,12 @@ lib/mod/fed.sx
|
||||
|
||||
## Progress log
|
||||
|
||||
- **Ext 7 — repeat-offender escalation, 223/223** (+19). Decisions can now depend
|
||||
on history: the append-only audit log is read back as evidence, and a subject
|
||||
with k prior sanctions has its next sanction upgraded to `:ban`. Closes the loop
|
||||
between audit (Phase 2) and policy — the trail isn't just a record, it feeds
|
||||
future decisions. Non-sanction outcomes never escalate (verified: a clean post
|
||||
that the count rule escalates stays `:escalate`, never `:ban`).
|
||||
- **Ext 6 — strictest-wins strategy, 204/204** (+14). A second decision strategy
|
||||
alongside first-match: collect all proven rules and apply the harshest sanction.
|
||||
Shows the substrate supports more than one precedence policy over the same rule
|
||||
|
||||
Reference in New Issue
Block a user