Repository navigation
feat(prebuilt): framework identity term over component stamps (#1882) - #2168
Merged
Merged
Conversation
Adds the framework term of the prebuilt-framework fingerprint: the per-component identity of an installed ESP32 framework, read only from the stamps the components wrote in staging (decision 8a), plus its first real consumer. - component_id::component_term(): domain-tagged, TERM_SCHEMA-versioned hash over (component, version, content_id, recipe); order-independent, and install-history independent because it never re-hashes the installed tree. None for an empty identity list or a duplicated component name. - Esp32Framework::framework_identity(mcu, sdk_variant): requires the core stamp and the sdk stamp of every required variant; includes the mcu skeleton stamp when present; None for a legacy, half-installed or half-merged tree. - Esp32FingerprintMetadata::framework_identity: the esp32 fast-path fingerprint now covers the framework bytes its flags point at, so an SDK re-install or compat patch landing the same paths with different bytes cannot replay a stale fast path. Skipped when None, so a legacy tree serializes exactly as before and no existing fast path is invalidated. Refs #1882; the issue stays open (8b planner/transfer is not in this PR).
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
This was referenced Nov 24, 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.
Adds the framework term of the prebuilt-framework fingerprint: the per-component identity of an installed ESP32 framework, read from the stamps the components wrote in staging (
docs/design/artifact-serving-decisions.md§8a), plus its first real consumer.Refs #1882. #1882 stays open (the planner/transfer ladder of 8b is not in this PR).
What lands
fbuild_packages_fetch::component_id::component_term(&[ComponentIdentity]) -> Option<String>TERM_SCHEMA-versioned hash over(component, version, content_id, recipe)of every component.Nonefor an empty identity list (no identity → no fingerprint, never an invented one) and for a duplicate component name (an ambiguous tree cannot present a canonical id).Esp32Framework::framework_identity(mcu, sdk_variant) -> Option<String>(esp32_framework/identity.rs)corestamp at the framework root and thesdk-<variant>stamp of every required variant (MCU plusbuild.chip_variant, fix(esp32): per-chip libs slices install onlymcu, so ESP32-P4 ES boards have noesp32p4_esSDK tree #1897). A missing tree or a missing stamp yieldsNone.mcu-<mcu>skeleton stamp when present; a platform that ships no skeleton simply has none.Esp32FingerprintMetadatagainsframework_identity: Option<String>(the esp32 fast-path fingerprint key). Every other field describes the board/toolchain/flags; this one covers the framework bytes those flags point at, so an SDK re-install or a compat patch that lands the same paths with different bytes can no longer replay a stale fast path.#[serde(skip_serializing_if = "Option::is_none")]: a legacy, unstamped tree serializes exactly as before, so no existing fast path is invalidated by this field; only a stamped tree gains the term.Tests (real output at head)
soldr cargo test -p fbuild-packages-fetch --lib component_term→ 8 passed / 0 failed (order independence, sensitivity to content id / recipe / version / component name, empty →None, duplicate component →None, every component covered).soldr cargo test -p fbuild-library --lib framework_identity→ 6 passed / 0 failed:esp32devinto the same core tree leaves theesp32c3term byte-identical (decision 8a's test 18);None(test 20);None; the same tree identified for the plain MCU;None;soldr cargo test -p fbuild-build-esp --lib fingerprint→ 5 passed / 0 failed, includingan_unstamped_framework_leaves_the_metadata_unchanged(the legacy metadata JSON has noframework_identitykey).ci.test_enforce_platform_boundary→ 14 tests OK;ci/enforce_platform_boundary.pytotals unchanged.identity.rs55,identity_tests.rs167,tests.rs967 /libs.rs970 (<1000).Not in this PR
--prebuilt-core/FBUILD_PREBUILT_CORE, the Catalog/index readers, the daemon fetch ladder and any publish (§8c is maintainer-only). A flag whose only consumer would be a planner that does not exist yet is dead code, and the design doc rejects landing that.