RR-2: a kept event's stream is SEAT_<seat>_<event>

Builds: design 47 G §260, §396, §409

Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
2026-11-11 10:42:14 +01:00
parent 6b76c34ca3
commit b19fc7fa61
2 changed files with 12 additions and 2 deletions
+5 -2
View File
@@ -254,8 +254,11 @@ const (
KeepStream = "stream"
)
// KeptStream is the stream an event with Keep is kept in: `<seat>.<event>`, as a family is `<seat>.events`.
func KeptStream(seat string, m Message) string { return seat + "." + m.Name }
// KeptStream is the stream an event with Keep is kept in: `SEAT_<seat>_<event>` (design 47 G §260, §396).
func KeptStream(seat string, m Message) string { return KeptStreamPrefix + seat + "_" + m.Name }
// KeptStreamPrefix begins the name of every kept event's stream.
const KeptStreamPrefix = "SEAT_"
// legacyMode is the string form of Keep, empty for none or for the object form.
func (m Message) legacyMode() string {
+7
View File
@@ -266,3 +266,10 @@ func TestAnActingRuleReadsItsStepsDefaults(t *testing.T) {
}
}
}
// Design 47 G §260, §396: a kept event's stream is SEAT_<seat>_<event>.
func TestAKeptEventsStreamIsNamedFromTheSeatAndTheEvent(t *testing.T) {
if got := KeptStream("mesh-delivery", Message{Name: "owed"}); got != "SEAT_mesh-delivery_owed" {
t.Errorf("the stream is %s", got)
}
}