defmodule VavPipeline.Tablet55EngineRootNameTest do @moduledoc """ Tablet 55: the Talmudic Engine names roots by letter (bet_resh_aleph, read from "bet-resh-aleph"). The pipeline was sending it the Hebrew, which its verse facts never match — roots in, no verses out, and a "resolved" reading over the emptiness. """ use ExUnit.Case, async: true alias VavPipeline.BereishitCycle test "from the Shoresh Engine's letter names" do assert BereishitCycle.engine_root_name(%{shoresh: "ברא", shoresh_letters: ["bet", "resh", "aleph"]}) == "bet-resh-aleph" end test "from the Hebrew alone (the L1 fallback), finals folded" do assert BereishitCycle.engine_root_name(%{shoresh: "דבר", shoresh_letters: []}) == "dalet-bet-resh" assert BereishitCycle.engine_root_name(%{shoresh: "מלך"}) == "mem-lamed-kaf" end test "nothing nameable → nil, never a Hebrew string the engine cannot read" do assert BereishitCycle.engine_root_name(%{shoresh: nil}) == nil assert BereishitCycle.engine_root_name(%{shoresh: "x1"}) == nil assert BereishitCycle.engine_root_name(%{}) == nil end end