Repository navigation
P3-A1: canonical binary SV device-profile envelope - #146
Conversation
Extract the existing BRCB checkpoint CRC-32 semantics into a small portable core header so the upcoming compiled SV device-profile envelope can reuse one integrity algorithm instead of introducing a second checksum authority. No checkpoint wire-format change. Tracks #36.
Add an allocation-free fixed-capacity device-profile model, explicit big-endian binary codec with magic/version/length/CRC-32, ordered wire-leaf descriptors, and an ESP32-P4 host compiler that only accepts currently deployable Class-A profiles. Golden/corruption tests lock the binary contract and prove host-valid IEC 61869-9 remains outside the current device capability. Tracks #36.
Reject hidden VLAN/SmvOpts state, embedded-NUL identifier smuggling, noncanonical leaf widths, and descriptor flag/type mismatches before binary encoding. Keep the envelope canonical so a future embedded decoder cannot reinterpret malformed but checksummed records. Tracks #36.
Add the standard CRC-32 known-answer vector so the shared integrity primitive cannot drift independently between BRCB checkpoint storage and compiled SV device-profile records. Tracks #36.
|
Scoped pre-merge review for P3-A1 binary contract (no competing implementation): prior exact-head CI on One fail-closed contract review item for a future bounded follow-up (not a blocker claim without a regression): No code changes made to your branch; #36 remains the owner of the binary device-profile authority. |
P3-A1 next gate — retarget completed, hold for fresh validation (2026-10-07)P1.3 PR #148 merged safely into PR #146 is now retargeted to that exact Important: the prior 14/14 successes for #146 were run at 2026-10-07 00:15Z, before this retarget. Although GitHub's workflow metadata now displays the current base ref, those are not fresh post-P1.3 merge-tree CI runs. Keep #146 Draft / NOT MERGED until an integration head based on current main is validated and the binary codec edge-case review above is addressed or dispositioned. Do not reuse stale green runs as current-merge acceptance. Bounded next step for #36: integrate current main via a non-destructive, lease-protected branch update, preserve P1.3 SCL negative tests plus #146 binary golden vectors, and run exact-head C++/Studio/embedded/security and package gates on the combined tree. Host binary acceptance is not embedded decoding/activation or physical timing acceptance. |
2026-10-07 P3-A1 integration + decoder hardening checkpoint
|
CI failure triage + fixed head — 2026-10-07Fresh integration head Fixed narrowly on existing PR #146 branch: commit |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Tracks #36 and #33. Stacked on #145 / #144.
Current base:
main@bdd895ae8641dbf3d9c5c6509e3eb94f78802b8d(includes accepted #145 and #148)Current head:
ba131a2481f8fe70f318488a4234fe2a21525cd1Purpose
Close the remaining P3-A1 software integrity gap without creating a second SV semantic model.
The host already owns
SvPublisherProfile; the ESP already has deterministic STOPPED staging/atomic commit and a prebuilt WirePlan. This PR introduces the canonical host -> device binary envelope between them.Architecture
The existing BRCB checkpoint CRC-32 implementation is promoted to a shared integrity primitive rather than introducing a second checksum algorithm.
Host compiler gate
compile_esp32p4_device_profile()only succeeds when the existing device capability classifier says the profile is currently deployable.Therefore:
No standard-valid profile is relabeled invalid merely because V1 device firmware cannot deploy it.
Binary V1 invariants
Regression
123456789->0xCBF43926);Non-goals in this stacked tranche
Next within #36 after this portable contract is accepted: bounded embedded decoder -> temporary RuntimePublisherProfile -> atomic commit, then bridge transport migration.
Merge discipline
#145 and #148 have merged. Current branch has both as ancestors and is ahead of current main (behind 0). Require full fresh exact-head CI on
ba131a...and repeat head/merge-base verification before merge.2026-10-07 integration / decoder hardening
nofASDUand binary/golden-vector regressions.ba131a...; keep Draft until all gates succeed.std::fillregression literal fixed by an explicitstd::uint8_t{0U}; no runtime/wire behavior changed.