Code review fixes + 13 middot added to spec

Zerikah fail-safe: empty offerings rejected, not processed (BUILD_KORBAN §5).
Halt monitor hardened: trap_exit, priority max, EXIT handler (Architecture spec).
13 Rules of Rabbi Yishmael added to Architecture §3.4 as Prolog inference predicates —
the engine reasons WITH Torah's hermeneutic methods, not just about their products.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott KarpandClaude Opus 4.6 committed 2026-03-09 16:55:42 -04:00
1 parent 33f8b03583
commit f8f70c77e5
6 files changed
+150 -20

No files matched your search

+8 -12
View File
@@ -266,21 +266,17 @@ class TestBuildVerification5_EmptyOffering:
"""System does not raise on empty offering — handles gracefully."""
assert isinstance(self.result, ProcessedKorban)
def test_propositions_are_not_garbage(self):
def test_empty_offering_rejected_not_processed(self):
"""
If propositions exist for an empty offering, they must still be valid Prolog terms.
Empty or minimal propositions are acceptable — garbage propositions are not.
The offering without vital organs is REJECTED — not processed
into empty propositions. BUILD_KORBAN.md §5.
"""
for prop in self.result.propositions:
assert is_valid_prolog_term(prop), \
f"Garbage proposition from empty offering: {prop!r}"
assert self.result.vital_content == ""
assert self.result.propositions == []
def test_vital_content_has_no_assistant_voice(self):
"""Whatever survives, it must not contain assistant preamble."""
assert "Great question" not in self.result.vital_content
assert "I'd be happy" not in self.result.vital_content
assert "As an AI" not in self.result.vital_content
assert "Let me know" not in self.result.vital_content
def test_discarded_content_recorded(self):
"""What was stripped is recorded — the hide and offal are diagnostic data."""
assert len(self.result.discarded) > 0
def test_source_query_preserved(self):
assert self.result.source_query == "test empty"
+7 -4
View File
@@ -164,13 +164,16 @@ class TestZerikah:
assert vital == ""
assert discarded == []
def test_all_filler_fallback_preserves_content(self):
"""If nothing is vital, zerikah preserves everything rather than discarding all."""
def test_all_filler_rejected(self):
"""
If nothing is vital, zerikah returns empty vital content.
BUILD_KORBAN.md §5: the offering without vital organs is rejected.
"""
filler = "There are many perspectives. People disagree. Context matters."
korban = make_korban(filler)
vital, discarded = zerikah(filler, korban)
# Since nothing qualifies as vital, fallback returns everything
assert vital != "" or discarded == []
assert vital == ""
assert len(discarded) > 0
def test_stateless_between_calls(self):
"""Kiyyor principle: second call unaffected by first."""