Repository navigation
feat(espidf): false-coverage gate — integration=idf-cmake only with artifact proof - #1985
Merged
Merged
Conversation
Follow-up 3 of 5 from #1761 (closes #1972). A delegated idf.py build (#1984) now emits a stack summary, and the only summary line allowed to name `integration=idf-cmake` is one built from an `IdfCmakeProof`. The proof struct has private fields and a single constructor, `verified`, which measures what the build actually published: a non-empty app image and ELF, at least one `compile_commands.json` entry, and a SHA-256 of the generated `sdkconfig`. `Esp32Integration::IdfCmake` carries the proof, so the mode is unrepresentable without it. `RequestedFrameworks::integration`, which only sees `framework =`, cannot produce the variant at all — a request can never claim CMake coverage. A delegated build that cannot prove itself is an error, never a silent downgrade, and the summary names the pinned IDF release so a log says what it built with. `arduino, espidf` keeps reporting `arduino-on-idf`; bare `espidf` still fails fast in `reject_unsupported_esp_framework`. Tests (all in `-p fbuild-build-esp --lib`): - `idf_cmake_proof_is_refused_without_artifacts`: empty app image, empty ELF and an empty compile database each refuse the claim with a message naming the missing proof. - `idf_cmake_summary_names_the_pinned_idf_and_proof`: the line carries `integration=idf-cmake`, `idf=v5.5.1`, chip, entry count and digest. - `requested_frameworks_can_never_claim_idf_cmake`: no `framework =` value yields the variant. - The existing #1730 summary test (requested vs resolved framework, cross-version concealment) passes unchanged.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
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.
Closes #1972 (follow-up 3 of 5 from the #1761 research pass).
What
integration=idf-cmakeis now a claim that cannot be written without evidence.IdfCmakeProof(esp32/orchestrator/helpers.rs) — private fields, oneconstructor
verified(artifacts, idf_release). It measures the artifacts thedelegated build published: app image bytes > 0, ELF bytes > 0, at least one
compile_commands.jsonentry, and a streamed SHA-256 of the generatedsdkconfig. Anything missing is anErr, which the delegated path propagates —the build fails, it does not silently fall back to a weaker label.
Esp32Integration::IdfCmake(IdfCmakeProof)— the variant carries theproof, so "names idf-cmake without proof" does not compile. The label literal
lives once, on the proof type, and
Esp32Integration::label()reads it.RequestedFrameworks::integration()— untouched behaviour, and nowstructurally unable to produce the variant: it only inspects
framework =andhas no build result to measure.
arduino, espidfstill reportsarduino-on-idf; bareespidfstill fails fast.esp32_idf_cmake_stack_summary— the only summary line that names themode; it takes the proof and prints the pinned IDF release plus the proof
numbers, e.g.
espidf_delegate::delegate_buildbuilds the proof right after artifactdiscovery and pushes the summary into the build log.
Tests
-p fbuild-build-esp --lib: 238 passed, 0 failed, 2 ignored. The three newtests are the RED cases from the issue (proof refused per missing element,
summary contents, requested-framework path can never claim the mode); the
existing #1730 summary test passes unchanged.
Gates run locally
cargo fmt --checkclean; platform boundaryrows=44; dylint_rows=43;check_test_layoutok; dylint allowlists current; workspace crates ok; USBVID/PID guard ok. Workspace clippy/Dylint Full left to CI (local
run_dylintis unrunnable on this host).