Lo taaseh lekha §9.1: alignment that only the system can validate is not
alignment. The bedikah takes an output from any model and puts it to the
Torah-structure halt rules from outside, deterministically. Three checks:
1. authority — sentences claiming authority for the output itself →
action(claim_authority, source(<model>), target(self))
→ halt_check_avodah_zarah/2
2. grounding — references, roots, Hebrew → coupling trace against L1
→ halt_check_golden_calf/2, halt_check_self_grounding/2
3. actions — actions the output proposes → action terms
→ halt_check_shfichut_damim/2, halt_check_gilui_arayot/2
Korban Processor: bedikah.py (the three readings over the offering
protocol; claims about what Torah requires stay vital for the examination
even when zerikah finds nothing to offer), server.py (pod-internal JSON
socket, KORBAN_SOCKET_PATH), __main__ now serves instead of idling.
Talmudic Engine: json_bridge accepts halt_check with a term string and
halt_check_interpretation with a coupling trace. Vav Pipeline:
KorbanProcessorSocket client, Bedikah, L1Index.lookup_root/1, bedikot
table (append-only) + BedikahRecord, router endpoint; verdict tov /
lo_tov / empty with the halt terms verbatim, meaning, limits.
Broken tablets found on the way, all fixed:
41 socket_server.pl wrote multi-line JSON — every Elixir request to the
Talmudic Engine since Step 14 had failed and fallen back to the stub
(json_write_dict width(0))
42 stale socket file survived a restart (exists_file is false for a
socket; access_file exist)
43 socket streams were not UTF-8 (set_stream encoding(utf8))
44 SHORASHIM_L3=1 mix test: Repo config had no password, SCRAM raised
KeyError in every connection, pool restart intensity took the whole
app down ~30 ms after test_helper, silently — no L3 test had ever
run. Credentials from env; azazel_log tests check out a sandbox
connection; sanhedrin_halt_forwarding resolves its halt on exit.
Specs: Tamid §1.1 (endpoint contract), Architecture §3.5, Vayakhel §3.4
and new §3.9, KOHEN.md. Doorpost 3bc5dd6a… → 91d09d8d….
Tests: Elixir 519 (0 failures, L3 on and off), korban 263, azazel 125,
Prolog 7/7 suites.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
47 lines
2.0 KiB
Elixir
47 lines
2.0 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",
|
|
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",
|
|
# 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
|