Skip to content

fix(ci): name the mirrored toolchain bundle after the vendor asset + arm64 slice proof harness - #1962

Merged
zackees merged 6 commits into
mainfrom
agent/arm64-slice-proof
Nov 8, 2026
Merged

zackees merged 6 commits into
mainfrom
agent/arm64-slice-proof

Conversation

@zackees

@zackees zackees commented Nov 8, 2026

Copy link
Copy Markdown
Member

Found while preparing the linux-arm64 @esp-toolchain slice for #1956.

The bug

_mirror_whole keyed the mirrored bundle off the operator's local file name:

key = f"{KEY_ROOT}/{toolchain}/release/{version}/{host}/whole/{archive.name}"

The shard's asset.filename is derived from the vendor URL, so the two only
agree when the download happens to be saved under the vendor's name. The
linux-arm64 bundle arrives as arm64.tar.xz (that is the name in the vendor
release), and the first real publish produced:

.../linux-arm64/whole/arm64.tar.xz          (key, 171,504,672 B)
asset.filename: xtensa-esp-elf-...-aarch64-linux-gnu.tar.xz   (listed name)

Two consequences: the listed name points at a second copy of the same bytes that
nothing names, and every re-publish under a different local alias adds another
object for the same host. The old test could not see it — the fixture named the
archive exactly as the vendor does.

The fix

whole_key now takes the vendor file name and validates it as a safe key
token; the traversal case is neutralised by Path::name (pinned by a test).

Tests (real output)

uv run --no-project --with boto3 --with zstandard python -m unittest ci.test_publish_toolchain_slices
→ Ran 32 tests ... OK (was 28). New:

  • test_the_whole_archive_is_stored_under_the_vendor_filename — publishes with
    the archive named arm64.tar.xz and asserts the bucket key keeps the vendor
    name and that the URL basename equals asset.filename;
  • test_the_key_follows_the_vendor_filename_given_to_it,
    test_a_filename_that_is_not_a_safe_token_is_refused,
    test_a_path_in_the_filename_cannot_escape_the_whole_prefix.

Red witness (production call reverted to archive.name):

FAILED (failures=1)
AssertionError: False is not true :
  v1/espressif/toolchain-xtensa-esp-elf/release/14.2.0_20260121/linux-amd64/whole/arm64.tar.xz

ruff check and ci/check_python_complexity.py → clean.

Also in this PR: the arm64 proof harness

.github/workflows/esp32s3-arm64-slice-proof.yml — a manual, dispatch-only job
on ubuntu-24.04-arm that builds the ESP32-S3 fixture twice from empty caches
and requires (a) identical flash/ram to the vendor whole archive and (b) a
chip-scoped …+esp32s3 install directory. It is expected red today; see
below.

Live repair

The mis-keyed object from the first publish was deleted from the bucket
(…/linux-arm64/whole/arm64.tar.xz), leaving exactly the vendor-named bundle
(HTTP 200, content-length 171,504,672 matching the metadata pin) and the
esp32s3 slice object.

Not done, and why

…whole bundle after the vendor asset

#1956 step for linux-arm64: slice, mirror and list esp32s3 only (chips stay
additive), plus the arm64 proof workflow that builds the fixture twice.

publish_toolchain_slices.py keyed the mirrored whole bundle off the operator's
local file name, so a bundle downloaded as arm64.tar.xz landed at
.../whole/arm64.tar.xz while the shard's asset.filename named the vendor file.
_mirror_whole keyed the bucket object off the operator's local file name, so a
bundle saved as arm64.tar.xz landed at .../whole/arm64.tar.xz while the shard
listed the vendor filename -- a second copy nothing names, and a new orphan per
re-publish under another alias.

Also adds the ubuntu-24.04-arm ESP32-S3 slice proof harness (#1956), which is
expected red until #1961 (FBUILD_MIRROR_MANIFEST_URL does not move slice
resolution).
@coderabbitai

coderabbitai Bot commented Nov 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@zackees
zackees added this pull request to the merge queue Nov 8, 2026
Merged via the queue into main with commit fcdf3cb Nov 8, 2026
29 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Nov 9, 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