Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…iases Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…parts Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The report's pass-error count only covers crops where both requests failed, so a classification failure with working text recognition was invisible. List classification and text failures separately. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… files - Await the GRDB write inside the async VisionService test; the simulator build rejected the synchronous call. - Apply the repository's swift-format configuration to the files this branch added. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. Comment |
…r the macos-26 CI workflow Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Oct 7, 2026
Prevent descriptor and truncated OCR tokens from becoming ingredient identities through catalog prefix aliases. Preserve prefix matching for multi-word windows and cover curated olive oil and black beans recognition. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Oct 9, 2026
Draft
This was referenced Oct 11, 2026
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.
Stacked on #4. Base:
feat/minimal-product-20261007.What changed
Camera labels no longer turn into unrelated foods
When a Vision classification label missed the curated lexicon, the catalog resolver fell back to prefix matching. Generic labels became specific foods: "drink" became Strawberry Kefir, "seasonings" became Salt Pork, and "raw_glass" became Soy Vermicelli.
IngredientCatalogResolver.resolve(_:matching:)now takes a required mode. Classification labels use.exact: names and aliases are searched together, and a match counts only when exactly one ingredient answers. OCR text and recipe generation pass.allowPrefix, which keeps their old behaviour, and each call site states its choice.Label text split across two lines is read as one food
Cans often print a name on two lines. "BLACK" and "BEANS" each failed the lexicon on their own, and "BEANS" then fell through to the catalog as Shellie Beans.
IngredientOCRLineJoiningpairs a line with the nearest horizontally aligned line directly below it. It joins them only if the combined phrase is a curated food and neither line is one alone. It never chains a third line, and it can't skip a line in between: "BLACK / KIDNEY / BEANS" doesn't become black beans. Within the same photo, catalog matches for a join's separate words are dropped, so "OLIVE OIL" no longer also adds a second olive oil from a lone "OLIVE".The alignment limits (70% horizontal overlap, gap from -25% to 100% of the taller line) were chosen on the five bundled demo photos and haven't been tuned on anything else.
Each failed Vision request is recorded
passErrorsrecorded a crop only when both classification and OCR failed on it, so a scan where classification failed everywhere but OCR worked looked healthy. Now:ScanRequestFailureinScanDiagnostics.requestFailuresand the saved scan run. Older saved runs decode with an empty list.passErrorskeeps its old meaning, so benchmark validity hasn't changed.This explained the simulator gap. On the iOS 26.5 simulator, every
VNClassifyImageRequestfails with "Failed to create espresso context", so only OCR runs there. On macOS the same photo yields 11 detections. Simulator scans can't be used to judge recognition quality.Why
Wrong identities are worse than misses, because the review pre-checks confident items and they go straight into the Kitchen and recipe matching.
Verification
Replay of saved Vision observations from the five bundled photos, through this branch's resolver, lexicon and joiner. This is not fresh inference or a benchmark.
VisionServiceend to end with injected Vision results, across all six crops. It checks that a lone "BEANS" in another crop is dropped once "BLACK / BEANS" is joined, and that the classification result is kept.Not in this PR
ScanViewdrops it, so the report sheet has nothing to show.Two changes recovered more foods on the same photos but cost too much:
Checklist
🤖 Generated with Claude Code