feat(ontology): encode YD 87:8 — nasiyovei d'chalva (mei chalav boundary) - #258
Merged
Conversation
added 3 commits
June 3, 2026 15:17
…ary) Encode Shulchan Aruch Yoreh Deah 87:8: distinction between nasiyovei d'chalva (whey pressed from cheese curd, d'oraita) and mei chalav (post-cooking residual water, d'rabanan). Encoding Summary: - 20 rules encoded (seif_8.hll) - Worlds: base, mechaber, rema, shach - Machloket: Rosh/SA d'oraita vs Tosafot/Behag/Pri Chadash d'rabanan - Marit ayin: Shach disputes Rema for of+nasiyovei (r_nasiyovei_of_shach_marit_ayin) - Tests: 15 QA scenarios, 11 pytest, tech-health 19/19 - Encoding Decisions: 4 total (3 definitive, 1 probable) New predicates: nasiyovei_d_chalva, mixture_has_nasiyovei, is_nasiyovei_chalav_mixture, is_nasiyovei_of_mixture, is_nasiyovei_chaya_mixture, rema_of_exempt_nasiyovei Sources: - Primary: Rosh on Chullin 8:51:2 (ואני אומר דנסיובי דחלבא אסור מדאורייתא) - Chain: Rosh → Tur YD 87 → Beit Yosef 87:7 → SA YD 87:8 - Commentaries: PMG SD 87:23 (hanaah assur even hefsed meruba), Peleti sk16 (Tosafot/Behag machloket), Kaf HaChayim sk71 Fixes applied during encoding cycle: - torah() removed from makor for nasiyovei achiila/bishul rules (HA-5) - is_derech_bishul default added for is_nasiyovei_chalav_mixture Reviewed-by: RNekhoda Corpus-artifact: corpus-sources-YD-87-8.yaml Co-authored-by: Mistaber Code <code@mistaber.ai>
Co-authored-by: Mistaber Code <code@mistaber.ai>
Three corrections to the of+nasiyovei marit ayin section: 1. Remove @Madrega(d_rabanan) from r_nasiyovei_of_rema_marit_exempt — exemption predicates (rema_of_exempt_*) do not carry madrega, consistent with heter_hanaah pattern across the corpus 2. Remove r_nasiyovei_of_shach_marit_ayin rule entirely — direct asserts(shach, issur(bishul,...)) was indistinguishable from a normative bishul prohibition; sources support the direction but encoding as a direct din was a model extension 3. Remove requires_maras_ayin_marker(M, nasiyovei_d_chalva) — world-less global predicate fires in all worlds including rema, contradicting rema_of_exempt_nasiyovei in the same seif Shach's position now encoded as annotations on r_nasiyovei_of_rema_marit_exempt: annotation(shach, ..., disputes_rema_of_exempt_nasiyovei) annotation(shach, ..., cites_sa_yd_100_6_rashba) dispute(shach, rema, of_nasiyovei_marit_ayin) retained as structural fact. Updated: rules_count 20→19, makor_count 59→57 in manifests. Updated: encoding-decisions reviewer_note, scenario_q015 comment. Co-authored-by: Mistaber Code <code@mistaber.ai>
There was a problem hiding this comment.
Pull request overview
Verdict: CHANGES REQUESTED
Counts: [CRITICAL] 6 · [IMPORTANT] 3 · [NIT] 0
Scope detected: encoding-session
Highlights:
- Missing required phase validation artifacts (
validation-report-*.md) for the 5-stage pipeline. - Missing required negative scenario artifact
scenario_neg_87_8.hll. encoding-decisions.yamldoes not follow established schema (alternativesusesapproachinstead ofchoice;hll_refsleft empty).- New
@rule(r_nasiyovei_of_rema_marit_exempt)missing@madrega(...). scenario_pos_87_8.hllmissing required@show(holds/2)projection.
This PR encodes Shulchan Aruch YD 87:8 (“nasiyovei d’chalva” boundary vs. mei chalav) into the Mistaber DSL and compiles it into ontology artifacts, adding new vocabulary + archived corpus artifacts and tests for seif 87:8.
Changes:
- Add a new
food_category(nasiyovei_d_chalva) and derived mixture classifiers for nasiyovei + basar combinations. - Encode mechaber/rema d’oraita rules for beheima+nasiyovei and boundary d’rabanan for of/chaya+nasiyovei, including marit-ayin dispute metadata.
- Archive seif_8 artifacts and add pytest + scenario fixtures (but with some required artifacts missing/incomplete).
Reviewed changes
Copilot reviewed 36 out of 36 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| mistaber/ontology/meta.lp | Registers the new enum value and new derived predicates in generated meta ontology. |
| mistaber/ontology/corpus/yd_87/seif_8.lp | New compiled LP output for seif 8 (auto-generated from HLL). |
| mistaber/ontology/corpus/yd_87/base.lp | Extends mixture_has_chalav/1 guard to exclude nasiyovei_d_chalva. |
| mistaber/dsl/vocabulary/base.yaml | Generated vocabulary updates for new predicates + enum member. |
| mistaber/dsl/schema/sorts.hll | Adds nasiyovei_d_chalva to the food_category enum. |
| mistaber/dsl/corpus/yd_87/seif_8.hll | New seif 8 encoding: detection predicates, mechaber/rema rules, boundary cases, and marit-ayin dispute representation. |
| mistaber/dsl/corpus/yd_87/manifest.yaml | Updates siman 87 manifest coverage to include seif 8 metadata. |
| mistaber/dsl/corpus/yd_87/base.hll | Guards nasiyovei out of generic mixture_has_chalav to enable dedicated seif 8 logic. |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/validation-report.md | Archived validation summary for seif 8 (contains some incorrect statements vs. the encoding). |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/test_yd_87_8.py | New pytest coverage for seif 8 (missing chaya boundary assertions despite docstring). |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q001_87_8.hll | QA scenario: positive beheima+nasiyovei d’oraita case. |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q002_87_8.hll | QA scenario: mei-chalav boundary (not d’oraita). |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q003_87_8.hll | QA scenario: machloket annotation presence. |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q004_87_8.hll | QA scenario: hanaah prohibition (PMG) for d’oraita case. |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q005_87_8.hll | QA scenario: of+nasiyovei boundary d’rabanan. |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q006_87_8.hll | QA scenario: makor chain visibility. |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q007_87_8.hll | QA scenario: chaya+nasiyovei boundary d’rabanan. |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q008_87_8.hll | QA scenario: rema agreement (no gloss). |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q009_87_8.hll | QA scenario: nasiyovei vs mei-chalav non-overlap. |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q010_87_8.hll | QA scenario: 3-prohibition scope (achiila/bishul/hanaah). |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q011_87_8.hll | QA scenario: pri-chadash machloket annotation (pytest-filtered). |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q012_87_8.hll | QA scenario: bedieved of+nasiyovei behavior. |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q013_87_8.hll | QA scenario: post-processing -> mei-chalav classifier expectation. |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q014_87_8.hll | QA scenario: safek classification case. |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q015_87_8.hll | QA scenario: marit-ayin dispute metadata presence. |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_pos_87_8.hll | Positive scenario fixture (missing required @show(holds/2); missing companion negative scenario file). |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/review-package.md | Archived review package summary for seif 8. |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/qa-set.yaml | Archived QA question set for seif 8. |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/encoding-report.md | Archived encoding report summarizing rules/predicates for seif 8. |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/encoding-mapping.yaml | Maps source statements to rule IDs/predicates for traceability. |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/encoding-decisions.yaml | Archived decisions file (schema + traceability gaps: alternatives key name + hll_refs empty). |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/corpus-sources.yaml | Archived source capture + derivation chain details for seif 8. |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/corpus-report.md | Archived corpus report for seif 8. |
| mistaber/corpus/yoreh_deah/siman_87/seif_8/corpus-chain.mermaid | Mermaid graph of the source chain for seif 8. |
| mistaber/corpus/corpus-manifest.yaml | Adds seif 87:8 entry to the global corpus manifest and updates progress totals. |
| CLAUDE.md | Updates documentation example for checkpoint artifact payload shape. |
Comments suppressed due to low confidence (1)
mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/test_yd_87_8.py:140
- [IMPORTANT]
test_yd_87_8.pyclaims it validates the chaya+nasiyovei boundary, but there are no pytest assertions covering theis_nasiyovei_chaya_mixture/ d’rabanan behavior (the file currently only tests beheima+nasiyovei, mei_chalav boundary, and of+nasiyovei). Add a chaya test block so the boundary case is enforced by CI.
def test_of_nasiyovei_hanaah_mutar(self, engine):
result = engine.analyze(self.FACTS, world="mechaber")
atoms = _atoms(result)
assert any("heter(hanaah,m3)" in a for a in atoms), (
"of+nasiyovei hanaah should be mutar (d'rabanan BB)"
)
Resolves 7 of 8 Copilot review comments on PR #258: - fix encoding-decisions.yaml: alternatives.approach → alternatives.choice (schema alignment with seif_7 pattern) - fix scenario_pos_87_8.hll: add @show(holds/2) (required projection) - add scenario_neg_87_8.hll to corpus archive (required companion artifact) - add validation-report-validate.md + validation-report-review.md to archive (present in seif_7 archive, now added for seif_8) - fix validation-report.md: correct rule count 18→19, remove stale "Torah in makor chain" claim - fix seif_8.hll @encoding_note for marit ayin: replace Cyrillic with ASCII (Cyrillic was stripped to empty string during LP compilation) - populate hll_refs in encoding-decisions.yaml for all 4 decisions Not fixed: comment re @Madrega on r_nasiyovei_of_rema_marit_exempt — this was intentionally removed per project owner instruction (exemption predicates do not carry madrega, consistent with heter_hanaah pattern across the corpus; seif_4 is inconsistent on this point). Co-authored-by: Mistaber Code <code@mistaber.ai>
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.
Encoding Summary
Key Halachic Content
rema_of_exempt_nasiyovei); Shach disputes — encoded asannotation+dispute(shach, rema, of_nasiyovei_marit_ayin), not as direct dinSource References
New Predicates
nasiyovei_d_chalva(food_category),mixture_has_nasiyovei,is_nasiyovei_chalav_mixture,is_nasiyovei_of_mixture,is_nasiyovei_chaya_mixture,rema_of_exempt_nasiyoveiFixes Applied During Encoding Cycle
is_derech_bishuldefault added foris_nasiyovei_chalav_mixture@madregaremoved from exemption ruler_nasiyovei_of_rema_marit_exemptasserts(shach,...)removed → annotation on Rema rule +dispute()structural factrequires_maras_ayin_markerremoved — world-less predicate contradicts Rema's exemption in the same seifArtifacts
Archived to
mistaber/corpus/yoreh_deah/siman_87/seif_8/Generated by Mistaber Code — Computational Halacha Encoding Agent