checker: its asks stream keeps its history, the bus's predefined form of an event family (V1; ADR 0592 §6; issue 1966)

Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
2026-11-05 17:32:54 +01:00
parent 947d0b82eb
commit 21110940b0
3 changed files with 6 additions and 4 deletions
@@ -21,7 +21,7 @@ import (
// checks, so a waiter on a verdict does not wake on it.
const EventTagWanted = meshdeliverychecker.HolderEventTagWanted
// AsksStream is the checker's stream that carries tag-wanted and verdict, in its old streams section (ADR 0619): the
// AsksStream is the checker's stream that carries tag-wanted and verdict, one that keeps its history (ADR 0592 §6): the
// bus names it ASKS.
const AsksStream = "asks"
@@ -38,6 +38,7 @@ type stream struct {
Name string `json:"name"`
Events []string `json:"events"`
MaxAgeDays int `json:"max-age-days,omitempty"`
Retention string `json:"retention,omitempty"`
}
type manifest struct {
@@ -147,8 +148,9 @@ func TestManifestDeclarations(t *testing.T) { // 1678/AC1
}
// The checker says each time it wrote a preview or a status, so the indexer's and the forge bridge's watches find the buckets (ADR 0484 clauses 2 and 3).
// Its family asks (design 51 *Tagged versions*, design 26): tag-wanted and verdict, seven days, apart from checks so a
// waiter on a verdict does not wake on a tag ask; in the old streams section (ADR 0619).
if want := []stream{{Name: "checks", Events: []string{"preview.**", "owed.**"}}, {Name: "asks", Events: []string{"verdict", "tag-wanted"}, MaxAgeDays: 7}}; !reflect.DeepEqual(m.Streams, want) {
// waiter on a verdict does not wake on a tag ask; a stream that keeps its history, the predefined form of an event family
// (ADR 0592 §6, the manifest validator).
if want := []stream{{Name: "checks", Events: []string{"preview.**", "owed.**"}}, {Name: "asks", Events: []string{"verdict", "tag-wanted"}, Retention: "history"}}; !reflect.DeepEqual(m.Streams, want) {
t.Errorf("streams = %+v, want %+v", m.Streams, want)
}
// The read tools (issue 1686) are served by the tools bundle, not by the checker's process.
+1 -1
View File
@@ -30,7 +30,7 @@
],
"streams": [
{ "name": "checks", "events": ["preview.**", "owed.**"] },
{ "name": "asks", "events": ["verdict", "tag-wanted"], "max-age-days": 7 }
{ "name": "asks", "events": ["verdict", "tag-wanted"], "retention": "history" }
],
"state": [
{ "name": "asks", "history": 1 },