cycle: one root, once — a verse that repeats a word (tablet 32a)

Reading roots from the verse (tablet 32) met a verse that carries אור
twice: the real engine answers per word and Bereishit 1:3 came back
with א-ו-ר listed twice, each already carrying positions 4 and 6.
uniq_by shoresh after normalization. Found by running the built image
against the real shoresh-engine binary, not by the suite.

460 tests, 0 failures on seeds 0 42 99.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Scott KarpandClaude Fable 5.1 committed 2026-10-04 16:54:38 +00:00
1 parent a48c22c5a3
commit 83fa5ac46b
2 files changed
+17 -1

No files matched your search

@@ -47,6 +47,8 @@ defmodule VavPipeline.Tablet32ReferenceTest do
cond do
# Devarim 6:5 opens וְאָהַבְתָּ — the engine would find א-ה-ב.
String.contains?(text, "ואהבת") -> [root(["aleph", "he", "bet"], "אהב", 8)]
# A verse with a repeated word: the engine answers per word.
String.contains?(text, "אור ויהי אור") -> List.duplicate(root(["aleph", "vav", "resh"], "אור", 207), 2)
String.match?(text, ~r/[\x{05D0}-\x{05EA}]/u) -> [root(["bet", "resh", "aleph"], "ברא", 203)]
true -> []
end
@@ -103,6 +105,14 @@ defmodule VavPipeline.Tablet32ReferenceTest do
assert body["answer"] =~ "Devarim 6:5"
end
test "a word the verse carries twice is one root, not two" do
conn = post_ask("bereishit 1:3")
body = Jason.decode!(conn.resp_body)
assert conn.status == 200
assert length(body["processing"]["roots_consulted"]) == 1
end
test "English around the reference changes nothing" do
conn = post_ask("What does Deuteronomy 6:5 command?")
body = Jason.decode!(conn.resp_body)