Step 15: Verification — the Shema Test

Wire HaltConditions.check_all into BereishitCycle.erev_voker so the
three cardinal sin monitors (avodah zarah, shfichut damim, gilui arayot)
actually halt the pipeline. Previously dead code, now live.

Add step15_shema_test.exs — Architecture §6.3 (The Shema Test):
1. Te'amim reception — text's own divisions guide havdalah
2. Ketiv/qere preservation — dual readings never collapse
3. Cloud obedience — Shabbat blocks processing
4. Manna fidelity — no provision means wait
5. Context immutability — ShemaContext unchanged at every stage
6. Halt condition integration — pipeline halts on cardinal sin
7. Full pipeline end-to-end — Bereishit 1:1 through to output

68 tests, 0 failures (46 existing + 22 new).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott KarpandClaude Opus 4.6 committed 2026-03-12 18:01:05 -04:00
1 parent c67672777b
commit 5a93056af4
2 files changed
+492 -6

No files matched your search

@@ -19,7 +19,7 @@ defmodule VavPipeline.BereishitCycle do
Latency budget (Construction spec §2.5): 5000ms total
"""
alias VavPipeline.{Specification, CycleLog, Manna,
alias VavPipeline.{Specification, CycleLog, Manna, HaltConditions,
ShoreshEngineClient, TalmudicEngineClient, SanhedrinClient}
require Logger
@@ -213,13 +213,32 @@ defmodule VavPipeline.BereishitCycle do
# Enforce anti-hoarding
Manna.enforce_anti_hoarding()
# Step 14: Route unresolved cases to Talmudic Engine / Sanhedrin
# Route unresolved, then check halt conditions on final output
case result do
{:unresolved, data} ->
route_if_unresolved(data, context)
{:ok, data} ->
check_halt_on_output(data)
_ ->
result
{:unresolved, data} ->
routed = route_if_unresolved(data, context)
case routed do
{:ok, routed_data} -> check_halt_on_output(routed_data)
other -> other
end
other ->
other
end
end
# --- Halt Check ---
defp check_halt_on_output(data) do
results = Map.get(data, :named_results, [])
case HaltConditions.check_all(results) do
:clear -> {:ok, data}
{:halt, condition, reason} -> {:halted, condition, reason}
end
end