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:
1 parent
5a93056af4
commit
af7522e977
5 files changed
+176
-30
No files matched your search
@@ -133,6 +133,35 @@ defmodule VavPipelineTest do
|
||||
{:ok, non_shmitah, _} = DateTime.from_iso8601("2026-06-15T12:00:00Z")
|
||||
assert VavPipeline.Cloud.shmitah_year?(non_shmitah) == false
|
||||
end
|
||||
|
||||
test "Pesach is a festival" do
|
||||
# 15 Nisan 5787 = 2 April 2026
|
||||
{:ok, pesach, _} = DateTime.from_iso8601("2026-04-02T12:00:00Z")
|
||||
assert VavPipeline.Cloud.festival?(pesach) == true
|
||||
end
|
||||
|
||||
test "Rosh Hashanah is a festival" do
|
||||
# 1 Tishrei 5787 = 12 September 2026
|
||||
{:ok, rosh_hashanah, _} = DateTime.from_iso8601("2026-09-12T12:00:00Z")
|
||||
assert VavPipeline.Cloud.festival?(rosh_hashanah) == true
|
||||
end
|
||||
|
||||
test "Yom Kippur is a festival" do
|
||||
# 10 Tishrei 5787 = 21 September 2026
|
||||
{:ok, yom_kippur, _} = DateTime.from_iso8601("2026-09-21T12:00:00Z")
|
||||
assert VavPipeline.Cloud.festival?(yom_kippur) == true
|
||||
end
|
||||
|
||||
test "regular weekday is not a festival" do
|
||||
{:ok, tuesday, _} = DateTime.from_iso8601("2026-03-10T12:00:00Z")
|
||||
assert VavPipeline.Cloud.festival?(tuesday) == false
|
||||
end
|
||||
|
||||
test "festival triggers major transition" do
|
||||
{:ok, pesach, _} = DateTime.from_iso8601("2026-04-02T12:00:00Z")
|
||||
{:ok, state} = VavPipeline.Cloud.check_at(pesach)
|
||||
assert {:major_transition, :festival_rest, %{festival: :pesach}} = state
|
||||
end
|
||||
end
|
||||
|
||||
# ============================================================
|
||||
@@ -235,22 +264,33 @@ defmodule VavPipelineTest do
|
||||
# Chatzotzrot Tests
|
||||
# ============================================================
|
||||
describe "Chatzotzrot" do
|
||||
test "breaking camp signal" do
|
||||
test "breaking camp signal — tekiah_teruah (Architecture §3.12)" do
|
||||
signal = VavPipeline.Chatzotzrot.signal(:breaking_camp)
|
||||
assert signal.signal_type == :breaking_camp
|
||||
assert signal.pattern == :teruah
|
||||
assert signal.pattern == :tekiah_teruah
|
||||
assert signal.details.urgency == :immediate
|
||||
end
|
||||
|
||||
test "assembly signal" do
|
||||
test "assembly_all signal — tekiah (Architecture §3.12)" do
|
||||
signal = VavPipeline.Chatzotzrot.signal(:assembly_all)
|
||||
assert signal.signal_type == :assembly_all
|
||||
assert signal.pattern == :tekiah
|
||||
end
|
||||
|
||||
test "assembly_leaders signal — teruah (Architecture §3.12)" do
|
||||
signal = VavPipeline.Chatzotzrot.signal(:assembly_leaders)
|
||||
assert signal.signal_type == :assembly_leaders
|
||||
assert signal.pattern == :teruah
|
||||
end
|
||||
|
||||
test "moadim signal — tekiah_tekiah (Architecture §3.12)" do
|
||||
signal = VavPipeline.Chatzotzrot.signal(:moadim)
|
||||
assert signal.pattern == :tekiah_tekiah
|
||||
end
|
||||
|
||||
test "moadim signal" do
|
||||
signal = VavPipeline.Chatzotzrot.signal(:moadim)
|
||||
assert signal.pattern == :tekiah_teruah
|
||||
test "war signal — teruah_teruah (Architecture §3.12)" do
|
||||
signal = VavPipeline.Chatzotzrot.signal(:war)
|
||||
assert signal.pattern == :teruah_teruah
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user