The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu
Go agent-ai-cliagent-harnessesagent-securitybrowser-extensionciclaude-codecloudcodexcursordetection-engineeringjevknowledge-basememorymobile-device-managementobservabilitysecuritysecurity-information-and-event-managementsecurity-toolstelemetrytraces
test(hooks): add endpointEventsIfAny for hooks that may write nothing
Claude5857d48bf0d7
diff --git a/cli/beacon-hooks/cmd/assistant_response_test.go b/cli/beacon-hooks/cmd/assistant_response_test.goindex 9fad2b26..52d396d2 100644--- a/cli/beacon-hooks/cmd/assistant_response_test.go+++ b/cli/beacon-hooks/cmd/assistant_response_test.go@@ -265,3 +265,13 @@ func TestKiroStopReplyEndToEnd(t *testing.T) {t.Fatalf("kiro agent.message = %#v, want one carrying assistant_response", messages)}}++// endpointEventsIfAny is endpointEvents for a log a hook may not have created at all.+func endpointEventsIfAny(t *testing.T, logPath string) []map[string]interface{} {+ t.Helper()+ data, err := os.ReadFile(logPath)+ if os.IsNotExist(err) || (err == nil && len(bytes.TrimSpace(data)) == 0) {+ return nil+ }+ return endpointEvents(t, logPath)+}