Skip to content

feat(ontology): encode YD 87:8 — nasiyovei d'chalva (mei chalav boundary) - #258

Merged
levi770 merged 4 commits into
mainfrom
session/RNekhoda/yd_87-8
Jun 3, 2026
Merged

feat(ontology): encode YD 87:8 — nasiyovei d'chalva (mei chalav boundary)#258
levi770 merged 4 commits into
mainfrom
session/RNekhoda/yd_87-8

Conversation

@levi770

@levi770 levi770 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Encoding Summary

  • Reference: SA YD 87:8
  • Topic: Nasiyovei d'chalva — distinct from mei chalav; d'oraita status with beheima
  • Rules: 19 encoded (seif_8.hll)
  • Worlds: base, mechaber, rema (+ shach dispute via annotation)
  • Tests: 15 QA scenarios, 11 pytest, tech-health 19/19
  • Encoding Decisions: 4 total (3 definitive, 1 probable)

Key Halachic Content

  • Yesh mi she'omer = Rosh (Chullin 8:51:2): «ואני אומר דנסיובי דחלבא אסור מדאורייתא»
  • Nasiyovei d'chalva (whey from curd) ≠ mei chalav → d'oraita with beheima
  • Three prohibitions: bishul + achiila + hanaah (even hefsed meruba, PMG SD 87:23)
  • Machloket: Tosafot/Behag/Pri Chadash → d'rabanan (Peleti sk16, PMG SD 87:23)
  • Boundary: of/chaya + nasiyovei = d'rabanan
  • Marit ayin for of+nasiyovei: Rema exempts (rema_of_exempt_nasiyovei); Shach disputes — encoded as annotation + dispute(shach, rema, of_nasiyovei_marit_ayin), not as direct din

Source References

  • Rosh on Chullin 8:51:2 → Tur YD 87 → Beit Yosef 87:7 → SA YD 87:8
  • PMG SD 87:23, Kaf HaChayim sk71, Peleti sk16, Chullin 114a

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_nasiyovei

Fixes Applied During Encoding Cycle

  • torah() removed from makor for achiila/bishul rules (Shemot 23:19 is general BB source, not nasiyovei-specific)
  • is_derech_bishul default added for is_nasiyovei_chalav_mixture
  • @madrega removed from exemption rule r_nasiyovei_of_rema_marit_exempt
  • Shach marit ayin: direct asserts(shach,...) removed → annotation on Rema rule + dispute() structural fact
  • requires_maras_ayin_marker removed — world-less predicate contradicts Rema's exemption in the same seif

Artifacts

Archived to mistaber/corpus/yoreh_deah/siman_87/seif_8/


Generated by Mistaber Code — Computational Halacha Encoding Agent

Mistaber Code 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>
Copilot AI review requested due to automatic review settings June 3, 2026 16:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yaml does not follow established schema (alternatives uses approach instead of choice; hll_refs left empty).
  • New @rule(r_nasiyovei_of_rema_marit_exempt) missing @madrega(...).
  • scenario_pos_87_8.hll missing 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.py claims it validates the chaya+nasiyovei boundary, but there are no pytest assertions covering the is_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)"
        )

Comment thread mistaber/corpus/yoreh_deah/siman_87/seif_8/encoding-decisions.yaml Outdated
Comment thread mistaber/corpus/yoreh_deah/siman_87/seif_8/validation-report.md
Comment thread mistaber/corpus/yoreh_deah/siman_87/seif_8/validation-report.md
Comment thread mistaber/dsl/corpus/yd_87/seif_8.hll
Comment thread mistaber/dsl/corpus/yd_87/seif_8.hll Outdated
Comment thread mistaber/corpus/yoreh_deah/siman_87/seif_8/encoding-decisions.yaml Outdated
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>
@levi770
levi770 merged commit b36de4b into main Jun 3, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants