MH-0: an entry whose ask failed is asked again, at most entry-asks times, then unanswered
The node-engine consumes the entries client's asking again (H-A-60, H-A-110): the setting entry-asks (default 5; module.json config and file resource, read at the engine's start) goes to Entries.Asks; Entries.AskAgain is called at each link's start and on each catalog-revision the composer hears (the shadow's cache too); the finding entry-unanswered joins the engine's finding kinds, written with a journal line when an entry ends unanswered and cleared when it is answered or no longer wanted; the shadow's wait and the have's hold end on it instead of waiting without bound. Builds: design 47 H, H-A-60, H-A-110 Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy
This commit is contained in:
@@ -230,6 +230,17 @@ func caseAnEntryNotFoundIsAFindingOfTheFingerprint(t *testing.T) {
|
||||
if err := SayEntryNotFound(context.Background(), w, "n1", "mesh-host", fp, false, now); err != nil || len(w.cleared) != 1 || w.cleared[0].ID != w.put[0].ID {
|
||||
t.Fatalf("cleared %+v, %v", w.cleared, err)
|
||||
}
|
||||
// And design 47 H, H-A-60: an entry unanswered is the finding entry-unanswered, of the same scope and id, cleared by the same.
|
||||
u := &fakeFindings{}
|
||||
if err := SayEntryUnanswered(context.Background(), u, "n1", "mesh-host", fp, 5, true, now); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(u.put) != 1 || u.put[0].Kind != EntryUnansweredKind || u.put[0].Scope != "module" || u.put[0].ID != keys.EscapeName(fp) {
|
||||
t.Fatalf("written %+v", u.put)
|
||||
}
|
||||
if err := SayEntryUnanswered(context.Background(), u, "n1", "mesh-host", fp, 0, false, now); err != nil || len(u.cleared) != 1 || u.cleared[0].Kind != EntryUnansweredKind || u.cleared[0].ID != u.put[0].ID {
|
||||
t.Fatalf("cleared %+v, %v", u.cleared, err)
|
||||
}
|
||||
}
|
||||
|
||||
// ADR 0636 §1, the node's finding of a seat list unread.
|
||||
|
||||
Reference in New Issue
Block a user