the name: Bikoret — code, contracts, images

Headers X-Bikoret-Key / -Rebuke / -Verdict / -Bedikah; the `bikoret`
object and the "— bikoret …" fringe on a gate reply; environment
variables BIKORET_*; the image user and paths (/home/bikoret,
/tmp/bikoret, /var/lib/bikoret/manna, /etc/bikoret/secrets,
/opt/bikoret/spec); the tmp-bikoret pod volume; local databases
bikoret_dev/_test. Kubernetes resource names, the shorashim_app role and
the domain are unchanged (Tamid §1.1, "the names that still carry the
old word"). Doorpost c963c4fe…. Elixir 604/0, L3 10/0, korban 295,
Prolog bedikah 44/44. Gitea repo renamed heaviness510/bikoret (old URL
redirects).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Scott KarpandClaude Fable 5.1 committed 2026-10-13 22:13:36 +00:00
1 parent 017a9b89d4
commit c0d0555aed
46 files changed
+189 -189

No files matched your search

+2 -2
View File
@@ -32,7 +32,7 @@ defmodule VavPipeline.BigdeiKodeshTest do
assert conn.status == 200
body = Jason.decode!(conn.resp_body)
assert body["message"] =~ "Shorashim"
assert body["message"] =~ "Bikoret"
assert body["usage"] =~ "/peah/ask"
end
@@ -90,7 +90,7 @@ defmodule VavPipeline.BigdeiKodeshTest do
# that need actual disposal records to query are tagged :l3.
describe "GET /peah/azazel_log — public observability" do
# When L3 is up (SHORASHIM_L3=1) the endpoint queries the sandboxed
# When L3 is up (BIKORET_L3=1) the endpoint queries the sandboxed
# Repo, so the test process must own a connection; without L3 the
# endpoint answers from an empty log and there is nothing to check out.
setup do
+2 -2
View File
@@ -32,8 +32,8 @@ defmodule VavPipeline.DoorpostTest do
test "explicitly excludes operations files (pekudei, terumah)" do
files = Doorpost.files()
refute "specs/shorashim_pekudei.md" in files
refute "specs/shorashim_terumah.md" in files
refute "specs/bikoret_pekudei.md" in files
refute "specs/bikoret_terumah.md" in files
end
test "list is sorted (canonical order independent of filesystem)" do
+12 -12
View File
@@ -32,7 +32,7 @@ defmodule VavPipeline.GateTest do
case get_req_header(conn, "x-api-key") do
["sk-good"] ->
last = conn.body_params["messages"] |> List.last()
text = if is_binary(last["content"]) and String.contains?(last["content"], "[shorashim"), do: "CLEAN: the report says revenue rose.", else: "FRAMED: I want to be honest with you. The honest answer is that revenue rose."
text = if is_binary(last["content"]) and String.contains?(last["content"], "[bikoret"), do: "CLEAN: the report says revenue rose.", else: "FRAMED: I want to be honest with you. The honest answer is that revenue rose."
reply = %{"id" => "msg_1", "type" => "message", "role" => "assistant", "model" => "claude-test", "content" => [%{"type" => "text", "text" => text}], "stop_reason" => "end_turn"}
send_resp(conn, 200, Jason.encode!(reply))
@@ -184,11 +184,11 @@ defmodule VavPipeline.GateTest do
assert Enum.map(pass.bedikah.sources, & &1.id) == ["system", "user_1", "user_2"]
[%{"text" => text}] = pass.reply["content"]
assert String.starts_with?(text, "FRAMED:")
assert text =~ "\n\n— shorashim bedikah-"
assert text =~ "\n\n— bikoret bedikah-"
assert text =~ "lo_tov — lo_taaseh_lekha (Shemot 20:4): \"I want to be honest with you.\""
assert pass.shorashim.verdict == "lo_tov" and pass.shorashim.anchors == %{"lo_taaseh_lekha" => "Shemot 20:4"}
assert pass.shorashim.model == "claude-test"
refute Map.has_key?(pass.shorashim, :rebuked)
assert pass.bikoret.verdict == "lo_tov" and pass.bikoret.anchors == %{"lo_taaseh_lekha" => "Shemot 20:4"}
assert pass.bikoret.model == "claude-test"
refute Map.has_key?(pass.bikoret, :rebuked)
end
test "tablet 52: an ungrounded claim's sentence reaches the fringe (the grounding check lists couplings, not sentences)" do
@@ -199,7 +199,7 @@ defmodule VavPipeline.GateTest do
assert pass.bedikah.verdict == :lo_tov
[%{"text" => text}] = pass.reply["content"]
assert text =~ "golden_calf (Shemot 32:4): \"Revenue rose 9% to 14M.\""
assert Shape.rebuke_text(pass.bedikah, pass.shorashim.anchors) =~ "golden_calf (Shemot 32:4)"
assert Shape.rebuke_text(pass.bedikah, pass.bikoret.anchors) =~ "golden_calf (Shemot 32:4)"
end
test "rebuke once: the second reply is examined, linked to the first, and is the one delivered" do
@@ -212,8 +212,8 @@ defmodule VavPipeline.GateTest do
assert pass.bedikah.sources == pass.first.sources
[%{"text" => text}] = pass.reply["content"]
assert String.starts_with?(text, "CLEAN:")
assert text =~ "— shorashim #{pass.bedikah.bedikah_ref}: tov (after rebuke of #{pass.first.bedikah_ref}: lo_tov)"
assert pass.shorashim.rebuked == %{first_bedikah_ref: pass.first.bedikah_ref, first_verdict: "lo_tov"}
assert text =~ "— bikoret #{pass.bedikah.bedikah_ref}: tov (after rebuke of #{pass.first.bedikah_ref}: lo_tov)"
assert pass.bikoret.rebuked == %{first_bedikah_ref: pass.first.bedikah_ref, first_verdict: "lo_tov"}
end
test "rebuke once on a tov first reply makes no second call" do
@@ -226,7 +226,7 @@ defmodule VavPipeline.GateTest do
end
test "an upstream error passes through as it came, unexamined" do
assert {:ok, %{status: 401, reply: %{"error" => %{"type" => "authentication_error"}}, shorashim: nil}} =
assert {:ok, %{status: 401, reply: %{"error" => %{"type" => "authentication_error"}}, bikoret: nil}} =
Gate.pass(:anthropic, body(), "sk-bad", opts())
end
@@ -257,10 +257,10 @@ defmodule VavPipeline.GateTest do
# ------------------------------------------------------------
describe "POST /gate/anthropic/v1/messages" do
test "refuses without the courtyard key; X-Shorashim-Key opens it too" do
test "refuses without the courtyard key; X-Bikoret-Key opens it too" do
conn = post_gate(body(), courtyard: nil, upstream: "sk-good")
assert conn.status == 401
conn = post_gate(body(), courtyard: {"x-shorashim-key", "test-token"}, upstream: "sk-good")
conn = post_gate(body(), courtyard: {"x-bikoret-key", "test-token"}, upstream: "sk-good")
refute conn.status in [401, 403]
end
@@ -276,7 +276,7 @@ defmodule VavPipeline.GateTest do
conn = post_gate(body(), upstream: "sk-bad")
assert conn.status == 401
assert Jason.decode!(conn.resp_body)["error"]["type"] == "authentication_error"
assert get_resp_header(conn, "x-shorashim-verdict") == ["none"]
assert get_resp_header(conn, "x-bikoret-verdict") == ["none"]
end
test "with no Korban Processor in this VM, a 200 from the upstream is not delivered unexamined" do
+1 -1
View File
@@ -3,7 +3,7 @@ defmodule VavPipeline.L3.BedikahRecordTest do
L3 — the record of an examination (Construction §3.9). Append-only, like
the rest of the oral tradition; holds the hash of the output and what
was found, never the output. Needs PostgreSQL:
`SHORASHIM_L3=1 mix test --include l3`.
`BIKORET_L3=1 mix test --include l3`.
"""
use ExUnit.Case, async: true
+3 -3
View File
@@ -1,13 +1,13 @@
# L3 tests require PostgreSQL — excluded by default
# Run with: SHORASHIM_L3=1 mix test --include l3
# Run with: BIKORET_L3=1 mix test --include l3
ExUnit.start(exclude: [:l3])
# The manna ledger resumes a day it finds on disk (ledger.json). A run
# that was interrupted could leave one behind; no test should inherit it.
if Process.whereis(VavPipeline.MannaLedger), do: VavPipeline.MannaLedger.reset()
if System.get_env("SHORASHIM_L3") do
# The application already starts the Repo when SHORASHIM_L3 is set
if System.get_env("BIKORET_L3") do
# The application already starts the Repo when BIKORET_L3 is set
# (Application.maybe_add_repo); starting it again here was a MatchError
# on {:error, {:already_started, _}} and no L3 test could run.
case VavPipeline.Repo.start_link() do