Note-up reports how often a case was cited, not its page size

↗ view on GitHub · Eli Ziff · 2026-07-28 · 26e3c03e

Full-corpus graph built: 224,970 cases, 2,541,822 edges, 540,948 distinct
cited keys. Probing it exposed a reporting bug the small graph had hidden:
caselaw_note_up returned `citing_cases: entries.length`, which is the
page, so a model asking about Vavilov would have been told 10.

noteUpCitations now returns { total, entries }, where total is
COUNT(DISTINCT case_id) over the alias-closed key set, and the tool reports
citing_cases_total / returned / truncated the way library_find already
reports total_matches / returned / truncated.

Measured on the full graph (was 43 within the SCC-only build):

  2019 SCC 65        8,929 citing cases
  2008 SCC 9        11,094
  [1999] 2 SCR 817   3,935
  2016 SCC 27          572
  2015 SCC 5           342

The probe also asserts the thing most likely to rot silently - the alias
closure. Citation forms are distinct keys by design and are unioned only
on unambiguous corpus resolution evidence, so if that union broke, every
note-up would undercount and still look plausible. It holds:

  UNIONED  2019 SCC 65=8929  2019 CSC 65=8929
           [2019] 4 SCR 653=8929  [2019] 4 RCS 653=8929

That union comes from the corpus lookup index (cases/lookup.duckdb, built
by the ALR Quote Verifier app), attached READ_ONLY at build time and never
rebuilt or modified - 170,728 alias-closure keys at revision 41a23437.

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 3687064e
Stats 4 files changed , +113 , -19
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-26e3c03e.md from inside the repo you want the change in.

⬇ Download capture-commit-26e3c03e.md