Repository navigation
feat(prebuilt): stamp the MCU skeleton component's identity in staging (#1882) - #2166
Merged
Merged
Conversation
#1882) Decision 8a of docs/design/artifact-serving-decisions.md: the third and last framework component (after the core and the SDK variant) takes its content id in its own staging tree, never as a hash of an installed tree. - the skeleton extract dir is patched first and stamped second, so the compat patches (esp32c2 touch header, esp32c2/h2 esp_bt.h) are inside the identity instead of a post-stamp mutation of the installed tree; - the merge re-checks the id and withdraws the stamp when it did not reproduce the staged bytes (a copy into a pre-existing partial MCU dir), so that tree keeps no identity and the planner compiles from source; - patch_unless_stamped is now the single guard for in-place patching: a stamped tree is final, a legacy tree is still patched and stays identity-less. Reused by patch_installed_variants and both ensure_mcu_libs paths. Tests: the stamp is taken in staging and survives the merge with the patched header inside its content id (the withdrawal test was shown RED with the reconcile call removed), a partial destination tree loses its stamp, an archive without the requested MCU carries none, and a stamped tree is never patched.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
skeleton_extract's std::path::PathBuf return value was never consumed; ban_std_pathbuf denies the type in new code (test code included) and only the Dylint Full lane sees it, so Dylint Full went red on 58d6983 while local clippy was clean. Removing the unused return is the minimal fix (no caller reads it).
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.
What
Third component identity of decision 8a (
docs/design/artifact-serving-decisions.md§8a, #1882): the per-MCU skeleton, after the core (#2162) and the SDK variant (#2164). Identity is taken in the skeleton's extract dir, never as a hash of an installed tree.How
esp32-arduino-libs/<mcu>tree is patched (esp32c2 touch header, esp32c2/h2esp_bt.h) and only then stamped asmcu-<mcu>withMCU_SKELETON_RECIPE, so every compat patch's bytes are inside the content id.tools/, the installed id is recomputed; a mismatch (e.g. a partial MCU dir the core archive shipped) drops the stamp, so that tree keeps no identity instead of a false one.patch_unless_stampedis now the only route: a stamped tree is final and is never mutated; a legacy tree is patched and stays identity-less. Reused bypatch_installed_variantsand bothensure_mcu_libspaths (so a complete, stamped skeleton is no longer re-patched on the early return).stamp_component/reconcile_stampare shared by the SDK and skeleton components; the SDK behaviour is unchanged.Tests
crates/fbuild-librarylib suite: 393 passed, 0 failed, 9 ignored;clippy --all-targets -D warningsclean; both touched files stay under the 1000-LOC gate (libs.rs948,tests.rs934).New tests (+1 existing filter run 58/58 for
esp32_framework):skeleton_identity_is_taken_in_staging_and_survives_the_merge— stamp present,component=mcu-esp32c2, recomputed id equals the record, and the patch-written header is inside it.skeleton_identity_is_withdrawn_when_the_merge_does_not_reproduce_the_staged_bytes— shown RED with the reconcile call removed (0 passed / 1 failed), green with it.skeleton_archive_without_the_requested_mcu_carries_no_identity.a_stamped_tree_is_not_patched_in_place.Additive only: no new crate, no workflow file, no behaviour change for unstamped/legacy trees, default path untouched.
Scope
#1882 stays open (remaining cells: the hidden
--prebuilt-core/FBUILD_PREBUILT_COREopt-in, the 8b ladder, and publishing, which needs maintainer approval). No bucket object is touched here.