Skip to content

feat(bench): run the artifact-serving measurement nightly, skipping until it can measure - #2208

Merged
zackees merged 1 commit into
mainfrom
agent/2196-serving-nightly
Nov 28, 2026
Merged

zackees merged 1 commit into
mainfrom
agent/2196-serving-nightly

Conversation

@zackees

@zackees zackees commented Nov 28, 2026

Copy link
Copy Markdown
Member

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

  1. Nothing invoked --measure. ci/artifact_serving_bench.py was a
    complete two-arm measurement with no caller. .github/workflows/artifact-serving-bench.yml
    now runs it on decision 6's cadence (nightly, reference cell esp32s3 ×
    framework-arduinoespressif32-libs/core-3.3.12 on an ubuntu-24.04 hosted
    runner), builds fbuild itself, and uploads the report as an artifact. It is
    deliberately not a job in benchmark-build-comparison.yml: that workflow
    shapes 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.

  2. 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-published asks the catalog the lift itself reads — same index,
    same prebuilt-arduino-esp32 shard, same pinned size and SHA-256 the
    reader 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".

  3. The gate compared a run against itself. --check defaults to
    latest.json, which --measure has just overwritten, so every night would
    have "passed" at 0 %. New --baseline <path> names the report to compare
    against; the workflow restores the published series from the
    benchmark-stats branch 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_URL override, plus the --only-if-published skip and
    measure paths and --baseline).
  • The full drift suite that ci-workflow-drift.yml runs: 654 passed / 0
    failed
    (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 + touch after each):

  • remove the descriptor's SHA-256/size check → test_a_shard_that_does_not_match_its_descriptor_is_not_a_publication
    fails (the tamper is same length, different bytes, so only the digest can
    refuse it);
  • remove the --only-if-published skip branch → test_nothing_published_skips_without_building_anything
    fails (it asserts zero shim invocations and zero report files).

End-to-end against the production catalogs (the workflow's idle path, with
--fbuild /bin/false so any build would exit non-zero):

$ uv run --no-project python -m ci.artifact_serving_bench --measure \
    --only-if-published --project bench/blink --env esp32s3 \
    --out /tmp/serving-probe --fbuild /bin/false
artifact-serving bench: skipped -- no published prebuilt tree for prebuilt-arduino-esp32 3.3.12 / esp32s3 in 2 catalog(s); nothing measured
exit=0        # and no report directory was created: the probe answered before any build

Remaining (not claimed)

  • bytes_downloaded per 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 not
    counted anywhere — it needs a network counter.
  • fallback_rung_histogram: the ladder does not expose rung numbers yet.
  • A real published tree: bucket upload is a maintainer action. Until then this
    workflow exercises its probe path only, which the run above demonstrates.

…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.
@zackees
zackees added this pull request to the merge queue Nov 28, 2026
Merged via the queue into main with commit 46b3dcd Nov 28, 2026
32 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant