Repository navigation
feat(bench): frozen linker-object asset pipeline — manifest + replay (#57) - #58
Merged
Merged
Conversation
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]>
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tar.zst(production, via thezstdCLI — fast, high ratio) and.tar.gz(stdlib, hermetic tests). Extraction is path-traversal-guarded (+ thedatafilter).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 consumerReads
<dir>/corpus.jsonand 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.ymlvalidate(runs on PRs): builds a small real corpus, packs it, indexes it in a manifest, thenfetches + verifies + extracts and runsreld-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 orphanbenchmark-assetsbranch with a regeneratedmanifest.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.mdRecords the storage decision (adopted): one orphan
benchmark-assetsbranch that doubles as the assets/www site, with a canonicalmanifest.jsonat its root and one archive per platform per configuration beneath it — chosen over per-platform branches for the simplest consumer story. Documents themanifest.json(v1) andcorpus.jsonschemas.Acceptance criteria (#57)
manifest.jsonat a canonical URL indexing every(platform, configuration)archive with URL, sha256, size, toolchain, and the in-archivecorpus.jsonpath.benchmark-assetsbranch) with zstd compression + checksums.reld-bench --replay-corpuslinks the fetched corpus repeatedly with zero in-loop compilation (exercised end-to-end in thevalidatejob).ci/BENCHMARK_ASSETS.md) for bench: frozen Bevy link corpus — compile once per platform, replay the link every iteration #55/bench: quick-link / thin-LTO / full-LTO sections over the frozen corpus (link only, no compile in the loop) #56 to adopt.test_fetch_red_then_green(no asset → SystemExit; then pack+manifest → fetch succeeds), plus the livevalidatejob.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 +PythonCI 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 --checkall green locally; the two new corpus-parsing unit tests run in the Phase 1 matrix.benchmark-assets.ymlvalidatejob exercises the full pipeline (pack → manifest → fetch → replay) on a real Linux runner.🤖 Generated with Claude Code