Repository navigation
test(toolchain): check the ESP-IDF pin table against the release's tools.json - #2146
Conversation
…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).
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
|
Stage 0 landed as PR #2146: the pin table is now checked against the pinned release's own
Remaining here: version/commit/ |
What
Stage 0 of #2133 (move the delegated ESP-IDF pin to v5.5.2+): make the
hand-copied
PINStable checkable before anyone moves it.crates/fbuild-toolchain/src/toolchain/esp_idf_release.rsdocuments its 25archive pins as "
tools.jsonof 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.jsonbeside the existingPython pins (
data/esp-idf-v5.5.1-tools.json, verbatim, sha2565c6a0453…) and adds four unit tests that comparePINSagainst it:pins_are_verbatim_rows_of_the_release_tools_json— every row's version,sha256, size and URL must equal the
status: recommendedentry, and amismatch names the row: mutating one digit of the
xtensa-esp-elf linux-amd64sha256 makes it printxtensa-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 sevencomponents 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-arm64ninja archive (keys are linux-amd64, macos, macos-arm64,win64), so a delegated
idf.pybuild on an arm64 Linux host has a pinnedcmake 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— thesingle-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— movingIDF_RELEASE_VERSIONwithout replacing the snapshot is a red test, not asilent cross-release comparison.
tools.jsonspells ninja's Windows archivewin64where fbuild useswin32;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_VERSIONis untouched, so nothingabout 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)
The 1 ignored test is the pre-existing archive-download proof (
esp-rom-elfs),which needs the network and is unchanged by this PR.