Skip to content

perf(e2e): parallelize all E2E tests, fix openIndexDB race#45

Merged
aeneasr merged 4 commits intomainfrom
speed-up-e2e
Mar 16, 2026
Merged

perf(e2e): parallelize all E2E tests, fix openIndexDB race#45
aeneasr merged 4 commits intomainfrom
speed-up-e2e

Conversation

@aeneasr
Copy link
Copy Markdown
Member

@aeneasr aeneasr commented Mar 16, 2026

Summary

  • Add t.Parallel() to all 28 active E2E tests across e2e_test.go, e2e_cli_test.go, and e2e_lang_test.go — tests now run concurrently instead of serially
  • Add config.DBPathForProjectBase(dataDir, projectPath, model) to compute a DB path for an explicit data dir without touching os.Setenv — the previous os.Setenv/restore pattern in openIndexDB was a goroutine race
  • Delete 3 permanently-skipped dead-code stubs (TestE2E_CLI_IndexAndSearch, TestE2E_CLI_SearchLimit, TestE2E_CLI_SearchNoIndex) and their now-unused regexp/strconv imports
  • Reduce make e2e timeout from 30m10m to match the new parallel execution profile

Expected CI wall-clock time: ~3–5 min (down from ~18–30 min, bound by Ollama throughput not serial scheduling).

Test plan

  • make e2e completes within 10 min with all tests passing
  • CGO_ENABLED=1 go test -tags=fts5,e2e -timeout=10m -race -count=1 ./... reports no data races
  • grep -n "t.Skip" e2e_cli_test.go returns nothing

🤖 Generated with Claude Code

Add t.Parallel() to all 28 active E2E tests across three files so the
CI suite runs concurrently instead of serially. Expected wall-clock time
drops from ~18–30 min to ~3–5 min (bound by Ollama throughput).

To unblock parallelism in the CLI tests, add config.DBPathForProjectBase
so callers can compute a DB path for an explicit data dir without
touching os.Setenv — the previous os.Setenv/restore pattern in
openIndexDB was not goroutine-safe. Delete the three permanently-skipped
dead-code stubs (IndexAndSearch, SearchLimit, SearchNoIndex) along with
their now-unused regexp/strconv imports. Reduce the e2e Makefile timeout
from 30m to 10m to match the new parallel execution profile.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@aeneasr aeneasr enabled auto-merge (squash) March 16, 2026 22:02
The all-minilm model now returns Base.route_missing instead of
Metal.url_for for the "route matching URL" query. Update snapshot
to reflect current model output.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@aeneasr
Copy link
Copy Markdown
Member Author

aeneasr commented Mar 16, 2026

Fixed E2E test failures: pulled all-minilm model and updated the Ruby route_matching_URL snapshot to reflect current model output (Base.route_missing instead of Metal.url_for).

aeneasr and others added 2 commits March 16, 2026 23:58
TestLang_* tests index large fixture codebases (21-31 files, 2000-5000
lines each) using CPU-only Ollama on GitHub Actions. This causes them
to exceed the 10m timeout — PHP and Python first subtests alone take
>10m due to embedding all chunks.

Fix: add e2e-lang Makefile target with -timeout=30m and -run TestLang_,
keeping e2e at 10m with -run TestE2E_. CI now runs both steps sequentially.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
metal.rb:229-232 Metal.url_for displaced sinatra-base.rb:1131-1140
Base.route_missing at the top-10 boundary due to minor score variation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@aeneasr aeneasr merged commit 1ae2993 into main Mar 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant