Devarim 17:18 — the king writes his copy from before the priests, not from
memory. scripts/build_mesorah.py takes one open-licence version per work
per language from the Sefaria export (bucket sefaria-export, catalogue of
2026-10-02; Public Domain / CC0 / CC-BY / CC-BY-SA only, checked in every
file; no CC-BY-NC — the Bavli is Wikisource's) and lays it down beside
L1: mesorah/works/<slug>/{he,en}.json, index.json, integrity.sha256,
build_report.json. 128 works (Rashi, Onkelos, Ramban, Ibn Ezra, Sforno
on the Torah; all of Mishnah; 37 Bavli tractates; Bereshit and Shemot
Rabbah, Sifrei, Tanchuma), 256 files, 44.9 MiB, tree hash 7d5b3a6c…
computed as L1's (sorted relative path, then bytes; the two post-hash
files excluded). What is out, and why (licence), is in Terumah §E5.
Read, never fetched: korban_processor/mesorah.py finds citations as
written (Rashi on Devarim 6:5, Berakhot 2a, Mishnah Berakhot 1:1,
Bereshit Rabbah 1:1, Sifrei Devarim 32, Tanchuma Bereshit 1 …), resolves
each against the snapshot (complex works through their unnamed node,
Tanchuma by parashah), lists them as examination.mesorah_references, and
makes every passage found a given source for that examination — so a
claim about Rashi anchors in Rashi or does not. The Vav Pipeline couples
coupled(reference(R), mesorah(Work, [Address])) or not_in_mesorah; the
engine accepts mesorah/2 as a terminal and not_in_mesorah is Form 4.
VavPipeline.Mesorah pins the hash, re-reads the tree at startup and every
ten minutes, and /kodesh/health carries mesorah_hash. Mounted read-only at
/mnt/mesorah in the vav-pipeline and korban-processor images. L3
bedikot.mesorah (migration 20261013000002).
Also: the 1-in-12 Day6 serving failure of 2026-10-04 reproduced with seed
446116 — HaltMonitorTest left the system halted; it now resolves on exit
and the Day6 setup is defensive. Construction §3.11, Terumah §E5, Tamid
§1.1, bishearecha §IV, KOHEN, AGENTS. Doorpost 0638d4eb…. Elixir 604/0
(seeds 835592 and 446116), korban 294/1 skipped, Prolog bedikah 44/44,
L3 10/0.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
56 lines
2.5 KiB
Elixir
56 lines
2.5 KiB
Elixir
import Config
|
|
|
|
# Runtime configuration — read from environment variables at boot.
|
|
# This file is evaluated at runtime, not compile time.
|
|
# Required for OTP releases where env vars aren't known at build time.
|
|
|
|
if config_env() == :prod do
|
|
# L3 — PostgreSQL connection
|
|
# The kohen sets DATABASE_URL in the K8s secret
|
|
database_url =
|
|
System.get_env("DATABASE_URL") ||
|
|
raise """
|
|
DATABASE_URL not set.
|
|
The kohen must set the DATABASE_URL in shorashim-secrets.
|
|
Format: ecto://user:password@host:port/database?sslmode=require
|
|
"""
|
|
|
|
config :vav_pipeline, VavPipeline.Repo,
|
|
url: database_url,
|
|
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "20"),
|
|
ssl: true,
|
|
ssl_opts: [verify: :verify_none]
|
|
|
|
# L1 mount point — overridable via env
|
|
config :vav_pipeline,
|
|
l1_mount_point: System.get_env("L1_MOUNT_POINT") || "/mnt/torah",
|
|
mesorah_mount_point: System.get_env("MESORAH_MOUNT_POINT") || "/mnt/mesorah",
|
|
manna_provision_file:
|
|
System.get_env("MANNA_PROVISION_FILE") || "/var/lib/shorashim/manna/today.json",
|
|
talmudic_socket_path:
|
|
System.get_env("TALMUDIC_SOCKET_PATH") || "/tmp/shorashim/talmudic.sock",
|
|
korban_socket_path:
|
|
System.get_env("KORBAN_SOCKET_PATH") || "/tmp/shorashim/korban.sock",
|
|
# The keys themselves are in the file (a mounted Secret), not in env.
|
|
api_keys_file: System.get_env("API_KEYS_FILE") || "/etc/shorashim/secrets/api_keys",
|
|
# The ingress controller's network: only from there is X-Real-IP the
|
|
# caller's address (BigdeiKodesh.Mishmar.peer/1). Comma-separated CIDRs.
|
|
trusted_proxies:
|
|
(System.get_env("TRUSTED_PROXIES") || "")
|
|
|> String.split(",", trim: true)
|
|
|> Enum.map(&String.trim/1),
|
|
# Shoresh Engine binary — VavPipeline.ShoreshEnginePort opens an
|
|
# Erlang Port with {:spawn_executable, binary}, which spawns a CHILD
|
|
# PROCESS OF THIS CONTAINER. A Port cannot cross a container
|
|
# boundary, so the Haskell binary has to be on this container's
|
|
# filesystem, not only in the shoresh-engine image. deployment.yaml
|
|
# stages it onto a shared volume with an init container and points
|
|
# this variable at it. Without the override, Application.
|
|
# maybe_add_shoresh_port/3 finds nothing on PATH and logs
|
|
# "running without Haskell engine" — the system comes up DEGRADED
|
|
# and says so only in a warning line.
|
|
shoresh_engine_binary:
|
|
System.get_env("SHORESH_ENGINE_BINARY") || "shoresh-engine",
|
|
http_port: String.to_integer(System.get_env("HTTP_PORT") || "4000")
|
|
end
|