diff --git a/pkg/behaviourtest/drivers/ci/githubactions/githubactions.go b/pkg/behaviourtest/drivers/ci/githubactions/githubactions.go index f33cb11bfc..d6e23df3f7 100644 --- a/pkg/behaviourtest/drivers/ci/githubactions/githubactions.go +++ b/pkg/behaviourtest/drivers/ci/githubactions/githubactions.go @@ -18,7 +18,7 @@ const ( pollInterval = 15 * time.Second dispatchWait = 12 * time.Minute dispatchPoll = 5 * time.Second - dispatchMaxTry = 24 + dispatchMaxTry = 48 artifactRunPoll = 5 * time.Second artifactRunWait = 5 * time.Minute diff --git a/pkg/behaviourtest/drivers/ci/githubactions/githubactions_test.go b/pkg/behaviourtest/drivers/ci/githubactions/githubactions_test.go index b80435adf6..1d7c3c0632 100644 --- a/pkg/behaviourtest/drivers/ci/githubactions/githubactions_test.go +++ b/pkg/behaviourtest/drivers/ci/githubactions/githubactions_test.go @@ -16,6 +16,17 @@ import ( "github.com/fullsend-ai/fullsend/internal/forge" ) +func TestDispatchDetectionWindow_AtLeast4Minutes(t *testing.T) { + t.Parallel() + + // The dispatch detection window is dispatchMaxTry × dispatchPoll. + // It must be at least 4 minutes to tolerate slow GitHub webhook + // delivery. See issue #5503. + window := time.Duration(dispatchMaxTry) * dispatchPoll + assert.GreaterOrEqual(t, window, 4*time.Minute, + "dispatch detection window (%v) should be at least 4 minutes", window) +} + func TestSelectWorkflowRun_ReturnsFailedRun(t *testing.T) { t.Parallel()