Repository navigation
[eval] scorecard B: allergen/diet claims held without FLIngredientFacts composition - #130
Merged
Merged
Conversation
Planted-failure harness for the PR #88 BLOCK: claims clear through the fixture alias table while FLIngredientFacts is unavailable. At this base B1 confirms the blocker (tamari + gluten-free clears, unchecked=0) and B2 confirms the missing facts-backed clear path; B4-B6 skip until the fix adds the facts API. Fix follows in the next commit. Red output captured at base in the PR description (Proof section). Co-authored-by: obvious-autobuild[bot] <262744130+obvious-autobuild[bot]@users.noreply.github.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 |
…ition The allergen/diet claim scan cleared claims through the fixture alias table in allergens.json (rs.py:573-619, allergens.json:172-173 at base 9e04af4): a tamari-only recipe with a gluten-free claim and empty conflicts cleared with no product composition evidence, and an unknown name (cream cheese under a dairy-free claim) disappeared from the scan surface entirely. Both violated evaluation/CONTRACTS.md:15-18 and :62 — verdicts come only from FLIngredientFacts data, and missing canonical facts must hold dependent claims. rs.py now sources claim verdicts ONLY from FLIngredientFacts (data/ingredient-facts, branch overhaul/ingredient-facts — PR #127): - FLIngredientFacts: thin read-only dataset consumer (identity and product-form resolution, fact lookup by axis), with load-time validation mirroring the dataset's own conformance runner; loads scored-tree-first, else the suite-pinned verbatim snapshot canon/ingredient-facts/ (PROVENANCE.md records the pin at overhaul/ingredient-facts b0deecc). - Per-ingredient, per-claim-axis verdicts (CLAIM_AXES): a claim clears only when every ingredient resolves to a facts row whose axes are free/allowed with valid evidence and the recomputed conflicts match the recorded evidence. - Unknown name, identity without a facts row, unknown or absent axis state, or an absent/unloadable facts source all HOLD the claim: counted unchecked with a reason naming the absent or incomplete source — never cleared, never silently skipped. The gluten property is its own axis (never merged with wheat). - The fixture alias table no longer clears claims; it only feeds R3 doneness classification (classification_incomplete unchanged). test_allergen_facts.py (committed red at base 9e04af4, ecb333f) now passes 7/7: B1 tamari gluten-free held; B2 certified-GF tamari form clears through facts; B3 cream-cheese dairy-free held with the ingredient named; B4 absent source holds with the source named; B5 unknown-milk stock cube plus facts-row-less identity held; B6 facts-backed claim clears and disagreeing evidence held; B7 soy-sauce gluten conflict held. suite.py --self-test: caught 13/13 planted failures, controls 1/1 held (P2 and D2 now caught through the facts path). Co-authored-by: obvious-autobuild[bot] <262744130+obvious-autobuild[bot]@users.noreply.github.com>
…lergens Brings in Part A's merged safety-lint work (origin/eval/scorecard-runner 17953ed). Conflicts, if any, are resolved only within Part B's regions (allergen/diet claim scan, canon/ingredient-facts snapshot); Part A semantics are preserved as merged. Co-authored-by: obvious-autobuild[bot] <262744130+obvious-autobuild[bot]@users.noreply.github.com>
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.
Why
Independent review BLOCKED draft PR #88 at base
9e04af4(blocker 3): the allergen/diet claim scan cleared claims through the fixture alias table inallergens.json(rs.py:573-619,allergens.json:172-173) while FLIngredientFacts was unavailable.gluten-freeclaim and empty conflicts cleared: the alias table unconditionally recorded only soy, so no product-composition evidence existed behind the gluten-free verdict. Known-name composition was unestablished.evaluation/CONTRACTS.md:15-18and:62: verdicts come only from FLIngredientFacts data, and missing canonical facts must hold dependent claims — counted unchecked, with a reason naming the absent or incomplete source; never silently cleared, never silently skipped.classification_incomplete); that fix is present at base9e04af4and this branch must not regress it — unknown names stay on the scan surface.What changed
Claim verdicts now come only from FLIngredientFacts data (
data/ingredient-facts, branchoverhaul/ingredient-facts, PR #127 — consumed read-only):rs.py—FLIngredientFacts: thin read-only dataset consumer. Resolves an ingredient line name (identity key/display/synonym/product form) to a facts row; per-axis fact lookup with product-form overrides taking precedence (per-axes merge, as the dataset's conformance runner resolves). Load-time validation mirrors the dataset's own conformance runner: vocabularies (nine FDA allergens, five diets, gluten property, evidence kinds, states, certainties), evidence completeness on non-unknown states, absence never resting onusda/recipeevidence, component resolution, key/name collisions. Load precedence: the scored tree'sdata/ingredient-facts/when present, else the suite-pinned snapshot (below). Any absence or validation failure →(None, reason)→ every dependent claim held with that reason.rs.py— claim verdicts (CLAIM_AXES,_claim_axis_verdicts,AllergenScanner.verify_claim): per-ingredient, per-claim-axis. A claim clears only when every ingredient resolves to a facts row whose claim-relevant axes arefree/allowedwith valid evidence and the recomputed conflicts match the recorded evidence. Otherwise the claim is HELD: counted unchecked, with a reason naming the absent or incomplete source — unknown name (no identity); identity without a facts row; unknown or absent axis state; absent or unloadable facts source. Unknown composition never means allowed. The gluten property is its own axis, never merged with wheat (a gluten-free label never settles wheat).allergens.jsonclasses feed only R3 doneness classification; theclaimsregistry remains the known-type list (forbidsvalues are documentation)._commentdocuments the narrowed role.canon/ingredient-facts/— verbatim snapshot ofoverhaul/ingredient-facts@b0deecce(identities.json,facts.json, byte-for-byte viagit show), plusPROVENANCE.mdrecording source, pin, load precedence, and the re-verification duty.test_allergen_facts.py— planted-failure self-tests, committed red at base inecb333f.Boundaries: changes confined to
evaluation/suites/recipes/(rs.py,allergens.json,canon/ingredient-facts/, new test/README files). No changes to.github/workflows/,suite.py, R3 classification semantics, orevaluation/out/.Tradeoffs
data/ingredient-facts/tree in the scored tree wins when present. Cost: the snapshot must be re-pinned when the canonical source moves (duty documented inPROVENANCE.md;PINNED_FACTS_HEADinrs.pyrecordsb0deecce).CONTRACTS.md— a claim without composition evidence must be visible as unchecked, not laundered through a fixture.Proof
Commands run in
evaluation/suites/recipes/(Linux sandbox, python3; nothing here requires Xcode/device — no UNVERIFIED-NATIVE paths). Red at base first (scanner at base9e04af4, harness fromecb333f), then green after the fix (4f590b9) and re-verified green after mergingorigin/eval/scorecard-runner17953ed1(merge commit1a56f06).Red at base
9e04af4(verbatim, trimmed only at line ends):B1 is the cited blocker: the tamari-only gluten-free claim cleared (
unchecked=0, empty detail) with no composition evidence. B2 is red because no facts-backed clear-path existed. B3/B7 pass at base because the earlier unknown-name fix already held those — they are regression guards (the scan surface must keep naming those ingredients); the fix branch keeps them green with stronger, source-naming reasons. B4–B6 exercise the fix itself and skip at base.Green on this branch (after
4f590b9, identical after the merge):The passing control (B2/B6): when the facts data DOES contain composition evidence compatible with the claim — the certified gluten-free tamari product form (label evidence) and tofu dairy-free — the claim clears. B5 exercises the real dataset's own fail-closed rows: stock cube (milk unknown) and a known identity with no facts row (artisan granola bar).
Suite self-test after the merge (regression battery incl. Part A's):
P2 and D2 are now caught through the FLIngredientFacts verdict path (previously the alias-table path).
Handoff
Done
9e04af4(B1/B2 failing — verbatim above), green on the branch (7/7). Suite self-test green before and after the base merge (13/13 caught, controls held; Part A battery 4/4).overhaul/ingredient-factsb0deeccewith provenance; base merge17953ed1absorbed with no conflicts; diff vs the new base confined toevaluation/suites/recipes/.Not done / limits
b0deecce; the snapshot is pinned andPINNED_FACTS_HEADrecords it. Re-pinning on canonical moves is the documented duty (PROVENANCE.md), not done preemptively.evaluation/out/untouched (parent regenerates the scorecard at join). No scorecard-run artifact committed here.Next steps
evaluation/out/is the parent's).overhaul/ingredient-factslands new composition: run its conformance runner, re-pin the snapshot, updatePINNED_FACTS_HEAD+ PROVENANCE.md in one commit.origin/eval/scorecard-runnerbefore your final push; resolve only within your own regions (merge commits allowed; no rebase/force-push).Head:
1a56f06ff0b54dcea4ec2acb0a2f58a14d5264d0🔗 Obvious Project · 🧵 Obvious Thread · 🔀 Obvious PR Artifact