bettersight-statement-extra.../backend/services/extraction
JasonFraser da1b8b325e Fix RBC's last transaction absorbing the Account Fees footer line
RBC prints "Account Fees: $48.75" directly under "Closing balance" on
the statement's last page - not a money token this module recognizes
("$48.75", not "48.75"), no reference-number prefix, no page-number
pattern, so it fell through to plain narrative text and landed on the
last real transaction's description via the trailing-leftover-buffer
rule (correct behavior for a GENUINE trailing narrative line, wrong
for this one).

Fixed by treating the closing-balance line as a position-based
boundary, the same way the header row already is: once extract_page()
recognizes it, every subsequent line on that page is skipped outright
rather than reaching money/narrative classification at all. A no-op
for HSBC, which never emits a closing_balance row in the first place.

measure.py: RBC field accuracy 0.9977 -> 1.0, HSBC unaffected. RBC's
overall status is still "Failed" after this - a separate, pre-existing
engine_agreement disagreement on page 4, not touched by this fix.
2026-10-12 19:31:54 -04:00
..
__init__.py Fix edit-icon color, description autogrow, and add image zoom controls 2026-10-11 23:44:06 -04:00
docling_parser.py Fix edit-icon color, description autogrow, and add image zoom controls 2026-10-11 23:44:06 -04:00
layout_rules.py Fix edit-icon color, description autogrow, and add image zoom controls 2026-10-11 23:44:06 -04:00
raw_ocr_extract.py Fix edit-icon color, description autogrow, and add image zoom controls 2026-10-11 23:44:06 -04:00
table_extract.py Fix RBC's last transaction absorbing the Account Fees footer line 2026-10-12 19:31:54 -04:00