perf(e2e): parallelize all E2E tests, fix openIndexDB race#45
Merged
Conversation
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>
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>
Member
Author
|
Fixed E2E test failures: pulled |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
t.Parallel()to all 28 active E2E tests acrosse2e_test.go,e2e_cli_test.go, ande2e_lang_test.go— tests now run concurrently instead of seriallyconfig.DBPathForProjectBase(dataDir, projectPath, model)to compute a DB path for an explicit data dir without touchingos.Setenv— the previousos.Setenv/restore pattern inopenIndexDBwas a goroutine raceTestE2E_CLI_IndexAndSearch,TestE2E_CLI_SearchLimit,TestE2E_CLI_SearchNoIndex) and their now-unusedregexp/strconvimportsmake e2etimeout from30m→10mto match the new parallel execution profileExpected CI wall-clock time: ~3–5 min (down from ~18–30 min, bound by Ollama throughput not serial scheduling).
Test plan
make e2ecompletes within 10 min with all tests passingCGO_ENABLED=1 go test -tags=fts5,e2e -timeout=10m -race -count=1 ./...reports no data racesgrep -n "t.Skip" e2e_cli_test.goreturns nothing🤖 Generated with Claude Code