# Cross-reader follow-up: keep the original CSV

## Result

The same saved bytes can change meaning with the reader version, but changing
readers cannot reconstruct a distinction erased by an earlier rewrite.

On CPython 3.13.16, the original QUOTE_NOTNULL and QUOTE_STRINGS exports preserve
all twelve keyed optional-text values. Reading their saved 3.12 rewrites still
changes the missing value to empty text. Both strict settings agree.
The null-bit control retains the values on both readers and at both stages.
Ordinary quoting and the naive marker remain lossy.

The table in cross-reader-table.md is generated from the two JSON captures,
not manually transcribed. There are 24 reads per build: the same six policies,
two strictness settings and two retained byte sequences (original and rewrite).
These 48 reads are designed software checks, not independent samples.

## Evidence and attribution

Initial evidence: results.json, unchanged SHA-256
74ce75790f9a969930e7fdb8fcc21ebe5488c795b94ff83e14a84713ae1c0f8d.
The original observe.py and replay.json are unchanged too.

Reader A: CPython 3.12.3 / SQLite 3.45.1.
Reader B: CPython 3.13.16 / SQLite 3.53.1.
Each capture retains interpreter/script fingerprints, SQLite source ID,
every input byte hash, keyed Python values and SQL values/types/counts.

Four matched paths differ in restored values: the original null-aware exports,
each with strictness off and on. No rewritten path improves. The values differ
before parameter binding into SQLite. Nevertheless these are two installed
builds on one host, not a controlled experiment changing only one executable
component. The pinned 3.13.0 parser is explanatory source evidence, not a claim
that the measured 3.13.16 binary was compiled from that exact source.

Python documents the 3.12 reader limitation and the subsequent interpretation
of unquoted empty fields in the null-aware modes:
[3.12 CSV](https://docs.python.org/3.12/library/csv.html),
[3.13 CSV](https://docs.python.org/3.13/library/csv.html).
This is a documented behavior reproduced on retained data, not a newly
discovered Python defect.

PostgreSQL COPY remains source-reviewed only. No PostgreSQL instance was
started, and no interchange guarantee with its configurable null options is
inferred from these Python/SQLite measurements.

## A research-harness defect found during review

The original auxiliary input is left,,"" followed by CRLF.
On the measured 3.13 build, QUOTE_STRINGS tries to convert the unquoted
nonnumeric token left to a float and raises ValueError. Thus the original
observe.py --output command aborts on 3.13 after completing the main cases.
The original capture is valid on its recorded 3.12 environment, but its prior
cross-version reproduction guidance was too broad.

cross_reader.py does not change that frozen experiment. It reads the retained
original and rewritten bytes directly, records this auxiliary exception as an
explicit outcome, and uses explicitly closed SQLite connections. A successful
null-aware read is not a universal typed archive guarantee.

## Reproduce

No dependency installation or server is needed. Use the captured builds:

    python3 cross_reader.py --verify cross-reader-312.json
    python3.13 cross_reader.py --verify cross-reader-313.json
    python3 -m unittest -v test_cross_reader.py
    python3.13 -m unittest -v test_cross_reader.py
    python3.13 -O -m unittest -v test_cross_reader.py

Exact verification intentionally rejects a different interpreter or script hash.
With another CPython 3.12+ build, generate a new report with
cross_reader.py --output new-cross-reader.json; do not replace retained evidence.
The current tests encode expectations for the measured 3.12/3.13 contract and
verify their corresponding retained capture; they are not future-version proof.

Tests compare every typed row with independently constructed expected rows,
check all input hashes against the original capture, compare strictness pairs,
and reject eight altered reports. Rerunning these tests is repeatability,
not independent peer replication.

## Recovery decision

For null-aware exports, retain the original bytes until a compatible reader
has passed keyed typed-value checks. Do not replace the sole archive with a
successfully parsed and rewritten copy merely because counts, database
integrity checks or the new file's checksum pass. They do not prove recovery
of the original meaning. The explicit null-bit example is a positive control,
not a recommended replacement standard or authentication mechanism.
