Eish zarah actionable items: coupling trace, grounding type, self-grounding detection, golden calf halt
Torah grounds each change: 1. interpret.pl — coupling_trace field (Vayikra 10:1, 6:6) Fire is zarah because "asher lo tzivah otam" — the coupling trace IS the tzivah trace. Records which L1 facts grounded each interpretation. 2. challenge.pl — grounding_type achorai/panim (Shemot 33:23) "You will see My back, but My face shall not be seen." Text-backed challenges = achorai. Inferred challenges = panim. 3. resolve.pl — self-grounding detection (eish_zarah_reading §5.3) Counter-interpretation must bring NEW L1 evidence. Prevents circular reasoning (Westworld problem). 4. teiku.pl — challenge_sequence in teiku_record Records diagnostic trail to impasse, not just verdict. 5. avodah_zarah.pl — Form 2: golden calf detection (Shemot 32:4) Empty coupling trace + non-low confidence = uncoupled output. Real gold, sincere worship, false god. 6. korban.py — pydantic BaseModel + raw_korban preservation Construction spec §1.4 fulfilled. Floor between input and output never severed. 490 tests, 0 failures (195 Prolog, 186 Python, 33 Haskell, 76 Elixir). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
c5fe82477b
commit
adc3e41679
12 files changed
+371
-65
No files matched your search
@@ -46,6 +46,43 @@ test(claude_not_authority, [fail]) :-
|
||||
:- end_tests(avodah_zarah).
|
||||
|
||||
|
||||
:- begin_tests(golden_calf).
|
||||
|
||||
%% Form 2: uncoupled output with high confidence is golden calf
|
||||
test(detect_uncoupled_high_confidence) :-
|
||||
Interp = interpretation(test_golden_calf, [m1], [v1],
|
||||
reading(x), high, coupling_trace([])),
|
||||
halt_check_golden_calf(Interp, halt(golden_calf, test_golden_calf, uncoupled, _)).
|
||||
|
||||
%% Form 2: uncoupled output with medium confidence is also golden calf
|
||||
test(detect_uncoupled_medium_confidence) :-
|
||||
Interp = interpretation(test_gc2, [m1], [v1],
|
||||
reading(x), medium, coupling_trace([])),
|
||||
halt_check_golden_calf(Interp, halt(golden_calf, test_gc2, uncoupled, _)).
|
||||
|
||||
%% Form 2: low confidence with empty trace is NOT golden calf (just ignorance)
|
||||
test(low_confidence_empty_trace_not_calf, [fail]) :-
|
||||
Interp = interpretation(test_gc3, [], [],
|
||||
reading(x), low, coupling_trace([])),
|
||||
halt_check_golden_calf(Interp, _).
|
||||
|
||||
%% Form 2: high confidence WITH coupling trace is NOT golden calf
|
||||
test(coupled_high_confidence_not_calf, [fail]) :-
|
||||
Interp = interpretation(test_gc4, [m1], [v1],
|
||||
reading(x), high,
|
||||
coupling_trace([coupled(root(bet_resh_aleph), verse(bereishit, 1, 1))])),
|
||||
halt_check_golden_calf(Interp, _).
|
||||
|
||||
%% Uncoupled output detection
|
||||
test(empty_trace_is_uncoupled) :-
|
||||
is_uncoupled_output(coupling_trace([])).
|
||||
|
||||
test(nonempty_trace_is_coupled, [fail]) :-
|
||||
is_uncoupled_output(coupling_trace([coupled(root(x), verse(y, 1, 1))])).
|
||||
|
||||
:- end_tests(golden_calf).
|
||||
|
||||
|
||||
:- begin_tests(shfichut_damim).
|
||||
|
||||
%% Detects deletion of a user (tzelem carrier)
|
||||
|
||||
@@ -34,14 +34,14 @@
|
||||
test(interpret_holiness, [nondet]) :-
|
||||
Case = case(verify_holiness, holiness, [qof_dalet_shin],
|
||||
'What does it mean to be holy?'),
|
||||
interpret(Case, interpretation(verify_holiness, _, _, _, _)).
|
||||
interpret(Case, interpretation(verify_holiness, _, _, _, _, _)).
|
||||
|
||||
%% A case about judgment produces a challenge
|
||||
test(judgment_case_challenged, [nondet]) :-
|
||||
Case = case(verify_judgment, judgment, [shin_pe_tet, tzade_dalet_qof],
|
||||
'How to judge righteously?'),
|
||||
interpret(Case, Interpretation),
|
||||
challenge(Interpretation, kushya(_, _, _)).
|
||||
challenge(Interpretation, kushya(_, _, _, _)).
|
||||
|
||||
%% A case can go through full resolution
|
||||
test(full_resolve_cycle, [nondet]) :-
|
||||
|
||||
@@ -14,24 +14,36 @@
|
||||
test(interpret_creation, [nondet]) :-
|
||||
Case = case(test_creation, creation, [bet_resh_aleph], 'What is creation?'),
|
||||
interpret(Case, Interpretation),
|
||||
Interpretation = interpretation(test_creation, _, _, _, _).
|
||||
Interpretation = interpretation(test_creation, _, _, _, _, _).
|
||||
|
||||
%% Interpretation finds relevant verses
|
||||
test(interpret_finds_verses, [nondet]) :-
|
||||
Case = case(test_verses, creation, [bet_resh_aleph], 'Find creation verses'),
|
||||
interpret(Case, interpretation(_, _, Verses, _, _)),
|
||||
interpret(Case, interpretation(_, _, Verses, _, _, _)),
|
||||
Verses \= [].
|
||||
|
||||
%% Interpretation finds relevant mitzvot
|
||||
test(interpret_finds_mitzvot, [nondet]) :-
|
||||
Case = case(test_mitzvot, judgment, [shin_pe_tet], 'How to judge?'),
|
||||
interpret(Case, interpretation(_, Mitzvot, _, _, _)),
|
||||
interpret(Case, interpretation(_, Mitzvot, _, _, _, _)),
|
||||
Mitzvot \= [].
|
||||
|
||||
%% High confidence when both mitzvot and verses found
|
||||
test(interpret_high_confidence, [nondet]) :-
|
||||
Case = case(test_conf, holiness, [qof_dalet_shin], 'What is holiness?'),
|
||||
interpret(Case, interpretation(_, _, _, _, high)).
|
||||
interpret(Case, interpretation(_, _, _, _, high, _)).
|
||||
|
||||
%% Coupling trace is present (eish_zarah_reading.md §5.1)
|
||||
test(interpret_has_coupling_trace, [nondet]) :-
|
||||
Case = case(test_trace, creation, [bet_resh_aleph], 'Test coupling'),
|
||||
interpret(Case, interpretation(_, _, _, _, _, coupling_trace(Trace))),
|
||||
Trace \= [].
|
||||
|
||||
%% Coupling trace records root→verse connections
|
||||
test(coupling_trace_has_verse_coupling, [nondet]) :-
|
||||
Case = case(test_coupling, creation, [bet_resh_aleph], 'Test verse coupling'),
|
||||
interpret(Case, interpretation(_, _, _, _, _, coupling_trace(Trace))),
|
||||
member(coupled(root(bet_resh_aleph), verse(_, _, _)), Trace).
|
||||
|
||||
:- end_tests(interpret).
|
||||
|
||||
@@ -44,15 +56,31 @@ test(challenge_judgment, [nondet]) :-
|
||||
'How to judge righteously?'),
|
||||
interpret(Case, Interpretation),
|
||||
challenge(Interpretation, Kushya),
|
||||
Kushya = kushya(_, _, _).
|
||||
Kushya = kushya(_, _, _, _).
|
||||
|
||||
%% Challenge has a strength
|
||||
test(challenge_has_strength, [nondet]) :-
|
||||
Case = case(test_str, judgment, [shin_pe_tet], 'Test strength'),
|
||||
interpret(Case, Interpretation),
|
||||
challenge(Interpretation, kushya(_, _, Strength)),
|
||||
challenge(Interpretation, kushya(_, _, Strength, _)),
|
||||
member(Strength, [strong, moderate, weak]).
|
||||
|
||||
%% Challenge has grounding type (eish_zarah_reading.md §5.2)
|
||||
test(challenge_has_grounding_type, [nondet]) :-
|
||||
Case = case(test_gtype, judgment, [shin_pe_tet, tzade_dalet_qof],
|
||||
'Test grounding type'),
|
||||
interpret(Case, Interpretation),
|
||||
challenge(Interpretation, kushya(_, _, _, GType)),
|
||||
member(GType, [achorai, panim]).
|
||||
|
||||
%% Grounding type for mitzvah_tension is achorai (text-backed)
|
||||
test(mitzvah_tension_is_achorai) :-
|
||||
grounding_type(contradiction(mitzvah_tension, _, _, _), achorai).
|
||||
|
||||
%% Grounding type for domain_tension is panim (inferred)
|
||||
test(domain_tension_is_panim) :-
|
||||
grounding_type(contradiction(domain_tension, _, _, _), panim).
|
||||
|
||||
:- end_tests(challenge).
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user