Skip to content

feat(M4-P0E3C): verified three-MU group START/STOP with authoritative board readback - #358

Merged
masarray merged 5 commits into
mainfrom
feat/m4-p0e3c-authoritative-group-start-stop
Nov 4, 2026
Merged

masarray merged 5 commits into
mainfrom
feat/m4-p0e3c-authoritative-group-start-stop

Conversation

@masarray

@masarray masarray commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Real production milestone

Adds explicit 3-MU group START authorization and STOP confirmation through existing native Studio, single DeviceIoWorker, ESP32-P4 UART task and the same 250us/4000Hz publisher. Does not introduce a new engine, GUI, FreeRTOS publisher, timer or CI workflow.

Invariants

  • SCD must match selected, boot-scoped ARM3 roster; 3/3 MU canonical CFG COMMIT+READBACK required.
  • No silent re-use of edited QML drafts: fresh three-draft hash comparison at the operator START click.
  • Firmware M4START validates boot ID, full roster hash, each MU generation+hash, all three enable bits, fresh control heartbeat, link UP, STOPPED state, and token replay guard.
  • V1 START cannot bypass selected M4; START ACK != RUNNING. Explicit M4SHOW readback verifies running/mask/boot/roster/generation before presentation.
  • Priority STOP retires queued exclusive operations and requires STOP ACK plus M4SHOW stopped proof; timeout is UNKNOWN, not success.
  • USB disconnect never implicitly STOPs or STARTs the autonomous publisher. Existing V1, 3-slot fixed capacity, PTP sync honesty and stable M3.H.3 release preserved.

Regressions / gates

Updated existing native Qt uploader + deterministic session harness, QML safety contract and firmware ownership regression; exact paired ESP32-P4 firmware and Windows/Linux Studio preview are required. Do not merge unless all executed exact-head checks pass and any review findings are resolved. Physical PCAP measurement of 3×4000fps, sample epochs, live values and sustained timing is PENDING.

Related: #333; prior production M4 roster reconciliation #350 is already merged.

…ve readback

Reuse single ESP32-P4 publisher/ISR/PTP/serial authority; introduce explicit M4START gated by boot/selected ARM3 hash, 3 current bank generations and hashes, all TX slots, PHY UP, fresh heartbeat and anti-replay. Prevent legacy V1 START bypass of selected M4 roster. Studio only admits matched SCD and unchanged three drafts, and requires exact M4START ACK + M4SHOW RUNNING or STOP ACK + M4SHOW STOPPED before claiming control-plane success. Disconnect revokes local proof without stopping autonomous output; failures remain uncertain and require explicit STOP. Extend existing native M4 and QML regressions; preserve official M3.H.3 release and shared 250us hot path.

Hardware 3x4000fps Ethernet PCAP/long soak acceptance is still PENDING.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 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-11-04T19:21:10.606177Z 9e4b0db 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: 9e4b0dbf5f

ℹ️ 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".

…adback and explicit STOP recovery

Resolve exact CI Qt operator workspace assertion without modifying the legacy pending-CFG START expression. Require firmware SvScenarioTransaction::verified_current_bank() for every M4 bank, not just caller-provided matching values; revokes on bank mutation or stage reset. Preserve manual priority STOP when START acknowledgement/readback is uncertain even if Studio never observed RUNNING; update compact existing STOP affordance. Present verified M4 RUNNING as RUNNING rather than an incorrect Studio session warning. Add positive/negative C++ and QML regressions using existing suites; no new workflows, publishers, timers or UI pages.
…stop incident latch

Address P2 code-review findings on PR #358. Let firmware quiescence own its existing SV STOP ACK -> SHOW/SVLIFE and PTP STOP ACK/readback instead of starting forbidden M4SHOW during exclusive maintenance; preserve safe uncertainty. Clear operator STOP latch after proven group STOP and before a new verified group RUNNING, so future Ethernet/runtime faults generate the correct unexpected-stop incident. Do not mistake runtime forced STOP for operator ACK. Extend the existing deterministic session harness with maintenance proof, group lifecycle and incident-latch negative tests. No additional worker, timer, workflow, publisher or GUI.
…sabled

A legitimate SVSTREAM slot STOP can change the M4 TX mask from 7 to any 3-bit value while the shared publisher remains active. Group STOP must still be verifiable with boot/roster/generation and running=0 instead of spuriously reporting UNCERTAIN due to mask !=7. Preserve strict mask=7 for group START, permit 0..7 only on STOP, and add native negative/positive state regression. No new controls, workflow or publisher changes.
@masarray
masarray merged commit 9be2891 into main Nov 4, 2026
23 checks passed
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