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:
@@ -245,6 +245,12 @@ func (k *KB) Reconcile() ([]string, error) {
|
||||
}
|
||||
var said []string
|
||||
for _, e := range all {
|
||||
if x := e.Current.Retracting; x != nil && x.Ask != nil && x.Ask.Said == AskWaiting {
|
||||
if s := k.reconcileRetraction(ctx, e); s != "" {
|
||||
said = append(said, s)
|
||||
}
|
||||
continue
|
||||
}
|
||||
w := e.Working()
|
||||
if w.Status != StatusProposed || w.Ask == nil || w.Ask.Said != AskWaiting {
|
||||
continue
|
||||
@@ -366,6 +372,10 @@ func (k *KB) HeardEnd(w asks.Warrant) {
|
||||
return
|
||||
}
|
||||
for _, e := range all {
|
||||
if x := e.Current.Retracting; x != nil && x.Ask != nil && x.Ask.ID == w.Ask {
|
||||
k.logf("[mesh-knowledge] %s", k.decideRetraction(ctx, e, w))
|
||||
continue
|
||||
}
|
||||
r := e.Working()
|
||||
if r.Ask != nil && r.Ask.ID == w.Ask && r.Ask.Said == AskWaiting {
|
||||
k.logf("[mesh-knowledge] %s", k.decide(ctx, e, r, w))
|
||||
|
||||
Reference in New Issue
Block a user