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:
@@ -369,6 +369,11 @@ func TestTheKnowledgeBaseOverTheBus(t *testing.T) {
|
||||
if g.Status != StatusProposed || len(g.Clauses) != 2 || g.Clauses[0].Holds != "proposed: not in force" {
|
||||
t.Fatalf("get: %+v", g)
|
||||
}
|
||||
// retract is served, its arguments read as an agent sends them: a proposed record is withdrawn, not retracted.
|
||||
if _, err := b.call(Seat+".retract", map[string]any{"number": 300, "clauses": []int{1}, "why": "never verified"}); err == nil ||
|
||||
!strings.Contains(err.Error(), "withdraw it instead") {
|
||||
t.Fatalf("retract of a proposed record over the bus: %v", err)
|
||||
}
|
||||
var h Historied
|
||||
_ = json.Unmarshal(must(b.call(Seat+".history", map[string]any{"number": 300, "from": 1, "to": 2})), &h)
|
||||
if len(h.Versions) != 2 || len(h.Diff) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user