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>
15 lines
370 B
Go
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)
|
|
}
|
|
}
|