Skip to content

feat(vocab): FTS5 synonym expansion + XKCD colour-survey palette - #24

Merged
simons-plugins merged 2 commits into
mainfrom
feat/search-colour-vocab
Jul 22, 2026
Merged

feat(vocab): FTS5 synonym expansion + XKCD colour-survey palette#24
simons-plugins merged 2 commits into
mainfrom
feat/search-colour-vocab

Conversation

@simons-plugins

Copy link
Copy Markdown
Owner

Closes #18, closes #19. Stacked on #23 (which stacks on #22) — merge in order, retarget before deleting base branches.

  • synonyms.py — freshly-authored synonym groups (no text copied from the unlicensed upstream): rooms (lounge↔living room), heating (TRV↔radiator), media (telly↔TV), power, UK household vocabulary. At index time, words found in a device's name/model/folder pull their group siblings into the aliases FTS column (bm25 weight 2.0, below name's 3.0). This captures the synonym-recall benefit that was embedding search's only real advantage — zero deps, zero network, zero per-query cost.
  • xkcd_palette.py — ~920 names from the CC0 xkcd colour survey as a plain (r,g,b) dict (no matplotlib). lookup_named_color checks CSS first (collisions keep CSS values), then XKCD, with grey/gray spelling handled both directions.
  • Two existing tests used "british racing green" as their unknown-colour fixture — it's now a real colour (5, 72, 13); fixtures updated.
  • 294 tests (12 new). 2026.2.0 → 2026.3.0.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EYAGXd4bE9D9Z5kZeSHeo7

synonyms.py: freshly-authored synonym groups (rooms, heating, media,
power, UK household terms). Words found in a device's name/model/
folder pull their group siblings into the aliases FTS column, so
'lounge' finds Living Room devices and 'telly' finds the TV socket —
the synonym-recall benefit of semantic search with zero deps.

xkcd_palette.py: ~920 colour names from the CC0 xkcd colour survey
as a plain data table (no matplotlib). lookup_named_color falls back
to it after CSS (CSS wins collisions); US/UK grey spellings resolve
both ways. 'british racing green' is now a real colour, so the
unknown-colour test fixtures move to a genuinely fake name.

Closes #18, closes #19.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYAGXd4bE9D9Z5kZeSHeo7
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 74268228-d4eb-4407-a34b-ce0bedbc3ace

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/search-colour-vocab

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

- SQLite opens read-only via URI (mode=ro): a typo'd path now fails
  loudly instead of silently creating an empty DB and logging ready.
- get_columns propagates connection failures instead of returning []
  so a Postgres outage is no longer misreported as 'device has no
  history'; list_sql_logger_columns wraps them as friendly errors.
- HistoryDB.from_prefs replaces plugin-side wiring: malformed prefs
  (non-numeric pgPort) disable history tools with an error instead of
  crashing startup/prefs-save; fully unit-tested.
- psql short-row guard: --unaligned trims trailing NULL fields; raw/
  bucketed loops now skip short tuples (caught by new PG stdout test).
- Text values in numeric series are skipped, not fatal.
- Colour lookup normalises apostrophes/slashes (robin's egg blue,
  purple/blue) and the XKCD table regains 2 apostrophe-named entries;
  xkcd import hoisted to module level so corruption fails at load.
- 302 tests (8 new review-driven).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYAGXd4bE9D9Z5kZeSHeo7
@simons-plugins
simons-plugins changed the base branch from feat/sql-logger-history to main July 22, 2026 13:59
@simons-plugins
simons-plugins merged commit ec0dcd0 into main Jul 22, 2026
2 checks passed
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.

device_set_named_color: extend palette with XKCD colour-survey names find_devices: synonym/alias vocabulary expansion

1 participant