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:
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user