Skip to content

v0.8.5: fix: normalize receipt paths to NFC for stable cross-platform hashes

Choose a tag to compare

@mabahamo mabahamo released this 11 Feb 23:52
· 13 commits to main since this release
b752404
* fix: normalize receipt paths to NFC for stable cross-platform hashes

macOS (HFS+) stores filenames in NFD (decomposed Unicode) while
Linux (ext4) uses NFC (composed). Receipt filenames with accented
characters (e.g. Rendición) produce different byte representations
on each OS, causing the ^rcpt- link hash to differ.

Normalizing to NFC before hashing ensures identical hashes regardless
of the filesystem's Unicode normalization form.

* Bump version to 0.8.5

* fix: wrap long comments to satisfy ruff line length

* refactor: extract receipt link/document logic to helpers.py

Move duplicated generate_receipt_link and create_receipt_documents
functions from banco_chile.py and banco_chile_credit.py into helpers.py.

* test: add tests for generate_receipt_link hash stability

Verify NFC/NFD normalization produces identical hashes across
macOS and Linux, plus path order independence and basic behavior.

* fix: pin ruff==0.14.13 and fix formatting

Pin ruff to an exact version in requirements-dev.txt and use it in CI
instead of unpinned pip install, ensuring local and CI formatting match.