Skip to content

Add E2E test suite#53

Merged
antoninbas merged 5 commits intomainfrom
e2e-tests
Apr 19, 2026
Merged

Add E2E test suite#53
antoninbas merged 5 commits intomainfrom
e2e-tests

Conversation

@antoninbas
Copy link
Copy Markdown
Owner

Summary

  • Adds a real 32-note + 4-log corpus with topically distinct vocabulary for reliable BM25 rank assertions
  • Implements a shared Harness class supporting both serverless (in-process) and server (subprocess HTTP) modes, with dynamic port allocation, proper HTTP error propagation, and embed completion polling
  • Adds four test files: search relevance (BM25 top-1, vector/hybrid top-3, negatives), CRUD round-trips, collection/minScore filters, and cross-mode parity checks (65 tests total)
  • Adds vitest.e2e.config.ts with fileParallelism: false for sequential execution; excludes e2e from the default vitest run
  • Adds e2e CI job with qmd model caching

Test plan

  • All 65 tests pass locally in both serverless and server modes (npx vitest run --config vitest.e2e.config.ts)
  • Default npx vitest run is unaffected (e2e excluded via exclude glob)
  • CI e2e job passes on GitHub Actions

🤖 Generated with Claude Code

antoninbas and others added 5 commits April 19, 2026 09:37
Implements a full end-to-end test suite covering both serverless and
server modes. Includes a 32-note + 4-log corpus, a shared test harness
with dynamic port allocation and HTTP error propagation, and CI
integration with qmd model caching.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The top-level `logs` gitignore entry was silently excluding
test/e2e/corpus/logs/; adding a negation exception to commit the
four corpus log files needed by the E2E harness.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When CI=true, qmd disables all LLM operations. This commit:
- Skips embed in serverless harness setup when CI=true
- Treats "failed" embed status as expected in CI (server mode)
- Marks all vector/hybrid search tests as skipIf(CI)
- Switches collection-filter tests from hybrid to bm25 mode so they
  run in CI without needing embeddings
- Reduces minScore:999 test to bm25 only (tests the filter logic,
  not the search mode)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The prior commit (51c98f9) worked around qmd's CI=true behavior by
skipping all vector/hybrid/parity tests whenever process.env.CI is set.
This defeats the point of the E2E suite — §6.1 and §6.5 of the plan
budget for 5 vector + 3 hybrid + 3 parity queries as the highest-signal
regressions to catch.

Revert the test-level skipIf(CI) changes and override CI="" for the
vitest step. qmd only checks CI in LlamaCpp._ciMode (llm.js:169); an
empty string makes that guard false without affecting any other
actions/setup behavior.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
CI="" tripped node-llama-cpp's env-var.asBool guard ("should be either
true, false, TRUE, FALSE, 1, or 0"). qmd's `!!process.env.CI` treats
any non-empty string (including "false" and "0") as truthy, so no single
sentinel value satisfies both deps. `unset CI` removes the variable so
qmd sees undefined (→ LLM enabled) and node-llama-cpp falls back to its
own "false" default.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@antoninbas antoninbas merged commit f435e74 into main Apr 19, 2026
7 checks passed
@antoninbas antoninbas deleted the e2e-tests branch April 19, 2026 20:31
@antoninbas antoninbas mentioned this pull request Apr 19, 2026
1 task
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