Repository navigation
feat(prebuilt): stamp the arduino-esp32 SDK variant identity in staging (#1882) - #2164
Merged
Merged
Conversation
…ng (#1882) Decision 8a: the SDK variant's content id is taken in the extract dir, after the compat patches and before the merge; the merge re-checks the id and withdraws the stamp when it did not reproduce the staged bytes. patch_installed_variants skips a stamped (final) variant and still patches legacy trees, which keep no identity. Adds component_id::remove_stamp.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
This was referenced Nov 23, 2026
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.
Decision 8a of
docs/design/artifact-serving-decisions.md— the second of the threecomponent stamps, and the "patch sites moved ahead of the stamp" unit that decision 8a
requires. Follows #2162 (core stamp + the
component_idmachinery); #1882 stays open.What changes
libs.rs— the SDK variant's identity is taken in the extract dir, ahead of the merge.install_sdk_from_archive(new, sync) is the staging half of the SDK install: extract →find the
<variant>/tree wherever the producer's wrapper put it → runpatch_mcu_compatibilitythere →content_idover that staging tree →write_stamp(sdk-<variant>,SDK_RECIPE = 1) → merge intotools/.install_sdk_archivekeeps only the fetch + temp-dir ownership.patch_mcu_compatibilityused to mutate the installed treeafter the merge; it now runs in staging so the patches are inside the hash.
SDK_RECIPEis 1 from the start of this unit, and bumps whenever the patches change what they write.
reconcile_sdk_stamp. A stamp promises that these exact bytes were hashed, and themerged tree is what ships. After the merge the id is recomputed over
tools/esp32-arduino-libs/<variant>/and the stamp is withdrawn if the two disagree(a pre-existing partial tree, or a copy that did not reproduce a link). No identity is
better than a false one: the planner then compiles from source.
patch_installed_variantsskips a stamped variant. A stamped component is final —decision 8a forbids mutating it after the stamp. A legacy tree (installed before this
landed) still gets patched in place and keeps no identity; there is no backfill.
component_id::remove_stamp— the withdrawal primitive, idempotent.esp32_framework/README.mddocuments the new responsibility oflibs.rs.Deliberately conservative
merged in the same pass keep no identity, so they compile from source instead of being
certified unpatched. Stamping all of them is a later unit.
FetchRequest::fetchhalf ofensure_libsis not exercised by the new tests — theydrive
install_sdk_from_archive, which is the whole extract/patch/stamp/merge/reconcilepath, with a real
tar.xzfixture. A real download remains an ignored-e2e cell (feat(espidf): move the delegated ESP-IDF pin to v5.5.2+ so ESP32-P4 rev-3 silicon builds #2133).Verification (real output)
soldr cargo test -p fbuild-packages-fetch --lib→ 300 passed; 0 failed; 2 ignored(299 before; +1 for
remove_stamp).soldr cargo test -p fbuild-library --lib→ 389 passed; 0 failed; 9 ignored,including the five new tests:
a_fresh_sdk_install_stamps_the_variant_in_staging— stamp exists withcomponent = sdk-esp32c3,version,recipe, andcontent_idequal to the id of themerged tree.
sdk_compat_patches_run_ahead_of_the_stamp— for esp32c2 both compat mutations arepresent in the installed tree and inside the id.
a_merge_into_a_preexisting_tree_drops_the_identity— an extraliblegacy.asurvivesthe merge and the stamp is withdrawn.
a_stamped_variant_is_never_patched_again/an_unstamped_variant_is_still_patched_in_place.soldr cargo clippy -p fbuild-library -p fbuild-packages-fetch --all-targets -- -D warnings→ exit 0.
soldr cargo fmt --all -- --check→ exit 0.ci/enforce_platform_boundary.py --print-totals→rows=0; dylint_rows=0;ci.test_enforce_platform_boundary→ 14 tests OK.#1882 stays open (remaining units: the MCU skeleton stamp, the hidden
--prebuilt-coreopt-in, the 8b ladder). Per decision 8c nothing is published or fetched by this change.