Repository navigation
feat(data): rebuild the shipped catalog — corpus fixes, fail-closed claims, wave-2 packet ingestion (762→822 recipes) - #210
Conversation
…provable diet claims Apply the three merged corpus-fix packets (#195 amounts-a 86, #196 amounts-b 85, #197 rubric 18) to the corpus via apply_corpus_fixes.py, which refuses unless every fix's before_sha256 matches the pinned corpus line, no two files fix one recipe, and the rights-pin revisions cover exactly the changes_rights_pin fixes. Ten fixes edit FridgeLuck-original text after the authoring record was pinned at ingest. The recipes keep LicenseRef-FL-Original — the revision is FridgeLuck's own edit of its own text — and the rights gate (rights_evidence.py) accepts them only against a pinned revision in evidence/rights.json (fl_revisions, derived by fl_revisions.py) that describes the shipped record exactly: title, ingredient-name hash, and full-body hash. Planted step edits, renamed lines, retitles, missing revisions and wrong licences still refuse (test_rights_revisions.py, 11 tests). strip_unproven_claims.py removed one claim the composition gate cannot prove after the fixes (fl-original-0341 vegetarian; the added banana line is unresolved in the suite allergen table). compile_bundle.py now fails diet claims closed: an authored true claim survives only when the line composition classes prove it — unprovable claims ship null, vegan true implies vegetarian and dairy_free true (compile refuses otherwise; validate_bundle.py audits both). Checks: validate_corpus GREEN; validate_bundle PASS (439 informational null warnings); pytest data/recipes/tools/tests 48 passed, 1 pre-existing kcal-drift failure (fails on alpha tip 7c4b30c too), 1 skip. Co-authored-by: Sam Gu <sgu07966@gmail.com>
…fests Recompile the bundle from the fixed corpus with fail-closed claims (generated_at pinned 2026-10-16T09:30:00Z; byte-identical across 3 runs, MD5 c70c21c742b345539cb1da553a39a261), mirror it byte-identically to the app catalog, and regenerate both manifests against the actual file — they had drifted apart, each pinning a different bundle sha. Diet claims in the shipped bundle (true/false/null): vegetarian 327/333/102 -> 325/333/104, vegan 121/585/56 -> 120/585/57, gluten_free 336/314/112 -> 335/314/113, dairy_free 306/282/174 -> 303/282/177 — seven true->null flips on five recipes, nothing gained a true claim. Taste-lab golden fixture regenerated with the lab's own command (regenerate-fixtures --seed 7) and replay-verified; reach_report_v3 rerun before/after on the tracked catalog sqlite; results recorded in evaluation/recipe-quality/rebuild.md. Checks: validate_corpus GREEN; validate_bundle PASS; data tests 48 passed, 1 skipped, 1 pre-existing kcal-drift failure (fails on the alpha tip too); taste-lab tests 19 passed. Co-authored-by: Sam Gu <sgu07966@gmail.com>
…catalog Ingest the merged 2026-10 breakfast (#201) and pantry (#203) original packets with data/recipe-bundle/ingest_packets_2026_10_wave2.py: 60 recipes as fl-original-0769..0828, 0 title-collision exclusions, with a packet->corpus traceability map in data/recipes/evidence/ingest-2026-10-wave2-map.json. rights_evidence.py accepts the wave-2 tool name in packet citations and pin_rights_evidence.py pins both packet branches (b4a2c13, 100984f) in evidence/rights.json (+386 lines, no churn to existing pins); every ingested recipe cites its packet record. The vocabulary is unchanged: all 400 surface names in the new recipes already resolve through the committed name-mappings (400/400), and a raw build_vocab run regresses curated state (classes, identity pins, portion averages), so the working tree keeps the committed vocabulary files. Recompile the bundle: 822 recipes, band rcp-000167..rcp-000994, sha256 2bf71ab4..., generated_at 2026-10-16T11:00:00Z, byte-identical across 3 runs (MD5 0c0df917...), mirrored byte-identically to the iOS catalog; both manifests re-pinned (sha, bytes, counts, coverage, provenance adds #201/#203 and the ingestion batch). Corpus-size pin 762->822. Taste-lab golden fixture regenerated (replay exact; lab tests 19 passed). Reach (second pass, before = HEAD 762-recipe post-fix bundle): median near-cookable omnivore 107.0 -> 186.5. rebuild.md records both passes. Co-authored-by: Sam Gu <sgu07966@gmail.com>
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
…egacy-links record Hosted-macOS CI on 4c193f4 (run 38905405934) failed two tests: 1. RecipeCatalogManifestIntegrityTests.testManifestLegacyLinkCountMatchesTheShippedBundle: the second-pass manifest patch wrote legacy_ingredient_links as a bare integer; the app manifest's shape is a record {keys_with_legacy_id, resolved_in_map, unlinked, source}. Restored the record with the recomputed values (49 keys carry a legacy_id; the legacy map has 49 resolved + 1 proposed, unchanged). 2. TasteRankerTests.testGoldenFixturesReplayExactly (golden-hh01): the taste-lab regen command writes one household per invocation (--household, one eval seed each: hh00/seed 7, hh01/seed 11, hh23/seed 13); the first pass regenerated only hh00, so hh01/hh23 still carried 762-recipe expectations while the shipped 822-recipe bundle gives rcp-000188/000443 protein >= 24 g (estimated coverage) and the Swift extractor emits nutrient:high_protein for them. Regenerated hh01 (--household 1 --seed 11) and hh23 (--household 23 --seed 13) on the 822 catalog; all three fixtures replay exactly and the lab suite passes 19/19. rebuild.md records the round-1 CI fixes. Co-authored-by: obvious-autobuild[bot] <262744130+obvious-autobuild[bot]@users.noreply.github.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Note Review skipped Codemetrics is installed on this repository, but it hasn't been added to your team yet. To enable AI code reviews for this repo, go to your dashboard and add FridgeLuck to your team's repositories. |
Rebuild the shipped catalog: corpus fixes, fail-closed diet claims, and the wave-2 packet ingestion
Applies tonight's reviewed recipe-fix packets (#195 amounts-a, #196 amounts-b, #197 rubric — 189 fixes), compiles diet claims fail-closed, and ingests the merged 2026-10 breakfast (#201) and pantry (#203) original batches. The shipped bundle goes from 762 to 822 recipes (rcp-000167..rcp-000994), every recipe rights-documented.
Branch:
obv/burst12-fridgeluck-catalog-rebuild· base:alphaCommits:
d5ed6a4d(fixes + claims),8a4840c9(bundle/manifests/fixtures pass 1),4c193f4d(wave-2 ingestion + pass 2)What changed and why
data/recipes/tools/apply_corpus_fixes.pyapplied all 189 fixes (86 amounts-a, 85 amounts-b, 18 rubric) one-shot: every fix'sbefore_sha256matched its pinned corpus line in a dry run; nothing skipped. Ten fixes flaggedchanges_rights_pin(title/structure edits of FridgeLuck's own text) carry reproducible revision pins indata/recipes/evidence/rights.json(fl_revisions) — title, ingredient-name hash, and full-body hash must match the shipped record or the rights gate refuses.compile_bundle.pynow ships an authored true diet claim only when the ingredient-line classes prove it; unprovable claims shipnull; a proven vegan claim requires proven vegetarian and dairy-free. Net effect: 7 claim flips true→null on 5 recipes (rcp-000179, -000190, -000199, -000207, -000532); no recipe gained a true claim. One unprovable authored claim was stripped at the corpus layer per the repository'sstrip_unproven_claims.pypolicy (fl-original-0341 vegetarian, the rubric fix added abananaline the composition gate can't resolve) and is recorded instripped_claims.validate_bundle.pyaudits both rules.data/recipe-bundle/ingest_packets_2026_10_wave2.pyingested both packets as fl-original-0769..0828 (existing originals end at -0768; the ingester refuses collisions): 60 ingested, 0 title-collision exclusions. Traceability map:data/recipes/evidence/ingest-2026-10-wave2-map.json. Both packet branches are pinned inevidence/rights.jsonat their commits (b4a2c13, 100984f) viapin_rights_evidence.py(+386 lines, no churn to existing pins); every ingested recipe cites its packet record;rights_evidence.pyaccepts the wave-2 tool name in citations.name-mappings.json(400/400 mapped). A rawbuild_vocab.pyrun was tried and rejected: the committed vocabulary carries curated state (class assignments, identity-audit pins, portion averages, sources) the raw rebuild does not reproduce; the working tree keeps the committed files.2bf71ab4…, 2,901,511 bytes, generated_at pinned2026-10-16T11:00:00Z), mirrored byte-identically toapps/ios/Resources/RecipeCatalog/recipes-v2.json; both manifests re-pinned (sha, bytes, counts, coverage 165 computed / 543 estimated / 114 partial, provenance adds feat(data): add breakfast-2026-10 originals packet (30 RS v1 breakfast recipes) #201/feat(data): pantry-2026-10 originals — 30 pantry-first recipes lifting exact-cookable reach to every household #203 + the ingestion batch).regenerate-fixtures --seed 7), replay exact.reach_report_v3.pyrerun twice (tracked app-side SQLite both sides, restored to its tracked state). Full record:evaluation/recipe-quality/rebuild.md.How I checked it (commands and results)
python3 -I data/recipes/tools/apply_corpus_fixes.py --dry-run→ 189/189 matched, then applied; revision-gate test file 11/11 passed.python3 -I data/recipes/tools/validate_corpus.py→ VALIDATION GREEN on the 822-recipe corpus (rights, quarantine, release gates, dedupe, lint).python3 data/recipes/tools/validate_bundle.py→ PASS (453 informational null-claim warnings, 0 errors).python3 -m pytest data/recipes/tools/tests/ --deselect data/recipes/tools/tests/test_pipeline.py::test_vocab_rebuild_deterministic→ 48 passed, 1 failed; the failure istest_kcal_drift(stalenew_kcalentries indata/recipe-bundle/nutrition-changes-2026-10.json), reproduced on the alpha tip in a clean worktree — pre-existing, not introduced here; regenerating that file is fix(data): correct calorie rows behind #192's ingredient re-pins (kcal audit) #205's nutrition-record rebuild follow-up.test_vocab_rebuild_deterministicis operator-only (needs pinned/tmpFDC/canon downloads). With those inputs present it fails because the committed vocabulary carries curation the raw builder does not reproduce — and running it rewrites the curated vocabulary files mid-suite; files were restored from git. Also pre-existing by inspection: the builder never writes theclasses/class_sourcefields the committed vocab carries.python3 -I data/recipes/tools/compile_bundle.py×3 → byte-identical (MD50c0df917…); app copycmp→ identical.python3 -m taste_lab validate-fixtures→ "All fixtures replay exactly";pytest testsin the lab → 19 passed.What I couldn't check
data/recipes/buildoutput, and both manifests pin its sha.data/recipe-bundle/nutrition-changes-2026-10.jsonis not regenerated (not an owned path; the kcal-drift test failure predates this branch and is owned by fix(data): correct calorie rows behind #192's ingredient re-pins (kcal audit) #205's follow-up)./tmp(evaluation/catalog-reach is not an owned path on this task); the numbers above are the record.Assumptions
build_vocab, so an additive "rebuild" that strips curated state is wrong; with 400/400 new surfaces already mapped, leaving it untouched is the correct additive outcome.ingest_packets_2026_10.pyrefuses anyfl-original-*collision by design; I widened only the citation regex, not the collision guard.CI (hosted macOS)
evaluation/recipe-quality/rebuild.md"CI round 1 fixes"):RecipeCatalogManifestIntegrityTests.testManifestLegacyLinkCountMatchesTheShippedBundle— the second-pass manifest patch wrotelegacy_ingredient_linksas a bare integer; restored the app manifest's record shape{keys_with_legacy_id: 49, resolved_in_map: 49, unlinked: 1, source}(recomputed from the legacy map: 49 resolved + 1 proposed, unchanged).TasteRankerTests.testGoldenFixturesReplayExactly(golden-hh01) — the taste-lab regen command writes ONE household per invocation (hh00/seed 7, hh01/seed 11, hh23/seed 13); the first pass regenerated only hh00, leaving hh01/hh23 with 762-recipe expectations while the rebuilt bundle's fixed amounts push rcp-000188/000443 past the 24 g protein threshold Swift keys on. Regenerated both with their own seeds; all three fixtures replay exactly on the 822 catalog, lab suite 19/19.build-and-testgreen.Not merged
Per workspace policy this stays a draft and is not merged. When ready, the human merge command is:
Human author: Sam Gu (sgu07966@gmail.com)
🔗 Obvious Project · 🧵 Obvious Thread · 🔀 Obvious PR Artifact