# Replaying the benchmark without the original cache

The supported shell entrypoints now restore the frozen evaluation-date metadata
and fetch missing raw inputs **without changing the original manifests or locks**.
No score, cohort rule, date rule, predictor or evaluator was changed. This is a
post-outcome acquisition repair, not a new prospective lock or a new experiment.

## What is preserved

The small [snapshot](results/reproducibility/date_metadata.json.gz) contains the
44 already-derived citation/date JSON projections used in development, later
validation and the network-reference audit. It preserves their exact bytes,
including the original retrieval timestamps. The
[index](results/reproducibility/date_metadata_manifest.json) maps every restored
file to its original manifest and SHA-256. These are processed metadata, not raw
PubMed XML or Europe PMC responses: abstracts, article bodies and author lists
were discarded by the original fetchers. The snapshot has 4,289,070 decoded file
bytes and compresses to 341,840 bytes. It is a repository-supplied research
artifact, not an independently timestamped public deposit.

Molecular inputs, GO releases, sequence archives, full-text XML, alignments and
prediction arrays remain uncommitted in `data/`. Raw inputs are fetched from the
URLs already recorded in the original manifests. Each missing input is downloaded
to a temporary file, hashed, and accepted only when both its digest and size match
the original. Changed scientific-input bytes stop the run. One transparent
transport-only exception is documented below. New request dates and headers
are written separately to ignored `data/reproduction/acquisition.jsonl`; they
never replace historical provenance.

### BioGRID page transport reconstruction

The first empty-data attempt correctly stopped because BioGRID randomized a
Cloudflare email-obfuscation token on its provenance landing page. A diff against
the cached original found no other change. The new
[reconstruction rule](results/reproducibility/transport_reconstruction.json)
requires exactly one token, decodes both tokens to verify the same public contact
address, restores the original token, then requires the **entire page** to match
its original SHA-256. No date, release field, licence or biological data is
replaced. Any other page change still fails. Both the downloaded and reconstructed
hashes, plus the rule hash, are recorded in the acquisition log. This is explicit
byte reconstruction, not a claim that the HTTP response was byte-identical.
The [first failed attempt](results/reproducibility/clean_reproduction_attempt1.json)
is retained; no lock was relaxed to make it pass.

The original code files hashed by `results/later_validation/lock.json` are
unchanged. The new acquisition layer restores metadata **before** calling the
old fetchers/evaluator, avoiding both the missing-file check and nonreproducible
live-API timestamps identified in review 1. Do not use the historical standalone
`fetch_*_inputs.py` or citation fetchers to refresh this locked evaluation. Use
the supported shell commands below. A different metadata snapshot would be a
separate sensitivity analysis, not a reproduction.

## Commands

From the repository root, with Python, NumPy, SciPy, pandas, requests, DIAMOND
2.1.8 and R available:

```bash
bash studies/genefn/timesplit-benchmark/analysis/run_multispecies_pilot.sh --fetch
bash studies/genefn/timesplit-benchmark/analysis/run_later_validation.sh --fetch
bash studies/genefn/timesplit-benchmark/analysis/run_resolution_audit.sh --fetch
python studies/genefn/timesplit-benchmark/analysis/paper_assets.py
```

For an explicitly empty-data test, choose a nonexistent directory:

```bash
python studies/genefn/timesplit-benchmark/analysis/check_clean_reproduction.py \
  --directory /tmp/timesplit-clean-replay
```

This copies only code, documents and tracked-style results, **not `data/`**. It
then runs the complete download/prediction/evaluation/figure chain. It compares
all benchmark CSV ledgers, original manifests/locks and every artifact hashed
by the later lock. Only the later summary's evaluation timestamp may differ.
The report goes to
[`clean_reproduction.json`](results/reproducibility/clean_reproduction.json);
the full run log stays in the temporary copy. The original study data and
numerical results are not overwritten by this test.

Fault-injection checks can be rerun with:

```bash
python studies/genefn/timesplit-benchmark/analysis/check_benchmark_acquisition.py
```

They verify exact restoration into an empty cache, refusal of changed cached
metadata and changed downloaded bytes, preservation of manifests after an
identical-byte redownload, exact randomized-token reconstruction, and refusal of
any additional page change. [Check report](results/reproducibility/acquisition_checks.json).

## Completed empty-data test

The second attempt passed in **1,167 seconds** (about 19.5 minutes), downloading
**24 inputs totaling 2,233,097,893 bytes**. No local raw data or score arrays were
borrowed. All **34 CSV ledgers** were rewritten after the run started and matched
exactly. All **29 protected files**, **26 later-lock artifacts**, and **26
resolution/paper files** matched too; these are overlapping checks, not 115
independent results. The four PNG/SVG figures matched byte for byte. The later
summary changed only its evaluation timestamp. The paper asset manifest changes
with that input timestamp and is not claimed byte-identical.

The source pipeline and the empty-data test passed their original prediction,
cohort, AP, bootstrap and resolution checks. The acquisition repair changes no
scientific result. The test retains all original locks, including their original
code hashes. The full run log remains in the temporary directory named by the
report; raw inputs remain uncommitted.

## Boundary

This replay concerns the benchmark manuscript and its resolution audit, not the
separate TMEM60 extension. A successful download today cannot guarantee future
upstream availability. Any changed raw archive or mutable provenance page will
still fail its checksum rather than be silently accepted. The date snapshot
removes the known mutable citation-API dependency; it does not make all external
archives permanent. The numerical inference and the limitations of annotation
arrival as a discovery endpoint are unchanged.

## Review-2 experimental audit (separate scope)

The complete-cohort literature revision is documented in [EXPERIMENT_AUDIT.md](EXPERIMENT_AUDIT.md).
`analysis/experiment_audit.py` rebuilds its counts/ranks and readable supplement
from tracked human judgments, bibliographic projections and original result
ledgers. `analysis/check_experiment_audit.py` verifies joins and recreates six
outputs in a copy with no raw-data directory. This is **not** independent literature
adjudication or a repeat of the original full predictor rebuild. Evaluation-only
raw literature can be fetched with `analysis/fetch_experiment_audit.py --fetch`;
changed cached/remote bytes fail rather than silently replacing the snapshot.
`analysis/experiment_vocabulary_probes.py` uses the existing historical ontology,
candidate masks and score arrays to check all 45 direct labels and ten named
alternative-term probes. It verifies the original lock and does not change it.
