Architecture Note · Finance & Legal

Deterministic eDiscovery, Verbatim Deposition Impeachment, and Attorney-Gated Privilege Logs

How SHA-256 deduplicated Bates ingestion, 1-hour raw upload wiping, substring-verified exhibit citations, and SQLite-locked attorney sign-off gates prevent privilege waiver and ungrounded testimony checks.

The Operational Problem

Cross-border litigation requires discovery teams to review Bates-numbered emails, Slack exports, Git commit logs, board memoranda, and system audit records simultaneously across US S.D.N.Y. Rule 34, UK CPR 31 / PD 57AD, EU GDPR Art. 48, and APAC venues. Counsel must cross-reference sworn deposition transcripts at exact Tr. Page:Line citations against contemporaneous exhibits to surface impeachment contradictions, assemble UTC-normalized fact timelines, and produce court-ready privilege logs under FRCP 26(b)(5) and CPR 31.19 without exposing client payloads or inadvertently waiving privilege.

Why Naive AI Wrappers Fail

Generic LLM review tools break under adversarial scrutiny along four predictable fault lines:

  • Unanchored quotes and fabricated impeachment: Summarizing exhibits or witness testimony without verifying exact substring spans allows models to paraphrase dates, dollar figures, or email instructions, creating unusable or sanctionable impeachment citations.
  • Lingering raw document exposure: Retaining uploaded production bundles indefinitely on multi-tenant cloud storage increases cross-border transfer exposure under GDPR Art. 48 and widens breach blast radius.
  • Automated privilege determinations without counsel sign-off: Letting an AI classifier write directly to a privilege log risks omitting mandatory non-waiving subject descriptions or misclassifying legal advice, triggering subject-matter waiver challenges.
  • Mutable coding history and weak deduplication: Without cryptographic content hashing and append-only sign-off records, review teams duplicate effort across custodians and cannot prove which licensed attorney attested to each withheld Bates range.

The Deterministic Architecture That Fixes It

Our reference implementation uses an isolated FastAPI and SQLite (WAL mode) service protected by scoped invite tokens (Authorization: Bearer or X-Invite-Token with SHA-256 hashed secrets, per-token sliding-window rate limits returning HTTP 429, and TTL quotas) paired with deterministic verification gates:

  1. Bates-indexed ingestion and 1-hour raw upload wipe: POST /api/matters/ingest indexes cross-jurisdiction bundles (US-SDNY, UK-CPR, EU-GDPR) and deduplicates identical payloads by content_sha256, reporting indexed_count, deduplicated_count, and duplicate_bates. Temporary raw uploads written to raw_uploads/ (0700 directory, 0600 files) are overwritten and deleted after RAW_UPLOAD_TTL_SECONDS = 3600 via a background asyncio loop, opportunistic request sweeps, and POST /api/uploads/wipe (with live cleanup telemetry via GET /api/uploads/status) while retaining indexed metadata and audit logs in SQLite.
  2. Substring-verified classification: POST /api/review/classify runs DeterministicReviewAdapter by default (LLM_MODE=deterministic, requiring zero external API keys) or an OpenAI-compatible model. Every suggestion must supply a non-empty verbatim_quote verified as an exact substring of raw_text at quote_start:quote_end; ungrounded or paraphrased quotes fail closed with HTTP 422 before persistence.
  3. Contradiction detection and UTC fact timelines: POST /api/matters/{id}/contradictions cross-references sworn deposition testimony against contemporaneous emails, board minutes, Slack logs, and forensic system records, classifying divergences as Critical Impeachment, Material Variance, or Timeline Gap, while GET /api/matters/{id}/timeline (aliased to /exhibits) sorts verified events chronologically by ISO UTC timestamp with SHA-256 manifest digests. Across our three synthetic cross-border matters, review-team QC benchmarks track 134–162 docs/hr, 91.4%–93.1% inter-reviewer Cohen’s Kappa, and 94.2%–95.0% first-pass precision.
  4. Mandatory licensed attorney sign-off gate: POST /api/review/{id}/code blocks attorney_client_privilege or work_product determinations unless counsel supplies attorney_name, bar_number (at least three characters), bar_jurisdiction, a non-waiving subject description, and attorney_attestation: true. Approved entries write to an immutable attorney_signoffs table protected by SQLite BEFORE UPDATE and BEFORE DELETE triggers. GET /api/matters/{id}/privilege-log exports FRCP 26(b)(5) JSON or CSV strictly from signed-off items, reporting pending_signoff_count and pending_bates while returning HTTP 409 Conflict under strict=true if unsigned privilege items remain.

Operational Takeaway

Litigation AI earns trust only when classification stays advisory and deterministic code enforces custody, grounding, and bar-credentialed sign-off. Hashing exhibits on ingest, wiping raw files after one hour, rejecting unverified quotes at HTTP 422, and gating privilege-log exports behind immutable SQLite attorney attestations gives counsel speed without surrendering courtroom defensibility.

Test deterministic eDiscovery on a redacted production set

Start with a free 30-minute workflow check. Bring one redacted document bundle, deposition transcript, and privilege protocol, and leave with a concrete implementation plan in writing within one business day.