Skip to content

test: e2e coverage for PR #35 (default search mode) and PR #36 (summary removed) - #37

Merged
davidgut1982 merged 2 commits into
mainfrom
fix/e2e-client-and-pr-tests
Jun 2, 2026
Merged

test: e2e coverage for PR #35 (default search mode) and PR #36 (summary removed)#37
davidgut1982 merged 2 commits into
mainfrom
fix/e2e-client-and-pr-tests

Conversation

@davidgut1982

Copy link
Copy Markdown
Owner

Summary

Adds tests/e2e/test_pr35_pr36.py with 4 tests that lock in the behaviour introduced by PRs #35 and #36.

PR #35 — default search mode is now hybrid (not hardcoded fts)

handle_kb_search in server.py now reads LORE_SEARCH_MODE_DEFAULT (default "hybrid") instead of hardcoding "fts". The response includes requested_mode (intent, pre-degradation) and search_mode (executed mode).

Tests added (TestDefaultSearchMode):

  • test_no_mode_requests_hybrid — no mode arg → requested_mode == "hybrid"
  • test_explicit_fts_requests_ftssearch_mode="fts"requested_mode == "fts"
  • test_explicit_hybrid_requests_hybridsearch_mode="hybrid"requested_mode == "hybrid"

Note: assertions key off requested_mode not search_mode — staging has semantic search disabled so search_mode legitimately degrades to fts; requested_mode captures the caller's intent.

PR #36"summary" removed from search mode enum

Literal["summary"] was dropped from server_fastmcp.py's kb_search signature. Passing it must now surface as an MCP validation error.

Tests added (TestSummaryModeRemoved):

  • test_summary_mode_raisessearch_mode="summary" raises LoreClientError

Test results

Verified against lore-staging (CT 200, http://localhost:5556):

tests/e2e/test_pr35_pr36.py   4 passed
tests/e2e/test_kb_lifecycle.py  13 passed
======================== 17 passed in 13.85s ========================

🤖 Generated with Claude Code

davidgut1982 and others added 2 commits June 1, 2026 21:19
…ary removed)

- TestDefaultSearchMode: verifies kb_search with no mode arg resolves to
  requested_mode='hybrid' (PR #35 default), and explicit fts/hybrid are
  echoed correctly in requested_mode
- TestSummaryModeRemoved: verifies search_mode='summary' raises LoreClientError
  now that Literal["summary"] is dropped from the enum (PR #36)

All 4 tests pass against lore-staging (http://localhost:5556 on CT 200).
17/17 pass total with test_kb_lifecycle.py.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@davidgut1982
davidgut1982 merged commit 5a68336 into main Jun 2, 2026
3 checks passed
@davidgut1982 davidgut1982 mentioned this pull request Jun 2, 2026
@davidgut1982
davidgut1982 deleted the fix/e2e-client-and-pr-tests branch June 2, 2026 11:25
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