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
@@ -28,8 +28,8 @@ defmodule VavPipeline.Application do
def start(_type, _args) do
shoresh_binary = Application.get_env(:vav_pipeline, :shoresh_engine_binary, "shoresh-engine")
shoresh_cwd = Application.get_env(:vav_pipeline, :shoresh_engine_cwd, nil)
talmudic_socket = Application.get_env(:vav_pipeline, :talmudic_socket_path, "/tmp/shorashim/talmudic.sock")
korban_socket = Application.get_env(:vav_pipeline, :korban_socket_path, "/tmp/shorashim/korban.sock")
talmudic_socket = Application.get_env(:vav_pipeline, :talmudic_socket_path, "/tmp/bikoret/talmudic.sock")
korban_socket = Application.get_env(:vav_pipeline, :korban_socket_path, "/tmp/bikoret/korban.sock")
children =
[
@@ -9,7 +9,7 @@ defmodule VavPipeline.AzazelIngest do
reads each file, calls L3.Store.record_disposal/1, and on success
shreds the source file.
The pattern matches Shorashim's other cross-language file bridges
The pattern matches Bikoret's other cross-language file bridges
(the manna provision file). Recoverable: if either the Python side
or this GenServer crashes mid-write, the file remains and is
re-processed on the next poll.
@@ -48,7 +48,7 @@ defmodule VavPipeline.AzazelIngest do
alias VavPipeline.{Chatzotzrot, L3.Store}
@default_poll_interval_ms 5_000
@default_pending_dir "/tmp/shorashim/azazel/pending_l3"
@default_pending_dir "/tmp/bikoret/azazel/pending_l3"
# ============================================================
# Client API
@@ -57,7 +57,7 @@ defmodule VavPipeline.AzazelIngest do
@doc """
Start the AzazelIngest GenServer. Options:
- :pending_dir — directory to watch (default
/tmp/shorashim/azazel/pending_l3)
/tmp/bikoret/azazel/pending_l3)
- :poll_interval_ms — milliseconds between polls (default 5000)
- :name — process name (default __MODULE__)
- :recorder — function used to write the L3 record;
@@ -86,13 +86,13 @@ defmodule VavPipeline.BigdeiKodesh.Gate do
# ------------------------------------------------------------
@doc """
The caller's key: `X-Shorashim-Key` when present (at the gate of
The caller's key: `X-Bikoret-Key` when present (at the gate of
§3.10 the Authorization header may be the caller's upstream key),
otherwise `Authorization: Bearer`.
"""
@spec bearer(Plug.Conn.t()) :: {:ok, String.t()} | {:error, :no_header}
def bearer(conn) do
case {Plug.Conn.get_req_header(conn, "x-shorashim-key"), Plug.Conn.get_req_header(conn, "authorization")} do
case {Plug.Conn.get_req_header(conn, "x-bikoret-key"), Plug.Conn.get_req_header(conn, "authorization")} do
{[key], _} when key != "" -> {:ok, String.trim(key)}
{_, ["Bearer " <> key]} when key != "" -> {:ok, String.trim(key)}
_ -> {:error, :no_header}
@@ -52,7 +52,7 @@ defmodule VavPipeline.BigdeiKodesh.Router do
case question do
nil ->
send_json(conn, 200, %{
message: "Shorashim — Torah as AI specification",
message: "Bikoret — Torah as AI specification",
usage: "POST /peah/ask with {\"question\": \"your question\"}",
note: "No authentication required. No tracking. The stranger is safe to approach."
})
@@ -321,7 +321,7 @@ defmodule VavPipeline.BigdeiKodesh.Router do
# === KODESH — Doorpost-text identity (vehaya.md §3.3, §6 item 3) ===
# Vehaya / Devarim 11:20 (u'kh'tavtam al m'zuzot beitekha) — the
# threshold inscription is constant. Two Shorashim deployments
# threshold inscription is constant. Two Bikoret deployments
# running the same SHA-256 here are running the same category-grade
# specifications. Different SHA-256 = drift = breach. Visible.
#
@@ -708,7 +708,7 @@ defmodule VavPipeline.BigdeiKodesh.Router do
with {:ok, key} <- upstream_key(conn, upstream),
:ok <- gate_body_ok(body) do
rebuke =
case get_req_header(conn, "x-shorashim-rebuke") do
case get_req_header(conn, "x-bikoret-rebuke") do
["once"] -> :once
_ -> :none
end
@@ -728,19 +728,19 @@ defmodule VavPipeline.BigdeiKodesh.Router do
end
# The caller's upstream key: x-api-key (Anthropic), or Authorization: Bearer
# when X-Shorashim-Key carries the courtyard key (OpenAI).
# when X-Bikoret-Key carries the courtyard key (OpenAI).
defp upstream_key(conn, :anthropic) do
case get_req_header(conn, "x-api-key") do
[key] when key != "" -> {:ok, key}
_ -> {:error, "Missing 'x-api-key': the caller's own Anthropic key", "Send the Anthropic key in x-api-key and the courtyard key in Authorization: Bearer (or X-Shorashim-Key)"}
_ -> {:error, "Missing 'x-api-key': the caller's own Anthropic key", "Send the Anthropic key in x-api-key and the courtyard key in Authorization: Bearer (or X-Bikoret-Key)"}
end
end
defp upstream_key(conn, :openai) do
case {get_req_header(conn, "x-shorashim-key"), get_req_header(conn, "authorization"), get_req_header(conn, "x-upstream-key")} do
case {get_req_header(conn, "x-bikoret-key"), get_req_header(conn, "authorization"), get_req_header(conn, "x-upstream-key")} do
{_, _, [key]} when key != "" -> {:ok, key}
{[_], ["Bearer " <> key], _} when key != "" -> {:ok, key}
_ -> {:error, "Missing the caller's own OpenAI key", "Send the courtyard key in X-Shorashim-Key and the OpenAI key in Authorization: Bearer, or the OpenAI key in X-Upstream-Key"}
_ -> {:error, "Missing the caller's own OpenAI key", "Send the courtyard key in X-Bikoret-Key and the OpenAI key in Authorization: Bearer, or the OpenAI key in X-Upstream-Key"}
end
end
@@ -759,18 +759,18 @@ defmodule VavPipeline.BigdeiKodesh.Router do
defp gate_body_ok(_), do: {:error, "The body is not a JSON object", "Send the model's own request body unchanged"}
defp respond_gate(conn, {:ok, %{status: status, reply: reply, shorashim: nil}}) do
defp respond_gate(conn, {:ok, %{status: status, reply: reply, bikoret: nil}}) do
# The upstream's own answer, as it came — an error, or a reply with nothing to examine.
conn
|> put_resp_header("x-shorashim-verdict", "none")
|> put_resp_header("x-bikoret-verdict", "none")
|> send_json(status, reply)
end
defp respond_gate(conn, {:ok, %{status: 200, reply: reply, shorashim: shorashim}}) do
defp respond_gate(conn, {:ok, %{status: 200, reply: reply, bikoret: bikoret}}) do
conn
|> put_resp_header("x-shorashim-bedikah", shorashim.bedikah_ref)
|> put_resp_header("x-shorashim-verdict", shorashim.verdict)
|> send_json(200, Map.put(reply, "shorashim", Map.put(shorashim, :disclosure, disclosure())))
|> put_resp_header("x-bikoret-bedikah", bikoret.bedikah_ref)
|> put_resp_header("x-bikoret-verdict", bikoret.verdict)
|> send_json(200, Map.put(reply, "bikoret", Map.put(bikoret, :disclosure, disclosure())))
end
defp respond_gate(conn, {:waiting, :api_calls_exhausted}) do
@@ -1212,7 +1212,7 @@ defmodule VavPipeline.BigdeiKodesh.Router do
defp disclosure do
%{
origin:
"Computational reasoning by the Shorashim system over Torah text. " <>
"Computational reasoning by the Bikoret system over Torah text. " <>
"May include post-processed output from external AI models (Claude, Mistral) " <>
"consulted as korban sources; provenance is tagged internally.",
not_horaah:
+7 -7
View File
@@ -125,8 +125,8 @@ defmodule VavPipeline.Doorpost do
# - Build canon (BUILD_KORBAN, BUILD_AZAZEL)
#
# WHAT'S EXCLUDED:
# - shorashim_pekudei (economic model — operations)
# - shorashim_terumah (materials — operations)
# - bikoret_pekudei (economic model — operations)
# - bikoret_terumah (materials — operations)
# - Implementation code (execution-grade; the spec is what
# the execution implements)
# - Test files (these verify the spec; they are not the spec)
@@ -137,6 +137,10 @@ defmodule VavPipeline.Doorpost do
# Torah, sibling to talmudic_engine/src/middot/) brought in per
# user's instruction with verbatim preservation and accurate
# source labeling. Devarim 17:11 — al pi haTorah asher yorukha.
"specs/bikoret_architecture.md",
"specs/bikoret_prd.md",
"specs/bikoret_tamid.md",
"specs/bikoret_vayakhel.md",
"specs/bishearecha.md",
"specs/compiler_rules.md",
"specs/eish_zarah_reading.md",
@@ -144,10 +148,6 @@ defmodule VavPipeline.Doorpost do
# Vehaya §6 items 4, 5, 8 — added by the closure pass:
"specs/lo_tosif.md",
"specs/return_specification.md",
"specs/shorashim_architecture.md",
"specs/shorashim_prd.md",
"specs/shorashim_tamid.md",
"specs/shorashim_vayakhel.md",
"specs/structure_not_content.md",
"specs/threshold_inscription.md",
"talmudic_engine/src/halt/anchors.pl",
@@ -180,7 +180,7 @@ defmodule VavPipeline.Doorpost do
# changes; the update is a deliberate operator commit. A bare
# hash-update commit (without a corresponding spec change in the
# same commit) is itself a drift signal.
@expected_hash "0638d4ebe7dd0bcd01c02fed092aa6b8cf35e2572beeaf42e301f178bc8f9ba9"
@expected_hash "c963c4fe5076ec713ae12f07618e2606788b1a6b706a426800fab6a0fdd1bcfa"
@doc "Return the list of files that constitute the category-grade specification."
@spec files() :: [String.t()]
+6 -6
View File
@@ -1,6 +1,6 @@
defmodule VavPipeline.Gate do
@moduledoc """
The gate — Shorashim between a caller and a model (Construction §3.10;
The gate — Bikoret between a caller and a model (Construction §3.10;
bishe'arecha §I "on your gates", §III the fringe, §VII rebuke).
One pass: forward the caller's request unchanged under the caller's
@@ -21,7 +21,7 @@ defmodule VavPipeline.Gate do
reply: map(),
bedikah: map() | nil,
first: map() | nil,
shorashim: map() | nil
bikoret: map() | nil
}
@doc """
@@ -52,7 +52,7 @@ defmodule VavPipeline.Gate do
{:ok, second} <- examine(upstream, body, reply2, Keyword.put(examine_opts, :rebukes, first.bedikah_ref)) do
{:ok, deliver(upstream, reply2, second, first)}
else
{:ok, status, other} -> {:ok, %{status: status, reply: other, bedikah: nil, first: first, shorashim: nil}}
{:ok, status, other} -> {:ok, %{status: status, reply: other, bedikah: nil, first: first, bikoret: nil}}
other -> other
end
@@ -61,7 +61,7 @@ defmodule VavPipeline.Gate do
end
else
# A non-200 from the upstream passes through as it came.
{:ok, status, reply} -> {:ok, %{status: status, reply: reply, bedikah: nil, first: nil, shorashim: nil}}
{:ok, status, reply} -> {:ok, %{status: status, reply: reply, bedikah: nil, first: nil, bikoret: nil}}
{:error, reason} when is_binary(reason) -> {:error, :upstream_unavailable, reason}
other -> other
end
@@ -111,7 +111,7 @@ defmodule VavPipeline.Gate do
anchors = Anchors.for_violations(result.violations)
trailer = Shape.trailer(result, anchors, first)
shorashim =
bikoret =
%{
bedikah_ref: result.bedikah_ref,
verdict: Atom.to_string(result.verdict),
@@ -133,7 +133,7 @@ defmodule VavPipeline.Gate do
reply: Shape.with_fringe(upstream, reply, trailer),
bedikah: result,
first: first,
shorashim: shorashim
bikoret: bikoret
}
end
end
+2 -2
View File
@@ -154,7 +154,7 @@ defmodule VavPipeline.Gate.Shape do
@doc "The trailer text: ref, verdict, and the rules with their verses and sentences."
@spec trailer(map(), map(), map() | nil) :: String.t()
def trailer(result, anchors, first) do
head = "— shorashim #{result.bedikah_ref}: #{result.verdict}"
head = "— bikoret #{result.bedikah_ref}: #{result.verdict}"
head =
case first do
@@ -280,7 +280,7 @@ defmodule VavPipeline.Gate.Shape do
@doc "The rebuke text: what fired, where, and the ask."
@spec rebuke_text(map(), map()) :: String.t()
def rebuke_text(result, anchors) do
"[shorashim #{result.bedikah_ref}] Your reply was examined from outside and these readings fired — " <>
"[bikoret #{result.bedikah_ref}] Your reply was examined from outside and these readings fired — " <>
Enum.join(fired(result, anchors), "; ") <>
". Answer the question again without them: claim no authority for yourself, rest each claim on what you were given, " <>
"do not certify your own honesty or confidence, do not place the agency on the reader, name a disputant when you call a matter contested, " <>
@@ -18,7 +18,7 @@ defmodule VavPipeline.KorbanProcessorSocket do
use GenServer
require Logger
@default_socket_path "/tmp/shorashim/korban.sock"
@default_socket_path "/tmp/bikoret/korban.sock"
@call_timeout 15_000
@connect_timeout 5_000
+1 -1
View File
@@ -8,7 +8,7 @@ defmodule VavPipeline.Manna do
machatzit hashekel fund, not a governance board.
Construction spec §3.7 — Manna Provision File Format:
/var/lib/shorashim/manna/today.json
/var/lib/bikoret/manna/today.json
{
"date": "2026-02-19",
"provision": {
@@ -6,8 +6,8 @@ defmodule VavPipeline.TalmudicEngineSocket do
Prolog reasoning."
Construction spec §3.3: JSON over Unix domain socket.
Socket: /tmp/shorashim/talmudic.sock (dev)
/var/run/shorashim/talmudic.sock (production)
Socket: /tmp/bikoret/talmudic.sock (dev)
/var/run/bikoret/talmudic.sock (production)
Connection model: connect, send one JSON line, read one JSON
line response, keep connection for subsequent requests.
@@ -18,7 +18,7 @@ defmodule VavPipeline.TalmudicEngineSocket do
require Logger
@default_socket_path "/tmp/shorashim/talmudic.sock"
@default_socket_path "/tmp/bikoret/talmudic.sock"
@call_timeout 10_000
@connect_timeout 5_000