Skip to content

test(toolchain): check the ESP-IDF pin table against the release's tools.json - #2146

Merged
zackees merged 1 commit into
mainfrom
agent/idf-pin-verify
Nov 22, 2026
Merged

zackees merged 1 commit into
mainfrom
agent/idf-pin-verify

Conversation

@zackees

@zackees zackees commented Nov 22, 2026

Copy link
Copy Markdown
Member

What

Stage 0 of #2133 (move the delegated ESP-IDF pin to v5.5.2+): make the
hand-copied PINS table checkable before anyone moves it.

crates/fbuild-toolchain/src/toolchain/esp_idf_release.rs documents its 25
archive pins as "tools.json of ESP-IDF v5.5.1, status: recommended,
verbatim" — but nothing in the repo could tell whether that was still true. A
pin bump is 25 rows of sha256/size/URL transcribed by hand, and a single wrong
digit only surfaces as a download failure in a user's cache.

This commit commits the release's own tools/tools.json beside the existing
Python pins (data/esp-idf-v5.5.1-tools.json, verbatim, sha256
5c6a0453…) and adds four unit tests that compare PINS against it:

  • pins_are_verbatim_rows_of_the_release_tools_json — every row's version,
    sha256, size and URL must equal the status: recommended entry, and a
    mismatch names the row: mutating one digit of the xtensa-esp-elf linux-amd64 sha256 makes it print
    xtensa-esp-elf linux-amd64: sha256 is <upstream> upstream, <edit> here
    (verified, then reverted). A bump therefore produces a to-do list, not a
    runtime download failure.
  • pins_cover_exactly_the_archives_upstream_publishes — for all seven
    components across both profiles x the five supported hosts, a pin exists
    exactly where upstream publishes an archive, no row is dead, and no row
    borrows another host's bits. Old coverage was linux-amd64 only.
  • upstream_publishes_no_linux_arm64_ninja_so_a_delegated_build_there_has_none
    — records a real gap found while writing the above: the v5.5.1 tools.json has
    no linux-arm64 ninja archive (keys are linux-amd64, macos, macos-arm64,
    win64), so a delegated idf.py build on an arm64 Linux host has a pinned
    cmake and pinned toolchains but no pinned ninja. The test fails if upstream
    ever publishes one, so the pin gets added instead of the gap rotting.
  • the_release_publishes_one_recommended_version_per_pinned_component — the
    single-release rule from feat(espidf): move the delegated ESP-IDF pin to v5.5.2+ so ESP32-P4 rev-3 silicon builds #2133 ("no second IDF release is pinned"), enforced
    per component.
  • the_tools_json_snapshot_belongs_to_the_pinned_release — moving
    IDF_RELEASE_VERSION without replacing the snapshot is a red test, not a
    silent cross-release comparison.

tools.json spells ninja's Windows archive win64 where fbuild uses win32;
that one documented remap is encoded as a one-entry alias table rather than
special-cased in the comparison.

No pin is moved in this PR — IDF_RELEASE_VERSION is untouched, so nothing
about the built toolchain changes. #2133 stays open (remaining cells: the
version/commit/pins bump, the board-derived P4 silicon family, the Python lock
for the new release, re-measured installed sizes and the five-chip e2e runs).

Verification (real output, this branch)

$ soldr cargo test -p fbuild-toolchain --lib esp_idf_release_tests
test result: ok. 22 passed; 0 failed; 1 ignored; 0 measured; 197 filtered out

$ soldr cargo test -p fbuild-toolchain --lib
test result: ok. 214 passed; 0 failed; 6 ignored; 0 measured; 0 filtered out

$ soldr cargo clippy -p fbuild-toolchain --lib --tests -- -D warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 9m 13s   (exit 0)

$ uv run --no-project --with pyyaml python ci/enforce_platform_boundary.py --print-totals
rows=0; dylint_rows=0                                                      (rc 0)
$ uv run --no-project --with pyyaml python -m unittest ci.test_enforce_platform_boundary
Ran 14 tests ... OK

