Skip to content

feat(espidf): false-coverage gate — integration=idf-cmake only with artifact proof - #1985

Merged
zackees merged 1 commit into
mainfrom
agent/idf-cmake-gate
Nov 10, 2026
Merged

zackees merged 1 commit into
mainfrom
agent/idf-cmake-gate

Conversation

@zackees

@zackees zackees commented Nov 10, 2026

Copy link
Copy Markdown
Member

Closes #1972 (follow-up 3 of 5 from the #1761 research pass).

What

integration=idf-cmake is now a claim that cannot be written without evidence.

  • IdfCmakeProof (esp32/orchestrator/helpers.rs) — private fields, one
    constructor verified(artifacts, idf_release). It measures the artifacts the
    delegated build published: app image bytes > 0, ELF bytes > 0, at least one
    compile_commands.json entry, and a streamed SHA-256 of the generated
    sdkconfig. Anything missing is an Err, which the delegated path propagates —
    the build fails, it does not silently fall back to a weaker label.

  • Esp32Integration::IdfCmake(IdfCmakeProof) — the variant carries the
    proof, 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 now
    structurally unable to produce the variant: it only inspects framework = and
    has no build result to measure. arduino, espidf still reports
    arduino-on-idf; bare espidf still fails fast.

  • esp32_idf_cmake_stack_summary — the only summary line that names the
    mode; it takes the proof and prints the pinned IDF release plus the proof
    numbers, e.g.

    ESP32 packages: build_system=espidf, chip=esp32s3, integration=idf-cmake, idf=v5.5.1; proof: app_bin_bytes=…, elf_bytes=…, compile_db_entries=…, sdkconfig_sha256=…
    

espidf_delegate::delegate_build builds the proof right after artifact
discovery and pushes the summary into the build log.

Tests

-p fbuild-build-esp --lib: 238 passed, 0 failed, 2 ignored. The three new
tests 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 --check clean; platform boundary rows=44; dylint_rows=43;
check_test_layout ok; dylint allowlists current; workspace crates ok; USB
VID/PID guard ok. Workspace clippy/Dylint Full left to CI (local
run_dylint is unrunnable on this host).

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

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

@zackees
zackees added this pull request to the merge queue Nov 10, 2026
Merged via the queue into main with commit 2a44010 Nov 10, 2026
37 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Nov 11, 2026
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.

feat(espidf): false-coverage gate — integration=idf-cmake only with artifact proof

1 participant