forge bridge: the stream forge keeps head-moved 7 days

Review round 1, must 6: the stream's definition names its keep, as the
manifest template states a stream's age (max-age-days).

Builds: design 47 H §739, H-A-23

Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy
This commit is contained in:
2026-11-20 05:51:33 +01:00
parent fbd75dfac4
commit af5d5f87dd
2 changed files with 7 additions and 4 deletions
@@ -18,8 +18,9 @@ import (
// rules of issue 1235 (ADR 0437 §4). The merge gate's module check proves the controller takes the manifest.
type stream struct {
Name string `json:"name"`
Events []string `json:"events"`
Name string `json:"name"`
Events []string `json:"events"`
MaxAgeDays int `json:"max-age-days"`
}
type state struct {
@@ -96,7 +97,9 @@ func TestManifestDeclarations(t *testing.T) { // 1235/AC1
if m.Module != "mesh-delivery-forge-bridge" {
t.Errorf("module = %q", m.Module)
}
if !reflect.DeepEqual(m.Streams, []stream{{Name: "forge", Events: []string{"forge.**", "owed.ended"}}}) {
// The stream forge keeps head-moved 7 days, its definition's keep; its size is the template's default (design 47 H
// §739, H-A-23).
if !reflect.DeepEqual(m.Streams, []stream{{Name: "forge", Events: []string{"forge.**", "owed.ended"}, MaxAgeDays: 7}}) {
t.Errorf("streams = %+v", m.Streams)
}
// What the gate owes the forge is its seat's event owed, heard on its own stream (design 47 *What the gate owes the
@@ -11,7 +11,7 @@
"mesh-broker.dropped"
],
"streams": [
{ "name": "forge", "events": ["forge.**", "owed.ended"] }
{ "name": "forge", "events": ["forge.**", "owed.ended"], "max-age-days": 7 }
],
"state": [
{ "name": "heads", "history": 1 },