Copilot/fix backend GitHub actions job#11
Open
ScooterStuff wants to merge 27 commits into
Open
Conversation
… + reproducible deck source
…tool - PhotoUploader: camera/file capture -> lazy-loaded tesseract.js -> tiered model-number extractor (pure, unit-tested) -> smart prefill into composer - order_support tool removed (registry entry only - loop untouched) - repairs: workspace sync corruption (NUL-padded/truncated saves) fixed by splicing tails from git history; see DEVIATIONS
Pluggable appliances:
- backend/app/appliances.toml is now the single source of truth (canonical
name + keywords per appliance). Adding a new appliance is a TOML edit +
seed URLs in scraper/seeds.py + re-ingest.
- New backend/app/appliances.py loads it once and exposes ApplianceType
(Pydantic Literal), ALL_KEYWORDS, and a display helper. tools.py / guard.py
/ prompts.py all read from it; SYSTEM_PROMPT is interpolated at import time.
- Drops stale order_support reference from SYSTEM_PROMPT.
Honesty trace panel ("How I know this"):
- Backend: tools.result_summary() builds a one-line summary per tool result.
agent.py emits enriched tool_end events (args + summary) plus a final
'trace' SSE event listing every call and the validator's verdict on each
PS# mentioned (verified / stripped / unknown).
- Frontend: new TracePanel collapsible under each assistant message.
Brand-styled, monospace call list, color-coded part-number badges.
Plus: ruff format pass on llm_client / tools / test_llm_client (CI fix);
.gitattributes pins *.sh to LF so backend/entrypoint.sh stays executable
when cloned on Windows.
…find parts
Problem (CI failure on test_spray_arm_natural_language):
"I need the thing that sprays water in the bottom of my dishwasher" was
returning gaskets and rollers instead of spray arms. Root cause:
websearch_to_tsquery is AND-mode, and that query has too many filler words
("I", "need", "the", "thing", "that", ...) - the tsvector match was empty,
so ranking fell through to vector-only, where mock embeddings put the spray
arm at position 4 (the mock LLM only renders top 3).
Fix:
- keyword_search now retries with to_tsquery('english', 'word1 | word2 | ...')
when the websearch (AND) query yields zero rows.
- A small _FILLER_WORDS frozenset strips verbal-tic words that aren't on
Postgres' english stopword list ("need", "thing", "looking", "fix", ...).
Result:
- Hybrid search now ranks "Dishwasher Spray Arm" #2 for that query (was Instalily#4).
- 68/70 tests pass (2 pre-existing skips), 93% coverage.
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.
No description provided.