Skip to content

ci(#5441): enable parallel godog concurrency (default 12) - #5636

Merged
ifireball merged 2 commits into
mainfrom
agent/5441-enable-godog-concurrency
Jul 27, 2026
Merged

ci(#5441): enable parallel godog concurrency (default 12)#5636
ifireball merged 2 commits into
mainfrom
agent/5441-enable-godog-concurrency

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

Enable parallel godog scenario execution in the behaviour suite, defaulting to GODOG_CONCURRENCY=12 (matching the repo pool size). This removes the serial-only guard that was in place while per-scenario isolation prerequisites were being built.

Related Issue

Closes #5441 (child of epic #3454)

Changes

  • e2e/behaviour/suite_test.go: Remove the serial-only guard that fataled on GODOG_CONCURRENCY != 1. Parse GODOG_CONCURRENCY from the environment as an integer (default 12) and pass it to godog.Options.Concurrency.
  • Makefile: Add -race to the behaviour-test target so concurrent scenarios are validated under the Go race detector.
  • docs/guides/dev/behaviour-testing.md: Document GODOG_CONCURRENCY env var, the default of 12, and how to use serial mode (GODOG_CONCURRENCY=1) for debugging.

Testing

  • go vet -tags behaviour ./e2e/behaviour/ passes
  • go test -tags behaviour -run "^$" ./e2e/behaviour/ compiles successfully
  • make go-test passes for all packages (pre-existing infra failures in internal/binary, internal/cli, internal/fetch are unrelated)
  • GODOG_CONCURRENCY=12 make behaviour-test — requires live GitHub infra (CI validation)
  • GODOG_CONCURRENCY=1 make behaviour-test — serial fallback (CI validation)

Checklist

  • PR title follows Conventional Commits (correct type, ! for breaking changes)
  • No workflow file changes (avoiding GitHub App workflows permission limitation)
  • CI picks up default concurrency of 12 without needing e2e.yml env var changes

Closes #5441

Post-script verification

  • Branch is not main/master (agent/5441-enable-godog-concurrency)
  • Secret scan passed (gitleaks — 70e5d9132d67e0afd75632ceeed7f77c738d8ba8..HEAD)
  • PR body secret scan passed (gitleaks — no-git)
  • Pre-commit hooks passed (authoritative run on runner)
  • Tests ran inside sandbox

Remove the serial-only guard in suite_test.go that rejected
GODOG_CONCURRENCY != 1. The suite now parses GODOG_CONCURRENCY
from the environment as an integer, defaulting to 12 (matching
the repo pool size). Per-scenario World cloning, repo pool
leasing, lazy ensure, and ephemeral fork aliasing are all in
place from the four prerequisite issues (#5437-#5440), so
concurrent scenarios no longer share mutable state.

Add -race to the behaviour-test Make target so the race
detector validates concurrent scenarios during CI runs.

Document the GODOG_CONCURRENCY env var in the behaviour
testing guide, including how to set concurrency and fall
back to serial mode for debugging.

Closes #5441
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team as a code owner July 27, 2026 10:28
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Jul 27, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Jul 27, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 10:30 AM UTC · Completed 10:44 AM UTC
Commit: f902ffe · View workflow run →

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

Site preview

Preview: https://e7f9a111-site.fullsend-ai.workers.dev

Commit: 4cee34ea49f21e506b899c728331a11ab1666e09

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

Medium

  • [pool-concurrency mismatch] e2e/behaviour/suite_test.go:80 — The repo pool size is hardcoded to 12 (NewRepoPool(12)) while godog concurrency is configurable via GODOG_CONCURRENCY. If a user sets GODOG_CONCURRENCY above 12, extra godog workers will block in pool.Acquire waiting for a lease, silently capping real parallelism at 12 with no error or warning.
    Remediation: Add a validation check after computing concurrency that fatals or warns if concurrency > 12. Do NOT use NewRepoPool(concurrency) as the sole fix because the pool org only has 12 enrolled repos (test-repo-01 through test-repo-12) with per-repo mint enrollment — creating pool entries for test-repo-13+ would fail at runtime due to missing enrollment. The simplest correct fix is: if concurrency > 12 { t.Fatalf("GODOG_CONCURRENCY=%d exceeds repo pool size 12", concurrency) }. Alternatively, derive a const for the pool size and use it in both places.

  • [stale-doc] docs/guides/dev/behaviour-drivers.md:35 — Line 35 states that numbered test-repo-01 through test-repo-12 "are also enrolled for planned parallelization; the driver does not select them yet." This is now incorrect: the PR enables parallel execution by default and NewRepoPool(12) actively leases these repos to concurrent scenarios.
    Remediation: Update the sentence to reflect that parallel execution is now enabled and the numbered repos are actively leased from the RepoPool.


Labels: PR modifies e2e behaviour test suite and test documentation

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the review comment for full details.


Note: The following inline comments could not be posted on the diff (GitHub returned 422) and are included here instead:

  • e2e/behaviour/suite_test.go (file-level): Line 80 · [medium] pool-concurrency mismatch

The repo pool size is hardcoded to 12 (NewRepoPool(12)) while godog concurrency is configurable via GODOG_CONCURRENCY. If a user sets GODOG_CONCURRENCY above 12, extra godog workers will block in pool.Acquire waiting for a lease, silently capping real parallelism at 12 with no error or warning.

Suggested fix: Add a validation check after computing concurrency that fatals or warns if concurrency > 12. Do NOT use NewRepoPool(concurrency) as the sole fix because the pool org only has 12 enrolled repos with per-repo mint enrollment. The simplest correct fix is: if concurrency > 12 { t.Fatalf("GODOG_CONCURRENCY=%d exceeds repo pool size 12", concurrency) }.

@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment component/e2e End-to-end tests component/docs User-facing documentation labels Jul 27, 2026
@ifireball

Copy link
Copy Markdown
Member

/fs-fix

@fullsend-ai-coder

fullsend-ai-coder Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 11:13 AM UTC · Completed 11:24 AM UTC
Commit: f902ffe · View workflow run →

Add poolSize const (12) and validate that GODOG_CONCURRENCY does not
exceed it — previously extra godog workers would silently block in
pool.Acquire. Also update behaviour-drivers.md to reflect that numbered
test-repo-NN repos are now actively leased during parallel execution.

Addresses review feedback on #5636
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 1 (human-triggered)

Addressed both review findings: (1) added poolSize const and validation guard preventing GODOG_CONCURRENCY from exceeding repo pool size, and (2) updated stale documentation in behaviour-drivers.md to reflect that parallel execution is now enabled.

Fixed (2):

  1. pool-concurrency mismatch (e2e/behaviour/suite_test.go): Added poolSize const (12) used by both the GODOG_CONCURRENCY validation and NewRepoPool call. Added a t.Fatalf guard when concurrency exceeds poolSize so extra godog workers no longer silently block.
  2. stale-doc (docs/guides/dev/behaviour-drivers.md): Updated line 35 to state that numbered test-repo-01 through test-repo-12 are now actively leased from world.RepoPool during parallel execution, replacing the outdated 'planned parallelization' language.

Tests: passed

Updated by fullsend fix agent

@ifireball
ifireball added this pull request to the merge queue Jul 27, 2026
Merged via the queue into main with commit 403da3a Jul 27, 2026
15 checks passed
@ifireball
ifireball deleted the agent/5441-enable-godog-concurrency branch July 27, 2026 11:49
@fullsend-ai-retro

fullsend-ai-retro Bot commented Jul 27, 2026

Copy link
Copy Markdown

🤖 Finished Retro · ✅ Success · Started 11:52 AM UTC · Completed 12:07 PM UTC
Commit: 4cee34e · View workflow run →

@fullsend-ai-retro

Copy link
Copy Markdown

Retro: PR #5636 — enable parallel godog concurrency

Verdict: Workflow executed well. The code→review→fix pipeline completed in ~1.5 hours with one rework iteration. All improvement areas are already tracked by existing open issues — no new proposals.

Timeline

Time (UTC) Event
10:15 Code agent dispatched via /fs-code on #5441
10:28 PR #5636 created (14-min run)
10:29–10:44 Review agent ran (run 30258248835), found 2 medium findings
11:12 Human (ifireball) triggered /fs-fix (~28 min after review)
11:12–11:24 Fix agent ran (run 30261028296), fixed both findings ($1.34, 34 turns)
11:19 Human approved — no additional findings
11:49 PR merged

What went well

  • Review quality was strong. The review agent found two genuine issues: (1) a pool-concurrency mismatch where GODOG_CONCURRENCY > 12 would cause workers to silently block in pool.Acquire, and (2) stale documentation in behaviour-drivers.md claiming parallelization was "planned" when the PR enables it. Both findings were validated by the human choosing to fix them.
  • Challenger sub-agent worked correctly. It filtered out 2 noise findings (trivial code-comment-clarity and duplicate documentation accuracy) while retaining the 2 genuine ones.
  • Fix agent was efficient. Addressed both findings in a single iteration: added a poolSize const with validation guard and updated the stale doc line. One rework cycle, $1.34.
  • No false positives. The human approved without additional comments, confirming the review and fix were both correct.

Evidence for existing issues

Non-issues investigated

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

Labels

component/docs User-facing documentation component/e2e End-to-end tests ready-for-review Triggers review agent dispatch requires-manual-review Review requires human judgment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci(e2e): enable GODOG_CONCURRENCY for behaviour suite (default 12)

1 participant