Citator stage 1: exact note-up graph over the local case corpus

↗ view on GitHub · Eli Ziff · 2026-07-28 · ebc07ca4

build_citator_graph.py scans corpus cases (import_a2aj_hansard pattern:
atomic replace, meta table) and writes edges = literal citation
occurrences with paragraph anchors, cited-side pinpoints, and bounded
excerpts; anchor regexes, case-name bounds, pinpoint grammar, and
paragraph indexing are faithful ports from the read-only reference
implementations, proven by a differential oracle (232/232 texts across
29 court families; 3,243 spans). Distinct citation forms stay distinct
keys and union only on unambiguous corpus resolution evidence - never
inferred. caselawCitator.ts is a thin reader mirroring a2ajHansard:
noteUpCitations/graphStats, typed null when no graph is installed.

Measured on the full SCC family and reproduced via the reader before
commit: 10,889 cases, 279,803 edges, 90,602 distinct cited keys, ~200s
build; Vavilov 2019 SCC 65 notes up to 43 citing cases / 253
occurrences, identical set via the French twin.

Also consolidates citation identity: citationKey.ts is now the single
Beaver port of the reference normalizer (sharp-s casefold divergence
included); retrievalGate re-exports it, caselawCitator wraps it with a
typed refusal, and a2ajLocalBulk's private twin is replaced - three
drifting copies become one differential-tested function.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018bhP89cYSdEEjHNPnxacns
Repository eliziff/Beaver
Author Eli Ziff <eliasziff@gmail.com>
Authored
Parents 94e0a02a
Stats 7 files changed , +1478 , -33
Part of Citator: note-up graph and attested case characterizations

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-ebc07ca4.md from inside the repo you want the change in.

⬇ Download capture-commit-ebc07ca4.md