L3 Oral Tradition: PostgreSQL persistence layer for interpretations, minority opinions, teiku

Devarim 17:9 — v'darashta v'higidu lekha et d'var hamishpat.
The inquiry requires that what is found is RECORDED.

- Ecto Repo with graceful degradation (maybe_add_repo, like other engines)
- Migration: interpretations, minority_opinions, teiku_registry tables
  - Append-only enforcement via REVOKE UPDATE/DELETE
  - Includes eish_zarah fields: coupling_trace, grounding_type, challenge_sequence
- Ecto schemas: Interpretation, MinorityOpinion, TeikuRecord
  - Changeset validations: status inclusion, panel_size > 0, grounding_type enum
  - TeikuRecord.resolve_changeset restricts updates to resolved_at/resolution only
- L3.Store bridge module: record, query, count operations
- L3 tests tagged @moduletag :l3, excluded by default (no local PostgreSQL)
  - Enable with: SHORASHIM_L3=1 mix test --include l3
- All 76 existing Elixir tests pass, 195 Prolog tests pass, 33 Haskell tests pass

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott KarpandClaude Opus 4.6 committed 2026-03-17 09:43:44 -04:00
1 parent adc3e41679
commit d34e2799ac
14 files changed
+722 -3

No files matched your search

+9
View File
@@ -18,5 +18,14 @@ config :vav_pipeline,
# Talmudic Engine (Prolog) — Unix domain socket path
talmudic_socket_path: "/tmp/shorashim/talmudic.sock"
# L3 — Oral Tradition (PostgreSQL)
# Architecture §3.7: Append-only. INSERT allowed. Never UPDATE. Never DELETE.
config :vav_pipeline, ecto_repos: [VavPipeline.Repo]
config :vav_pipeline, VavPipeline.Repo,
database: "shorashim_dev",
hostname: "localhost",
pool_size: 10
# Import environment specific config
import_config "#{config_env()}.exs"
+7
View File
@@ -8,3 +8,10 @@ config :vav_pipeline,
manna_provision_file: "/var/lib/shorashim/manna/today.json",
cycle_boundary_check_interval_ms: 60_000,
shema_context_cache_ttl_ms: 0
# L3 — Production PostgreSQL
# Construction §3.8: l3_database_url from environment variable
# The kohen/DBA sets the connection string via DATABASE_URL
config :vav_pipeline, VavPipeline.Repo,
url: System.get_env("DATABASE_URL"),
pool_size: 20
+10
View File
@@ -7,3 +7,13 @@ config :vav_pipeline,
l1_mount_point: "../l1",
manna_provision_file: "test/fixtures/manna/today.json",
cycle_boundary_check_interval_ms: :timer.hours(24)
# L3 test database — separate from dev, uses sandbox pool
# Repo start disabled by default — L3 tests need PostgreSQL running locally
# Enable: SHORASHIM_L3=1 mix test --include l3
config :vav_pipeline, VavPipeline.Repo,
database: "shorashim_test#{System.get_env("MIX_TEST_PARTITION")}",
hostname: "localhost",
pool: Ecto.Adapters.SQL.Sandbox,
pool_size: System.schedulers_online() * 2,
start: System.get_env("SHORASHIM_L3") != nil