feat: brew-log & palate loop — tasting capture + cross-bag recipe pre-correction#32
Merged
Conversation
…ty:ignores, direct attr access, doc migration CHECK, fix import order
… in query_palate, walrus in palate axis loop
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.
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
Bagenriched withvarietal/process/altitude_masl(the queryable bean dimensions).JournalEntrygains signed tasting axesacidity/bitterness/body/sweetness/strength(−2…+2, 0=balanced) +flavor_tags+ abean_dimensions_snapshotfrozen 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.log_tasting(capture; snapshots bean dims) andquery_palate(the lookup/brewcalls).db.add_missing_columns— idempotent additive migration for the already-populated DB; live-run in the lifespan./brew-log(capture + tasting coaching, fault→lever from the Coffee Compass, BWT-water rule) and a/brewpalate pre-flight that pre-corrects from history. Plugin 0.2.0 → 0.3.1.Quality
ty:ignores, direct attr access, migration-CHECK doc)./simplifypass → data-driven bag update builder,jsonifyinquery_palate, walrus in the palate axis loop.ruff --no-cacheclean,ruff formatclean,tyclean.Known scope
Palate learning is conversational-only this phase: structured capture flows through
/brew-log. The web rating toast / RESTPATCH /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.updateare now production-dead (superseded byrecord_tasting) — candidate for removal once the old tests adoptrecord_tasting.raspberrypirepo: bump thebrewsubmodule pointer after merge.