Skip to content

feat: brew-log & palate loop — tasting capture + cross-bag recipe pre-correction#32

Merged
Leolebleis merged 11 commits into
mainfrom
feat/brew-log-palate-loop
Jun 13, 2026
Merged

feat: brew-log & palate loop — tasting capture + cross-bag recipe pre-correction#32
Leolebleis merged 11 commits into
mainfrom
feat/brew-log-palate-loop

Conversation

@Leolebleis

Copy link
Copy Markdown
Owner

Summary

Closes the tasting feedback loop. Capture how a brew tasted (conversationally, structured), then use it to pre-correct future recipes: "you got a Geisha natural → you tend to find those sour → here's a recipe started finer/tighter."

Built on the existing journal/ + bags/ contexts. Stays in sqlite — no new deps, no ANN/vector infra (it's exact weighted-KNN at personal scale).

What's in it

  • Bag enriched with varietal / process / altitude_masl (the queryable bean dimensions).
  • JournalEntry gains signed tasting axes acidity/bitterness/body/sweetness/strength (−2…+2, 0=balanced) + flavor_tags + a bean_dimensions_snapshot frozen at log time.
  • journal/palate.py — a weighted-KNN read-model (tendency_for): finds similar past brews, similarity-weights their axes, returns a tendency + confidence + neighbours. Graceful degradation when history is sparse.
  • MCP tools log_tasting (capture; snapshots bean dims) and query_palate (the lookup /brew calls).
  • db.add_missing_columns — idempotent additive migration for the already-populated DB; live-run in the lifespan.
  • Skills: new /brew-log (capture + tasting coaching, fault→lever from the Coffee Compass, BWT-water rule) and a /brew palate pre-flight that pre-corrects from history. Plugin 0.2.0 → 0.3.1.

Quality

  • TDD throughout, subagent-driven (fresh implementer + review per task).
  • Final holistic review (opus) → fix-then-merge; all findings actioned (import order, proper typing dropping ty:ignores, direct attr access, migration-CHECK doc).
  • /simplify pass → data-driven bag update builder, jsonify in query_palate, walrus in the palate axis loop.
  • 389 tests pass, ruff --no-cache clean, ruff format clean, ty clean.

Known scope

Palate learning is conversational-only this phase: structured capture flows through /brew-log. The web rating toast / REST PATCH /journal/{id} send a rating only (no axes), so they deliberately don't feed the KNN. A structured web tasting form + its learning contribution lands with the web-UI work (alongside the parked Phase 2b embeddings). Documented in the spec.

Follow-ups (not in this PR)

  • JournalService.update / repo.update are now production-dead (superseded by record_tasting) — candidate for removal once the old tests adopt record_tasting.
  • Parent raspberrypi repo: bump the brew submodule pointer after merge.

@Leolebleis Leolebleis merged commit b75b0b2 into main Jun 13, 2026
4 checks passed
@Leolebleis Leolebleis deleted the feat/brew-log-palate-loop branch June 13, 2026 20:30
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