Files
Agent-System/internal/events/envelope_test.go
T
weichenandCursor bcb122ac53 feat(events): fail-closed scope, static registry, inventory, and replay digest
Reject empty environment/project, disable FAV consumers at register time, and keep historical classification/repair/replay as audited application use cases with no raw SQL entrypoint.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-15 08:52:30 +00:00

15 lines
370 B
Go

package events
import "testing"
func TestValidateEnvelopeRejectsMissingScope(t *testing.T) {
body := []byte(`{}`)
err := ValidateEnvelope(Envelope{
EventID: "e", EventName: EventApproved, SchemaVersion: EnvelopeSchema,
AggregateID: "d", PayloadDigest: Digest(body), Producer: "docflow", Payload: body,
})
if err != ErrInvalidScope {
t.Fatalf("%v", err)
}
}