Skip to content

ci(#5503): increase dispatch detection window to 4 minutes - #5506

Merged
ifireball merged 1 commit into
mainfrom
agent/5503-increase-dispatch-timeout
Jul 23, 2026
Merged

ci(#5503): increase dispatch detection window to 4 minutes#5506
ifireball merged 1 commit into
mainfrom
agent/5503-increase-dispatch-timeout

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

Changes

The only production change is the dispatchMaxTry constant: 2448. This extends the initial dispatch detection polling loop from 120s to 240s. The existing dispatchWait (12 minutes for workflow completion) is unchanged, so the new detection window is well within the overall timeout budget.

A new test (TestDispatchDetectionWindow_AtLeast4Minutes) validates that dispatchMaxTry × dispatchPoll ≥ 4 minutes, preventing future regressions if someone lowers the constant.

Testing

  • All 16 tests in pkg/behaviourtest/drivers/ci/githubactions/ pass, including the new regression test
  • go vet passes
  • Validation: track dispatch-timing failures over the next 20 behaviour test runs on main and PR branches — the rate should drop from the observed pattern (2+ per day) to zero or near-zero

Closes #5503

Post-script verification

  • Branch is not main/master (agent/5503-increase-dispatch-timeout)
  • Secret scan passed (gitleaks — 481aab26ab5d62c1b026c22ff6b19b0012e41a23..HEAD)
  • PR body secret scan passed (gitleaks — no-git)
  • Pre-commit hooks passed (authoritative run on runner)
  • Tests ran inside sandbox

The behaviour test dispatch detection polling loop used
dispatchMaxTry=24 × dispatchPoll=5s = 120s (2 minutes) to
detect whether GitHub Actions dispatched a workflow in
response to an issues event. When GitHub webhook delivery
is under load, this 2-minute window is exceeded, causing
false test failures that require human intervention to
retry (observed on PRs #5497 and #5498 on the same day
with unrelated code changes).

Raise dispatchMaxTry from 24 to 48, extending the
detection window to 48 × 5s = 240s (4 minutes). This stays
well within the existing dispatchWait of 12 minutes for
workflow completion. Add a regression test that asserts the
dispatch detection window is at least 4 minutes.

Note: pre-commit could not run (network 403 in sandbox).
Manual linting verification is required.

Closes #5503
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team as a code owner July 23, 2026 06:59
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Jul 23, 2026
@github-actions

Copy link
Copy Markdown

Site preview

Preview: https://424af7f4-site.fullsend-ai.workers.dev

Commit: abc4e163e52c3f4ba49cf0b93dd2cd4bec97cbdc

@fullsend-ai-review

fullsend-ai-review Bot commented Jul 23, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 7:02 AM UTC · Completed 7:11 AM UTC
Commit: abc4e16 · View workflow run →

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ifireball
ifireball enabled auto-merge July 23, 2026 07:06
@ifireball ifireball self-assigned this Jul 23, 2026
@ifireball
ifireball added this pull request to the merge queue Jul 23, 2026
@fullsend-ai-review

Copy link
Copy Markdown

Looks good to me


Labels: PR modifies behaviour test e2e driver for GitHub Actions dispatch detection.

@fullsend-ai-review fullsend-ai-review Bot added ready-for-merge All reviewers approved — ready to merge component/e2e End-to-end tests labels Jul 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 23, 2026
@ifireball
ifireball added this pull request to the merge queue Jul 23, 2026
Merged via the queue into main with commit 2e9abcc Jul 23, 2026
39 checks passed
@ifireball
ifireball deleted the agent/5503-increase-dispatch-timeout branch July 23, 2026 08:31
@fullsend-ai-retro

fullsend-ai-retro Bot commented Jul 23, 2026

Copy link
Copy Markdown

🤖 Finished Retro · ✅ Success · Started 8:33 AM UTC · Completed 8:44 AM UTC
Commit: abc4e16 · View workflow run →

@fullsend-ai-retro

Copy link
Copy Markdown

Retro: PR #5506 — ci(#5503): increase dispatch detection window to 4 minutes

This PR demonstrates an exemplary fully autonomous pipeline execution — from pattern detection to merged fix with zero rework.

Timeline

Time (UTC) Event
06:47 Retro agent detected flaky dispatch timing pattern across PRs #5497 and #5498, filed issue fullsend-ai/fullsend#5503
06:48–06:52 Triage agent classified as medium bug, added ready-to-code
06:52–06:59 Code agent implemented fix: dispatchMaxTry 24→48 + regression test ($2.03, 45 turns, 7 min)
06:59–07:11 Review agent ran 4 sub-agents (correctness, style, intent, docs) + challenger pass. One low-severity style finding dismissed by challenger as false positive. Final verdict: approve with zero findings (12 min)
07:06 First human approval (ifireball, no comments)
08:08 Second human approval (rh-hemartin, no comments)
08:31 PR merged
08:37 Issue #5503 auto-closed

What went well

  1. Full autonomous loop worked end-to-end: retro detection → issue filing → triage → code → review → merge. Total automated pipeline time: 24 minutes (issue to reviewed PR).
  2. Code agent quality: Chose the simplest correct approach (Option 1 from 3 proposed in the issue), added a regression test, ran all 16 tests + vet. Zero rework iterations.
  3. Review agent thoroughness: Despite the brief "Looks good to me" output, the review agent dispatched 4 specialized sub-agents in parallel (skipping security and cross-repo-contracts as irrelevant), ran an adversarial challenger pass, and correctly dismissed a false-positive style finding. The analysis depth matched the change appropriately.
  4. Issue quality: The retro agent's issue Behaviour test "Sandbox blocks disallowed outbound URL" is flaky due to webhook delivery timing #5503 was well-structured with specific failure evidence from 2 PRs, root cause analysis, 3 ranked solution options, and validation criteria.
  5. Cost efficiency: $2.03 for the code agent. Clean single-iteration pipeline.

Existing issues covering minor improvement areas

No new proposals

This workflow executed cleanly across all stages. The code was correct on the first attempt, the review was internally thorough, and the fix was appropriate for the problem. The minor improvement areas identified are already tracked by existing open issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/e2e End-to-end tests ready-for-merge All reviewers approved — ready to merge ready-for-review Triggers review agent dispatch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Behaviour test "Sandbox blocks disallowed outbound URL" is flaky due to webhook delivery timing

2 participants