Replaces the real HSBC/RBC fixtures stripped from git history (real
account numbers/org names - see "Real fixtures removed from git history")
with two invented bank statements, built from a shared Python generator
(fixtures/generate_synthetic_fixtures.py, reportlab + openpyxl) so the
PDF and its ground-truth .xlsx can never drift apart by a transcription
mistake:
- Fake-Bank-A-Synthetic: split Debit/Credit columns, newest-first order,
no in-table opening/closing balance (HSBC-style) - debit printed as a
plain positive magnitude, not self-signed.
- Fake-Bank-B-Synthetic: a single signed Amount column, oldest-first
order, WITH in-table Opening balance/Closing balance rows (RBC-style).
Both auto-detect cleanly via the real keyword/geometry detector alone -
no layout_quirks, no manual mapping. Verified directly against the real
pipeline (python3 backend/measure.py): both report field_accuracy=1.0,
zero count/balance mismatches. Neither reaches "Verified" in this
environment because the Docling container isn't running here - every
page degrades to pdfplumber-only (engine_agreement=needs_review), the
harness's own already-documented degraded mode, not a fixture defect;
every other check (statement_balance/running_balance/date_sanity/
structure_sanity/page_coverage/narrative_direction) passes cleanly for
both. The three real fixtures (still on disk, gitignored by exact
filename) were re-measured in the same run and are unaffected.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add README.md - what the product is, docker compose up, project
layout, measure.py usage, pointer to CLAUDE.md for the deeper record.
Delete fixtures/ground_truth_sep_reference.xlsx - a bank-description
to accounting-category mapping from the separate bank_statement_
categorizer tool, not this product's own extraction ground truth, and
referenced nowhere in this repo. Nothing to repurpose it into, since
this product deliberately doesn't categorize transactions at all.
Investigate HSBC-Aug's running_balance failure and both fixtures'
engine_agreement findings - confirmed not extraction bugs. Built and
hand-verified fixtures/HSBC-USD-August2026_ground_truth.xlsx (all 31
transactions checked against the rendered PDF, including the Cancelled
wire and its two blank-balance rows) to prove it: 1.0 field accuracy.
The running_balance break is the Cancelled wire's -22,386.00 genuinely
not applying to the real balance chain - the check correctly flagging
that, not smoothing it over. engine_agreement on both fixtures is
Docling missing a table and pdfplumber's result being used instead,
exactly as designed, correctly flagged for lower confidence rather
than silently trusted.
Bettersight Statement Extractor as of Phase 1 build: bank-agnostic pdfplumber
extraction, Docling cross-check, the 6+1 checks, Excel export, and the
minimal web UI - all built and working.
Adds the measurement harness (measure.py) from the plan's step 10: runs
every fixtures/*.pdf with a matching *_ground_truth.xlsx against the real
pipeline, diffs date/description/amount/balance per transaction, and logs
a dated JSON result under results/. Also adds hand-verified ground truth
for the HSBC Sep statement and a new RBC fixture (RBC-CAD-Aug26.pdf, sourced
from docs/) with its own hand-verified ground truth - RBC extraction now has
regression coverage it previously lacked.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>