tablet 55, third: roots the engine can read; abstentions count; an empty trace is no ground
Live after the second commit (vav :046010f0): a monetary case naming bereishit 1:1 convened three judges and came back "accepted" — the interpret seat said "resolved (5 roots, 0 verses)" with reading(mitzvot_count(0),verse_count(0),grounded_in([],[])), the other two seats said teiku, and one accept beat two abstentions (the reply showed majority 1, minority 2). Three defects the tests could not see: - The engine names roots by letter (bet_resh_aleph; json_bridge reads "bet-resh-aleph") and the pipeline sent it the Hebrew, which its verse facts never match. BereishitCycle.engine_root_name/1 builds the engine's name from the Shoresh Engine's letter names or, for the L1 fallback, from the Hebrew with finals folded; the router sends that. (The cycle's own Talmudic routing still sends the Hebrew — recorded, not changed here: it alters /peah/ask and needs its own verification.) - judge.erl: "resolved" with no verse and no mitzvah is a reading coupled to nothing (avodah_zarah.pl Form 2); the judge abstains and says "resolved on an empty trace; nothing to stand on". - panel.erl: the majority is the verdict with the most votes, abstentions included; an abstaining plurality or an accept/reject tie is teiku. EUnit 57/0 (plurality, tie, empty trace). Elixir 632/0 (engine_root_name from names, from Hebrew, nil on nothing; the no-engine case is an abstaining majority of one, teiku). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
046010f0ed
commit
4bffa01e0e
7 files changed
+120
-7
No files matched your search
@@ -970,6 +970,40 @@ defmodule VavPipeline.BereishitCycle do
|
||||
|
||||
defp letters_to_hebrew(_), do: nil
|
||||
|
||||
# The inverse: Hebrew consonant → letter name, finals folded to their base.
|
||||
@hebrew_to_name Map.new(@consonant_names, fn {name, heb} -> {heb, name} end)
|
||||
|> Map.merge(%{"ך" => "kaf", "ם" => "mem", "ן" => "nun", "ף" => "pe", "ץ" => "tsadi"})
|
||||
|
||||
@doc """
|
||||
The root as the Talmudic Engine names it — letter names joined by `-`
|
||||
(`json_bridge` `parse_root_name` → `bet_resh_aleph`, the form of its
|
||||
verse facts). From the letter names the Shoresh Engine gives when it
|
||||
has them, else from the Hebrew (the L1 fallback carries only that).
|
||||
Tablet 55: the engine was being sent the Hebrew, which its facts never
|
||||
match — 5 roots in, 0 verses out, and "resolved" over the emptiness.
|
||||
`nil` when the root carries nothing nameable.
|
||||
"""
|
||||
@spec engine_root_name(map()) :: String.t() | nil
|
||||
def engine_root_name(root) when is_map(root) do
|
||||
letters = Map.get(root, :shoresh_letters) || []
|
||||
|
||||
names =
|
||||
if is_list(letters) and letters != [] do
|
||||
Enum.map(letters, &String.downcase(to_string(&1)))
|
||||
else
|
||||
root
|
||||
|> Map.get(:shoresh)
|
||||
|> case do
|
||||
s when is_binary(s) -> s |> String.graphemes() |> Enum.map(&Map.get(@hebrew_to_name, &1))
|
||||
_ -> [nil]
|
||||
end
|
||||
end
|
||||
|
||||
if names != [] and Enum.all?(names, &is_binary/1), do: Enum.join(names, "-"), else: nil
|
||||
end
|
||||
|
||||
def engine_root_name(_), do: nil
|
||||
|
||||
# ============================================================
|
||||
# Private helpers
|
||||
# ============================================================
|
||||
|
||||
@@ -1250,7 +1250,11 @@ defmodule VavPipeline.BigdeiKodesh.Router do
|
||||
|
||||
{:ok,
|
||||
%{
|
||||
roots: Enum.map(roots_full, & &1.shoresh),
|
||||
# The engine's verse facts name roots by letter — bet_resh_aleph —
|
||||
# and json_bridge reads "bet-resh-aleph". The cycle's root carries
|
||||
# the letter names beside the Hebrew; the Hebrew never matches
|
||||
# (live, 2026-10-19: 5 roots sent, 0 verses found, "resolved").
|
||||
roots: roots_full |> Enum.map(&VavPipeline.BereishitCycle.engine_root_name/1) |> Enum.reject(&is_nil/1),
|
||||
roots_full: roots_full,
|
||||
torah_ref: {String.to_atom(scope.book), scope.chapter, scope.verse},
|
||||
read_from: Map.get(state, :roots_read_from)
|
||||
|
||||
@@ -403,8 +403,10 @@ defmodule VavPipeline.BigdeiKodeshTest do
|
||||
body = Jason.decode!(conn.resp_body)
|
||||
assert body["deliberation"]["outcome"] == "teiku"
|
||||
assert body["deliberation"]["panel_size"] == 1
|
||||
assert body["deliberation"]["majority"]["votes"] == 0
|
||||
assert body["deliberation"]["minority"]["reasoning"] =~ "no consultation"
|
||||
# the one judge abstained: an abstaining majority of one, no dissent
|
||||
assert body["deliberation"]["majority"]["votes"] == 1
|
||||
assert body["deliberation"]["majority"]["reasoning"] =~ "no consultation"
|
||||
assert body["deliberation"]["minority"]["votes"] == 0
|
||||
end
|
||||
|
||||
# Tablet 55: with a consultation behind the judges, the dialectic
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
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
|
||||
Reference in new issue
Block a user