# Native Iceberg lifecycle and v3 evidence

Requires Java 17 and uv. Set JAVA_HOME to your Java 17 installation if necessary.
Extract and run from the archive root (fish):

```fish
set -x SPARK_LOCAL_IP 127.0.0.1
uv run reproduce.py --source observations.csv --output . --verify
```

Dependencies are pinned in reproduce.py: Spark 3.5.6, Iceberg Java 1.9.2,
PyArrow 25.0.1 and fastavro 1.12.1. First run downloads them. The Java helper
is compiled against the actual loaded Iceberg runtime. No adapter fabricates DVs.

The recipe verifies SHA-256 for the original artifacts, then regenerates eight
experiments in fresh temporary tables. It compares complete rows, temperature-only
projections, native rejection classes, scan tasks, retained snapshot/reference roles,
physical Parquet inventories and cumulative vector positions. Random metadata IDs
and file names are not expected to repeat. These tests use Spark, not DuckDB.

The source's first eighteen observations are used. Composite/null keys explicitly
change stations for IDs 3 and 4 to null and add another ID 3 at South, 30 C.
Other variations preserve source values; compatible appends deliberately duplicate IDs.

The writers use two independent table handles whose snapshot lifetimes overlap in a
controlled schedule: A commits before B attempts publication. This tests native local
Hadoop table validation and rebasing, not simultaneous threads or a remote catalog.

Expiration and orphan cleanup actually delete files in fresh temporary tables only.
The ten-day-old unpublished file is removed using a seven-day cutoff. Originals were
copied before deletion for forensic inspection. Their presence in this archive does
not make expired snapshots readable in the native table. The verifier regenerates
these experiments; it does not reopen these relocated forensic copies as tables.

To generate a fresh archive directory (fresh must not exist):

```fish
uv run reproduce.py --source observations.csv --output fresh
```

The v3 Puffin files are real native output. Browser decoding supports the sparse
Roaring array containers used here, with framing, reference, cardinality and CRC checks;
it is not a general-purpose Iceberg reader.
