# FITS Acceptance Evidence

Publication integration prepared 23 October 2026 for the existing [FITS archive analysis](https://hesela.com/analyses/fits-checksums-pixel-order-and-coverage/#writeback).
This package contains synthetic software evidence, not observations from a telescope
or a sampled population of damaged archives.

## Read This First

The writer was Astropy 8.0.2 with NumPy 2.3.4. The independent reader was
CFITSIO 4.7.0. Twenty chosen input images and eight workflows yield 160
configurations. Thirty successful outputs change exact values or missing-value
locations while passing embedded checksums. Four other operations fail explicitly.
Four changed configurations compare equal when both sides are requested as
double precision. Counts are not failure probabilities.

The two native captures independently read the same retained serialized evidence;
they do not rerun the writer on another library or architecture. Source files,
source receipts and earlier research notes are preserved from commit
8e7f4dcc2bc07b859b59fbe5b0deda4678862572. Statements in those earlier notes about
their publication status describe the historical research stage.

## Evidence Map

- summary.json: generated workflow counts and three exact examples.
- manifest.json: SHA-256 of each distributed file except the manifest itself.
- writeback/capture-1.json: writer operations, retained input/output bytes and exact oracle.
- cfitsio/capture-1.json: independent native reads of both sides.
- writeback/synthesis.md: writer methodology, source review and limitations.
- cfitsio/README.md: native-reader method, source build commands and caveats.
- sources.json and the two nested source ledgers: primary-source provenance.

Exact values are strings. A JSON null denotes a missing pixel; it is not numeric
zero. A binary64 cast is not an exact comparison for all 64-bit integers.

## Reproduce

Extract the entire bundle, retaining its subdirectories. Create a separate
environment with requirements.txt, then run the writer tests:

```sh
python -m unittest -v test_observe test_writeback
```

Build the pinned CFITSIO source and reader.c using the instructions in
cfitsio/README.md. From the cfitsio directory run:

```sh
CFITSIO_READER=/path/to/reader python3 -m unittest -v test_replay
python3 replay.py --reader /path/to/reader --output reproduced.json
```

From the bundle root, regenerate the public table and deterministic bundle:

```sh
python3 publish.py --public-dir /path/to/new-export
python3 publish.py --public-dir /path/to/new-export --check
```

Do not use a production FITS file as a test input. The harness creates private,
bounded fixtures, takes no scientific-data path, and refuses to overwrite captures.
No third-party library source or executable is redistributed.

## Acceptance Implication

Keep the input immutable, write a new destination, then compare the expected HDU
inventory, interpretation metadata, exact valid values and separate null masks.
Check checksums independently and do not treat an operation exception as success.
This is a version-pinned counterexample set, not proof about compressed HDUs,
tables, non-unit input scales, future releases, concurrent access or durability.
The upstream BLANK fix merged in Astropy PR 20517 was source-reviewed but was not
executed in this experiment. No first-discovery or current-version-defect claim.
