Skip to content

Add vector retrieve() and swellsense search - #49

Merged
xquantize merged 1 commit into
developfrom
agent/stage-4-retrieve
Oct 29, 2026
Merged

xquantize merged 1 commit into
developfrom
agent/stage-4-retrieve

Conversation

@xquantize

Copy link
Copy Markdown
Owner

XQU-39: Stage 4 slice 1 — vector retrieve() and swellsense search debug command.

Acceptance criteria:

  • tests/test_retrieval.py uses a fake embedder and a fake search function (no network, no DB) and checks: kind="query" is passed; k is passed through; public_only=True is always passed; an empty or whitespace query returns [] with neither fake called; k=0 raises ValueError; hits are returned in the order the search function gave them.
  • tests/test_cli.py covers search: output format (rank, 3-dp distance, title > section, URL, 25-word truncation), the No results. path, and the error path for both psycopg.OperationalError and openai.APIConnectionError returning exit code 1. connect and retrieve are monkeypatched.
  • README and AGENTS.md gain the uv run swellsense search "QUESTION" command and a src/swellsense/retrieval/ layout line. No roadmap item ticked.
  • bash scripts/check.sh prints CHECK PASSED
  • Only these files changed: src/swellsense/retrieval/__init__.py, src/swellsense/retrieval/search.py, src/swellsense/cli.py, tests/test_retrieval.py, tests/test_cli.py, README.md, AGENTS.md

Review: all checks passed. check.sh: CHECK PASSED locally.

Made with Cursor

Stage 4 slice 1: embed the query, nearest-neighbour search with public_only,
and a CLI to inspect hits without the chatbot.

Co-authored-by: Cursor <cursoragent@cursor.com>
@xquantize
xquantize merged commit 51e819e into develop Oct 29, 2026
1 check passed
@xquantize
xquantize deleted the agent/stage-4-retrieve branch October 29, 2026 09:11
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