Skip to content

P0: ESP32-P4 flash identity matches firmware manifest; actionable native diagnostics - #189

Merged
masarray merged 3 commits into
mainfrom
fix/studio-firmware-build-id-wire-proof-20261016
Oct 16, 2026
Merged

masarray merged 3 commits into
mainfrom
fix/studio-firmware-build-id-wire-proof-20261016

Conversation

@masarray

Copy link
Copy Markdown
Owner

Physical root cause from operator's board

An actual COM15 lab flash succeeded with espflash yet Studio marked installation incomplete. Manifest/source build 34485139b136b67e; device reports d6d2aa6666c35ccd. GitHub API confirms d6d2... is the synthetic PR merge commit and 3448... is the exact PR HEAD. The reusable firmware workflow checked out PR HEAD but inherited GITHUB_SHA from merge event when IDF initially configured CMake, so firmware advertised the wrong identity despite manifest SHA correctness.

Changes

  • Pin firmware build ID from the same exact checked-out commit used by the artifact manifest before ESP-IDF set-target, with checkout equality gate and valid SHA format.
  • Manifest explicitly includes buildId; built merged firmware image must contain the same ASCII identity, blocking artifacts that disagree even if their image SHA is valid.
  • GUI's failure text includes both exact installed and bundled build IDs with optional compatible-firmware guidance rather than a vague version mismatch.
  • Advanced firmware panel presents the real installed build and labels the optional action Install bundled build. Copy diagnostics remains read-only and available.
  • New deterministic harness regression: wrong installed build is diagnosable and remains runnable, never silently marked verified.

Invariants

No change to SMV/PTP hot path, flash offsets, image layout, semantic contract, serial ownership, PTP M3 draft, or public v0.1.1 release. Real ESP32-P4 reflash/verification still must be repeated with new installer before lab acceptance. Await CI (Qt + ESP-IDF + full native preview installer).

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T01:17:15.319563Z 6bcb45f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6bcb45f93a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/esp32p4-smv-injector.yml
@masarray
masarray merged commit bc344a8 into main Oct 16, 2026
9 checks passed

Copy link
Copy Markdown
Owner Author

Final physical acceptance handoff — merged 2026-10-16

PR #189 merged to main as bc344a841f81a459626ddb0ee668fe4a4e6ba284, tree 9bb4052f127bb946bc983c7ade7f7c1e3d24aaff equals tested PR-head tree 3f82fe910f4c423054e2daafa629bf1c7ba26056. Exact PR-head CI: 9/9 checks PASS (firmware, Qt native, Windows ownership/lifecycle, native Inno preview, routing/naming).
Physical root cause: old PR #186 bundled manifest source/build 34485139b136b67e, while ESP32-P4 IDENTIFY reported d6d2aa6666c35ccd. GitHub confirmed d6d2... synthetic PR merge SHA, not PR HEAD. The CI incorrectly used GitHub event's merge SHA in CMake firmware BUILD_ID. This PR pins ID from exact checkout before IDF configure, adds explicit buildId manifest and embedded byte-level identity gate.
Independent artifact verification: Native-preview artifact 12018603800 from workflow 38834437403. Setup ARStack-Studio-Preview-win-x64-setup.exe SHA256 442537b927465c63281918755b52868bd51787f48549334130ead3f5c83a9156. Firmware manifest sourceCommit=3f82fe910f4c423054e2daafa629bf1c7ba26056, buildId=3f82fe910f4c4230, image SHA256 e0543251757d23902cae39ca306d9924993a81224dacd23ac2e0f92c83493b1d; binary actually contains correct ASCII build ID and excludes old merge build ID. Provenance publicRelease=false, ptpHardwareQualified=false, embeddedExperimentalM3=false.
Lab acceptance remaining: Operator installs exact PR189 preview on Windows, connects ESP32-P4 COM15, uses Advanced > Firmware > Install bundled build; after flash+reset verify exact ID 3f82fe910f4c4230, Exact bundled build match: yes, GUI reports verified not incomplete; capture 4000 fps canonical SMV and stop, then share Copy diagnostics on any mismatch. No physical test of this NEW binary has been claimed yet.
Related separate blocker: DigSubAnalyzer receive-only metering interprets 4I4V raw INT32 as calibrated A/V causing bogus MW/Mvar; tracked in masarray/DigSubAnalyzer#26. Do not apply blind vendor-specific scaling or conflate with firmware build provenance.
Stable v0.1.1 release unchanged; PTP M3 PR #166 remains Draft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant