Skip to content

feat(prebuilt): stamp the MCU skeleton component's identity in staging (#1882) - #2166

Merged
zackees merged 2 commits into
mainfrom
agent/1882-skeleton-stamp
Nov 24, 2026
Merged

zackees merged 2 commits into
mainfrom
agent/1882-skeleton-stamp

Conversation

@zackees

@zackees zackees commented Nov 23, 2026

Copy link
Copy Markdown
Member

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

  • Patches before the stamp. The staged esp32-arduino-libs/<mcu> tree is patched (esp32c2 touch header, esp32c2/h2 esp_bt.h) and only then stamped as mcu-<mcu> with MCU_SKELETON_RECIPE, so every compat patch's bytes are inside the content id.
  • The merge is checked. After the copy into 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.
  • One guard for in-place patching. patch_unless_stamped is now the only route: a stamped tree is final and is never mutated; a legacy tree is patched and stays identity-less. Reused by patch_installed_variants and both ensure_mcu_libs paths (so a complete, stamped skeleton is no longer re-patched on the early return).
  • stamp_component / reconcile_stamp are shared by the SDK and skeleton components; the SDK behaviour is unchanged.

Tests

crates/fbuild-library lib suite: 393 passed, 0 failed, 9 ignored; clippy --all-targets -D warnings clean; both touched files stay under the 1000-LOC gate (libs.rs 948, tests.rs 934).

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_CORE opt-in, the 8b ladder, and publishing, which needs maintainer approval). No bucket object is touched here.

#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.
@coderabbitai

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

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).
@zackees
zackees added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit bd1f343 Nov 24, 2026
93 of 102 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Nov 24, 2026
@zackees
zackees deleted the agent/1882-skeleton-stamp branch November 24, 2026 21:36
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