git:20260702.ed2f8b7 to git:20260815.6343336
19 added, 2 removed. Audit A to A.
# `infrastructure/publishing/arxiv/`
Local arXiv submission tarball preparation (no network API).
## Public API
```python
from infrastructure.publishing.arxiv import prepare_arxiv_submission
```
### `prepare_arxiv_submission`
```python
prepare_arxiv_submission(output_dir: Path, metadata: PublicationMetadata) -> Path
```
- Copies `.tex`, `.bib`, `.cls`, `.bst`, and `figures/` from `output_dir/../manuscript/`, every rendered `.tex` found under `output_dir` (LaTeX produced at render time), the optional `.bbl` from `output_dir/pdf/`, and writes `arxiv_submission_YYYYMMDD.tar.gz` under `output_dir`.
+ Prefers the renderer-owned `output/pdf/_combined_manuscript.tex`, stages it at
+ the archive root with its stem-matched `.bbl`, rendered bibliography files, and
+ `output/figures/`, and adapts renderer-relative figure references to that flat
+ layout. If the canonical file is absent, exactly one legacy
+ `output/pdf/*.tex` is accepted; otherwise a conventional sibling `manuscript/`
+ TeX source tree is preserved by relative path.
- > ⚠️ **Partial-package honesty.** arXiv requires LaTeX source, not a PDF. Template manuscripts are authored in Markdown and compiled straight to PDF, so `manuscript/` usually contains no `.tex` and the render step does not persist one under `output/` by default. When no `.tex` is present in either location, the tarball is a **references/figures-only partial package** (typically just `references.bib`) that requires manually adding the compiled `.tex` before arXiv will accept it. The test `TestPrepareArxivSubmission::test_markdown_only_manuscript_is_references_only` binds this contract; `test_rendered_tex_from_output_included` binds the rendered-`.tex` inclusion path.
+ The helper fails closed on a missing/empty or ambiguous TeX root, symlinks,
+ special files, and non-identical path collisions. It removes all older
+ date-named packages before building and never leaves a partial package after a
+ failure. `SOURCE_DATE_EPOCH` controls the UTC filename date and normalized
+ tar/gzip metadata; invalid or negative explicit values fail. Identical inputs
+ and epoch must produce byte-identical archives.
+
+ Public tracked packages are post-render artifacts: package after the final
+ Stage 3 render, refresh the current artifact manifest, then rerun Stage 4 so its
+ validation report and rendered-provenance receipt attest the updated output
+ tree. Do not run `refresh_rendered_provenance.py` afterward because that helper
+ rerenders first and cleans the package. The exact command sequence is in
+ [`README.md`](README.md).
## Tests
```bash
uv run pytest tests/infra_tests/publishing/test_platforms.py::TestPrepareArxivSubmission -v
```
## See also
- [`README.md`](README.md)
- [`../platforms.py`](../platforms.py) — backwards-compatible re-export