Files
bikoret/vav_pipeline
Scott KarpandClaude Opus 4.7 f493b7df65 bigdei_kodesh: commit 8 — GET /peah/azazel_log (public half of property 9)
Pass 4 / Finding F, commit 8 of 10 from BUILD_AZAZEL.md. The
public-half of property 9 (observable disposal). The Rambam in
Moreh Nevuchim 3:46 makes the load-bearing claim: "an unobserved
disposal is architecturally incomplete." The community's awareness
that errors are visibly carried away IS the implementation; the
route on the cliff serves no purpose without the witnesses on the
temple steps.

This endpoint is those witnesses. Anyone with HTTP access to
Shorashim can see WHAT was disposed (categorically) and HOW MANY
disposals occurred — turning the disposal channel from a private
operator action into a public, witnessed fact.

PRIVACY BOUNDARY (BUILD_AZAZEL.md §6 Q6):

The endpoint exposes:
  - total disposal count (optionally filtered by ?since=ISO8601)
  - categorical aggregate (avonot/peshaim/chatot counts across
    recent disposals — what KIND of errors were disposed)
  - up to 50 recent disposals as case_ref + shaliach +
    triggering_call + disposed_at + categories_filled (which slots
    of vidui were filled)

The endpoint does NOT expose:
  - vidui ITEMS (the operator's specific descriptions of each
    disposed thing)
  - the disposed PAYLOAD (which doesn't exist in L3 anyway —
    property 10)
  - any handle for retrieving the disposed content (there isn't one)

The detailed vidui items are operator-internal, accessible via
future /kodesh/* endpoints. The split is deliberate: public is
WITNESS, operator is AUDITOR. The witness sees the fact;
the auditor reads the contents.

The privacy boundary statement is included in every response so
callers know what they're not seeing — they can reason about the
endpoint's silence rather than guess.

GRACEFUL DEGRADATION:

When VavPipeline.Repo is not running (dev/test without Postgres),
the endpoint returns total_disposals=0 with l3_status="unavailable"
rather than crashing. Mirrors the maybe_add_repo pattern from
MEMORY.md — Shorashim should respond cleanly even when L3 is down,
because /peah/* is the public-facing tier and must be more
resilient than internal tiers.

CHANGED:

  vav_pipeline/lib/vav_pipeline/bigdei_kodesh/router.ex
    + GET /peah/azazel_log
        Optional ?since=ISO8601 filter; returns total +
        categorical_aggregate + recent[<=50] + l3_status +
        privacy_boundary statement + disclosure block (kichush +
        not_horaah from commit 5e00f75)
    + parse_since/1 helper (graceful: bad input → all_time)
    + format_since/1 helper

  vav_pipeline/test/bigdei_kodesh_test.exs
    + 8 new tests covering:
      - 200 OK when no disposals recorded (empty L3)
      - response carries privacy_boundary statement
      - response carries disclosure block
      - since=invalid → all_time
      - since=valid_iso8601 → echoed
      - categorical_aggregate has all 3 slots even when empty
      - [@l3] aggregate counts categorically across multiple disposals
      - [@l3] PRIVACY BOUNDARY: response NEVER contains vidui item
              strings (load-bearing — verifies a known secret_phrase
              inserted into a vidui's chatot does NOT leak into the
              response body)

Tests: vav_pipeline 361 passed, 0 failures, 35 excluded (was
353/33; +6 visible response-shape tests + 2 :l3-tagged tests).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 09:22:40 -04:00
..
2026-02-26 14:02:34 -05:00
2026-02-26 14:02:34 -05:00

VavPipeline

TODO: Add description

Installation

If available in Hex, the package can be installed by adding vav_pipeline to your list of dependencies in mix.exs:

def deps do
  [
    {:vav_pipeline, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/vav_pipeline.