Skip to content

feat(bench): frozen linker-object asset pipeline — manifest + replay (#57) - #58

Merged
zackees merged 1 commit into
mainfrom
feat/benchmark-assets-manifest
Aug 7, 2026
Merged

zackees merged 1 commit into
mainfrom
feat/benchmark-assets-manifest

Conversation

@zackees

@zackees zackees commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Closes #57.

Implements the frozen linker-object benchmark assets coordination layer: build a linker corpus once per platform, freeze it, publish it with a canonical index, and replay only the link each benchmark iteration — zero compilation in the loop.

What's here

ci/benchmark_assets.py — the coordination layer

  • Pack/extract corpus archives, codec by extension: .tar.zst (production, via the zstd CLI — fast, high ratio) and .tar.gz (stdlib, hermetic tests). Extraction is path-traversal-guarded (+ the data filter).
  • manifest.json: build / validate / resolve. Single source of truth, entries keyed on (platform, configuration), content-addressed by sha256.
  • fetch_and_extract: resolve → download (local dir or raw URL) → verify sha256 → extract. A checksum mismatch is a hard failure — never link a corrupt/wrong corpus.

reld-bench --replay-corpus <dir> — the native consumer

Reads <dir>/corpus.json and times the link of the frozen objects across every linker (and reld's shim), emitting the same markdown table as the synthetic path. No compilation happens in the loop — only linking is measured.

.github/workflows/benchmark-assets.yml

  • validate (runs on PRs): builds a small real corpus, packs it, indexes it in a manifest, then fetches + verifies + extracts and runs reld-bench --replay-corpus — the whole pipeline, end-to-end, green on every PR.
  • build + publish (default branch, dispatch/schedule; skipped on PRs): regenerate per-platform corpora and force-push the orphan benchmark-assets branch with a regenerated manifest.json, logging the branch, that it's a force-push of generated content, the file list, and the source SHA (verbose); explicit "skipping publish" when off the default branch.

ci/BENCHMARK_ASSETS.md

Records the storage decision (adopted): one orphan benchmark-assets branch that doubles as the assets/www site, with a canonical manifest.json at its root and one archive per platform per configuration beneath it — chosen over per-platform branches for the simplest consumer story. Documents the manifest.json (v1) and corpus.json schemas.

Acceptance criteria (#57)

Scope

This is the coordination layer (meta #57). It's proven end-to-end with a small synthetic corpus; the real Bevy corpus (#55) and the thin/full-LTO configurations (#56) drop into this manifest + publish + replay machinery unchanged.

Validation

  • pytest ci/tests — 46 tests green (locally + Python CI job), incl. pack/extract, manifest build/validate/resolve, fetch RED→GREEN, tamper detection, traversal guard.
  • reld-bench: cargo build + cargo clippy --all-targets -- -D warnings + tests + fmt --check all green locally; the two new corpus-parsing unit tests run in the Phase 1 matrix.
  • benchmark-assets.yml validate job exercises the full pipeline (pack → manifest → fetch → replay) on a real Linux runner.

🤖 Generated with Claude Code

Implements the benchmark-assets coordination layer (meta issue #57): build a
linker corpus once per platform, freeze it, and replay only the link each
iteration — zero compilation in the loop.

- ci/benchmark_assets.py: pack/extract archives (.tar.zst via zstd CLI,
  .tar.gz via stdlib), build/validate/resolve manifest.json, and
  fetch+verify(sha256)+extract a corpus. Pure logic unit-tested.
- reld-bench --replay-corpus <dir>: reads corpus.json and times the link of
  the frozen objects across every linker (+ reld shim), no compilation.
- .github/workflows/benchmark-assets.yml: `validate` proves the whole
  pipeline end-to-end on PRs (pack -> manifest -> fetch -> replay); `build`
  + `publish` regenerate corpora and force-push the benchmark-assets branch
  on the default branch (verbose), skipped on PRs.
- ci/BENCHMARK_ASSETS.md: records the storage decision (single
  benchmark-assets branch + canonical manifest.json) and the schemas.
- Tests: ci/tests/test_benchmark_assets.py (pack/extract, manifest
  build/validate/resolve, fetch RED->GREEN + tamper detection, traversal
  guard) and test_benchmark_assets_workflow.py (workflow + docs wiring).

The layer is proven with a small synthetic corpus; the real Bevy corpus
(#55) and thin/full-LTO configurations (#56) drop into it unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@zackees
zackees merged commit a8f93b0 into main Aug 7, 2026
24 checks passed
@zackees
zackees deleted the feat/benchmark-assets-manifest branch August 7, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

meta: frozen linker-object benchmark assets — benchmark-assets branch(es) + manifest.json (compile once, link every iteration)

1 participant