knowledge-base: retract an accepted record or its clauses on the operator's Approve
The operator prefers removing a wrong decision to stacking a correcting record on it, and withdraw took only reserved or proposed records. retract asks the operator through the router like a record that needs the operator, and changes nothing until the Approve; a retracted record or clause no longer holds in ask, holds, get, links and progress, history keeps every version, and the whole-set rules still read a retracted record's links so a retraction alone raises no finding. withdraw with retraction true takes a waiting one back.
This commit is contained in:
@@ -475,7 +475,9 @@ func JudgeSet(records []*Record) []Finding {
|
||||
l Link
|
||||
}{}
|
||||
for _, r := range records {
|
||||
if !r.Accepted() && r.Status != StatusSuperseded {
|
||||
// A retracted record's links stay read here: what it cited stays cited, what it changed or superseded stays
|
||||
// so, and a retraction alone never makes a rule fail.
|
||||
if !r.Accepted() && r.Status != StatusSuperseded && r.Status != StatusRetracted {
|
||||
continue
|
||||
}
|
||||
for _, l := range r.Links {
|
||||
@@ -525,14 +527,14 @@ func JudgeSet(records []*Record) []Finding {
|
||||
}
|
||||
switch l.Kind {
|
||||
case LinkSupersedes:
|
||||
if target.Status != StatusSuperseded {
|
||||
if target.Status != StatusSuperseded && target.Status != StatusRetracted {
|
||||
add("supersession", fmt.Sprintf("%s supersedes %s, which is %s", k, to, target.Status), k, to)
|
||||
}
|
||||
case LinkChanges:
|
||||
if l.To.Clause == 0 {
|
||||
continue
|
||||
}
|
||||
if c := target.Clause(l.To.Clause); c != nil && c.Status != ClauseChanged && c.Status != ClauseSuperseded {
|
||||
if c := target.Clause(l.To.Clause); c != nil && c.Status != ClauseChanged && c.Status != ClauseSuperseded && c.Status != ClauseRetracted {
|
||||
add("partial", fmt.Sprintf("%s changes %s §%d, which is %s", k, to, l.To.Clause, c.Status), k, to)
|
||||
}
|
||||
case LinkExtends, LinkRestsOn:
|
||||
@@ -554,7 +556,7 @@ func JudgeSet(records []*Record) []Finding {
|
||||
}
|
||||
by := false
|
||||
for _, in := range inbound[k] {
|
||||
by = by || (in.l.Kind == LinkChanges && in.l.To.Clause == c.N && in.from.Accepted())
|
||||
by = by || (in.l.Kind == LinkChanges && in.l.To.Clause == c.N && (in.from.Accepted() || in.from.Status == StatusRetracted))
|
||||
}
|
||||
if !by {
|
||||
add("partial", fmt.Sprintf("%s §%d is changed and no accepted record changes it", k, c.N), k)
|
||||
|
||||
Reference in New Issue
Block a user