The 1 ignored test is the pre-existing archive-download proof (esp-rom-elfs),
which needs the network and is unchanged by this PR.

…ols.json

`PINS` in `esp_idf_release.rs` is documented as the pinned release's
`tools/tools.json` `status: recommended` rows "verbatim", but nothing in the
repo could tell whether that was still true: a moved pin is 30 rows of
sha256/size/URL transcribed by hand, and one wrong digit only shows up as a
download failure in a user's cache.

Commit the release's own tools.json beside the existing Python pins
(`data/esp-idf-v5.5.1-tools.json`, 1050 lines, verbatim) and compare the two:

- pins_are_verbatim_rows_of_the_release_tools_json: every row's version,
  sha256, size and URL must equal the `status: recommended` entry, and a
  mismatch names the row (verified by mutating one digit: the test reports
  `xtensa-esp-elf linux-amd64: sha256 is <upstream> upstream, <edit> here`).
- pins_cover_exactly_the_archives_upstream_publishes: for each of the seven
  components (both profiles) x five supported hosts, a pin exists exactly
  where upstream publishes an archive, no row is dead, and no row borrows
  another host's bits. Previously only linux-amd64 was covered.
- the_release_publishes_one_recommended_version_per_pinned_component: the
  "one release, not two" rule from #2133, enforced per component.
- the_tools_json_snapshot_belongs_to_the_pinned_release: moving
  IDF_RELEASE_VERSION without replacing the snapshot fails instead of
  comparing the new pin against the old release's data.

`tools.json` spells ninja's Windows archive `win64` where fbuild uses `win32`;
that one documented remap is a one-entry alias table.

Recorded while writing them: upstream's v5.5.1 tools.json has no linux-arm64
ninja archive (keys are linux-amd64, macos, macos-arm64, win64), so a delegated
build on an arm64 Linux host cannot get a pinned ninja even though cmake and
every toolchain are pinned there. A test pins that fact down so an upstream
addition flips it.

No pin moves here — IDF_RELEASE_VERSION is untouched, so the built toolchain is
byte-identical. This is the stage that makes #2133's bump a reviewable data
diff (#2133 stays open: version/commit/pins, P4 silicon family, Python lock,
re-measured sizes, five-chip e2e).

Verified: soldr cargo test -p fbuild-toolchain --lib => 214 passed, 0 failed,
6 ignored (the archive-download proofs).
@coderabbitai

coderabbitai Bot commented Nov 22, 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

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

Parsing warnings: 1

Validation error: Unrecognized key: "enabled" at "reviews.pre_merge_checks"
Configuration instructions

  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
  • 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 commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

Stage 0 landed as PR #2146: the pin table is now checked against the pinned release's own tools/tools.json (crates/fbuild-toolchain/data/esp-idf-v5.5.1-tools.json), so the bump in AC1 is a reviewable data diff instead of 30 hand-copied sha256 rows. Two things it measured while being written:

  • Every one of the 30 PINS rows currently matches v5.5.1's tools.json byte for byte (version, sha256, size, URL) — the copy is clean today.
  • v5.5.1's tools.json publishes no linux-arm64 ninja archive (keys: linux-amd64, macos, macos-arm64, win64), so a delegated build on an arm64 Linux host has pinned cmake and toolchains but no pinned ninja. Not this issue's cell, but it will bite the bump's e2e matrix on arm64.

Remaining here: version/commit/PINS/Python-lock bump (v5.5.2+, v5.5.6 is newest), the board-derived P4 silicon family, re-measured installed sizes and the five-chip e2e runs — none of which fit a single steward tick on this host.

@zackees
zackees added this pull request to the merge queue Nov 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 22, 2026
@zackees
zackees added this pull request to the merge queue Nov 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 22, 2026
@zackees
zackees added this pull request to the merge queue Nov 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 22, 2026
@zackees
zackees added this pull request to the merge queue Nov 22, 2026
Merged via the queue into main with commit db1e03d Nov 22, 2026
94 of 103 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Nov 23, 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