Repository navigation
feat(bench): run the artifact-serving measurement nightly, skipping until it can measure - #2208
Merged
Merged
Conversation
…ntil it can measure Decision 6 of `docs/design/artifact-serving-decisions.md` was a harness with no caller. `.github/workflows/artifact-serving-bench.yml` now invokes it nightly on the reference cell, in its own workflow: the comparison benchmark shapes the link for PlatformIO and owns the Pages render, and a research measurement must not be able to redden the published site. Two gaps had to close first, and both are the difference between a measurement and a nightly that lies: - `--only-if-published` asks the catalog the ladder itself reads (same index, same `prebuilt-arduino-esp32` shard, same pinned size and SHA-256) and exits 0 with one notice line when nothing is published. The ladder resolves an exact fingerprint, so without this every night would fail on a served arm that correctly fell back. A published tree whose served arm still falls back stays a hard failure -- decision 6's "any rung-6 fallback in CI fails". - `--baseline` names the report `--check` gates against. The default is `latest.json`, which `--measure` has just overwritten, so the nightly would compare a run against itself and pass at 0 % every night. The workflow restores the published series from `benchmark-stats` and passes the newest old document. Refs #2196, #1882.
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.
What this is
Decision 6's harness gets its nightly: the artifact-serving measurement now runs
on a schedule, skips honestly while nothing is published, and gates against a
previous measurement instead of against itself.
#2196 stays open (one residual cell remains, below).
The three gaps this closes
Nothing invoked
--measure.ci/artifact_serving_bench.pywas acomplete two-arm measurement with no caller.
.github/workflows/artifact-serving-bench.ymlnow runs it on decision 6's cadence (nightly, reference cell
esp32s3×framework-arduinoespressif32-libs/core-3.3.12on anubuntu-24.04hostedrunner), builds fbuild itself, and uploads the report as an artifact. It is
deliberately not a job in
benchmark-build-comparison.yml: that workflowshapes the link to 10 Mbit for the PlatformIO comparison and owns the Pages
render, and a research measurement must not be able to redden the published
site. Here there is no shaping and no publishing.
A nightly that fails every night is not a nightly. The ladder resolves an
exact fingerprint, so until a publisher uploads a tree for this cell every
served arm falls back and the module (correctly) refuses to report. New
--only-if-publishedasks the catalog the lift itself reads — same index,same
prebuilt-arduino-esp32shard, same pinned size and SHA-256 thereader demands — and exits 0 with one notice line when nothing is published.
So the job is green-and-idle today and starts measuring the night a tree
appears. Once a tree is published, a served arm that still falls back stays
a hard failure: that is precisely decision 6's "any rung-6 fallback in CI
fails".
The gate compared a run against itself.
--checkdefaults tolatest.json, which--measurehas just overwritten, so every night wouldhave "passed" at 0 %. New
--baseline <path>names the report to compareagainst; the workflow restores the published series from the
benchmark-statsbranch and passes the newest pre-existing document.Tests (real output)
ci.test_artifact_serving_bench: 28 passed / 0 failed (was 20; 8 new:published cell, wrong MCU, wrong version, a tampered shard, an index without
the tool, an unreachable first source, catalog-version derivation,
FBUILD_MIRROR_MANIFEST_URLoverride, plus the--only-if-publishedskip andmeasure paths and
--baseline).ci-workflow-drift.ymlruns: 654 passed / 0failed (
TMPDIR=/tmp).ruff format+ruff check(0.12.12): clean;ci/check_python_complexity.py:clean;
ci/check_python_types.py(basedpyright): 0 errors;ci/check_workflow_concurrency.py: OK;ci/gate_script_coverage.py --budget 0:every workflow-invoked gate accounted for.
RED proven twice (restored +
touchafter each):test_a_shard_that_does_not_match_its_descriptor_is_not_a_publicationfails (the tamper is same length, different bytes, so only the digest can
refuse it);
--only-if-publishedskip branch →test_nothing_published_skips_without_building_anythingfails (it asserts zero shim invocations and zero report files).
End-to-end against the production catalogs (the workflow's idle path, with
--fbuild /bin/falseso any build would exit non-zero):Remaining (not claimed)
bytes_downloadedper arm: the served arm records its pinned archive size(
archive_bytes/downloaded, feat(prebuilt): record the served archive size and whether it was transferred (#1882 decision 6) #2207), the source arm's bundle download is notcounted anywhere — it needs a network counter.
fallback_rung_histogram: the ladder does not expose rung numbers yet.workflow exercises its probe path only, which the run above demonstrates.