MosswartOverlord/go-services/inventory-go
Erik 2473b80519 feat(inventory-go): search spell_names/spells enrichment + shirt/pants filters
Adds the remaining search-result enrichment that the suitbuilder solver (and the
item-detail UI) depend on, validated byte-exact against the Python service on
production data:

- Load the SpellTable (spells.values, 6266 entries) from the enum DB and port
  translate_spell (id -> {id,name,description,school,difficulty,duration,mana,
  family}, Unknown_Spell_<id> fallback, "" defaults).
- Emit `spells` (full dicts) and `spell_names` from the ordered passive Spells
  array (original_json->'Spells', array order + duplicates preserved), exactly
  as enrich_db_item/extract_item_properties do — NOT from item_spells. Only set
  when the item has spells. A jsonb_typeof guard keeps non-array Spells safe.
- Add the shirt_only / pants_only / underwear_only filters as CTE-body WHERE
  injections (coverage-bit logic on key 218103821), mirroring main.py.

Validation (char Plant Enjoyer, all chars): spell_names 0 mismatches (8 spell
items), spells[].name 0 mismatches, shirt_only/pants_only item sets identical
(0 only-py / 0 only-go). Normal-search total_count still matches Python.

Note: for shirt/pants/slot filters Python's total_count is inconsistent with its
own items (separate count CTE lacks the injection); Go uses one CTE so the count
is self-consistent. Deliberately not replicating that Python bug.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 12:57:20 +02:00
..
Dockerfile feat(go-services): inventory-go Phase A — read-side scaffold + simple endpoints 2026-06-24 11:33:55 +02:00
go.mod feat(go-services): inventory-go Phase A — read-side scaffold + simple endpoints 2026-06-24 11:33:55 +02:00
ingest.go feat(go-services): inventory-go Phase C — ingestion (validated, isolated DB) 2026-06-24 12:42:26 +02:00
main.go feat(inventory-go): search spell_names/spells enrichment + shirt/pants filters 2026-06-24 12:57:20 +02:00
process.go feat(go-services): inventory-go Phase C — ingestion (validated, isolated DB) 2026-06-24 12:42:26 +02:00
schema.go feat(go-services): inventory-go Phase C — ingestion (validated, isolated DB) 2026-06-24 12:42:26 +02:00
search.go feat(inventory-go): search spell_names/spells enrichment + shirt/pants filters 2026-06-24 12:57:20 +02:00
store.go feat(go-services): inventory-go Phase A — read-side scaffold + simple endpoints 2026-06-24 11:33:55 +02:00