Phase 2 review corrections — three spec violations fixed

1. Chatzotzrot signal mapping corrected to match Architecture §3.12:
   assembly_all→tekiah, assembly_leaders→teruah,
   breaking_camp→tekiah_teruah, moadim→tekiah_tekiah.
   Four of five patterns were swapped. All five now match Bamidbar 10.

2. Manna parse_datetime(nil) bug fixed: missing expires_at now fails
   validation instead of silently returning DateTime.utc_now() which
   created a race condition where manna appeared expired.

3. Festival detection implemented in cloud.ex: pre-computed Gregorian
   dates for Pesach, Shavuot, Rosh Hashanah, Yom Kippur, Sukkot,
   Shemini Atzeret (2025-2028). Pipeline now halts on Yom Tov as
   Torah requires. Step 15 verification now covers festival rest.

76 tests, 0 failures (68 prior + 8 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 20:29:24 -04:00
1 parent 5a93056af4
commit af7522e977
5 files changed
+176 -30

No files matched your search

+17
View File
@@ -205,6 +205,23 @@ defmodule Step15ShemaTest do
assert {:transition, :shabbat_rest} = result
end
test "festival cloud state prevents processing — Pesach" do
# 15 Nisan 5787 = 2 April 2026
{:ok, pesach, _} = DateTime.from_iso8601("2026-04-02T12:00:00Z")
{:ok, context} = Shema.receive_context_at(@scope, pesach)
assert {:major_transition, :festival_rest, %{festival: :pesach}} = context.cloud_state
# Pipeline would return {:transition, :festival_rest}
result =
case context.cloud_state do
{:major_transition, signal, _params} -> {:transition, signal}
_ -> :would_process
end
assert {:transition, :festival_rest} = result
end
test "cloud_not_visible triggers waiting" do
# Manually construct context with cloud_not_visible
{:ok, wednesday, _} = DateTime.from_iso8601(@wednesday_noon)