You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RV-F5 (BR-24): preserved originals may differ from uploaded bytes (UTF-8 re-encoding) #185
External repo review at commit c7bebd1: the browser decodes CSV to text, and the API re-encodes that text as UTF-8 before hashing and storage. BOM or invalid UTF-8 byte sequences change the retained bytes and the digest. Node decoder probes demonstrated both transformations.
api/services/originals.py L39–67 (API re-encode and store)
Note: touches csv-table-hub-main/* (Lovable frontend code), partially covered by the pending #154 decision. The backend-side fix is independent.
Why this matters
BR-24 calls for preservation of the original file. If the stored "original" is not byte-identical to what was uploaded, the hash cannot be used as evidence of integrity. A client auditor who requests the original file back and verifies against their copy will see a mismatch on any file with a BOM or non-UTF-8 bytes.
Proposed
Backend: upload path accepts raw bytes, not decoded text. Hash and store the original bytes unchanged.
Backend: keep a separately-stored decoded/normalised representation with its encoding metadata, used for the loaders.
Activity
fix: preserve the uploaded bytes, not a UTF-8 re-encoding of decoded …
amar-python commentedon Nov 9, 2026
Fixed in #202 (merged as 203c8ae).
Generated by Claude Code