test(events): reject replay apply without approval ref

ReplayPlan two-person apply already required digest match; this pins the missing ApprovalRef negative so dry-run tickets cannot skip the ticket field.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
weichen
2026-09-15 13:26:20 +00:00
co-authored by Cursor
parent 3a6d4f45dd
commit 1c04f17c8c
10 changed files with 4 additions and 0 deletions
+4
View File
@@ -27,6 +27,10 @@ func TestApplyReplayRequiresMatchingDigestAndTwoPerson(t *testing.T) {
if err := ApplyReplay(p, "deadbeef"); err == nil {
t.Fatal("digest mismatch must fail")
}
p.ApprovalRef = ""
if err := ApplyReplay(p, digest); err == nil {
t.Fatal("apply without approval ref must fail")
}
}
func TestLegacyAuthorizeReplayStillDryRunOnly(t *testing.T) {