Skip to content

feat(M4-P0D3): per-MU atomic scenario, readback and shared-grid TX gates - #342

Merged
masarray merged 3 commits into
mainfrom
feat/m4-p0d3-per-mu-scenario-transactions
Oct 26, 2026
Merged

masarray merged 3 commits into
mainfrom
feat/m4-p0d3-per-mu-scenario-transactions

Conversation

@masarray

Copy link
Copy Markdown
Owner

Implemented

  • Reuse proven SvScenarioTransaction independently for MU1/MU2/MU3: complete eight-channel staging, hash, generation, timeout and explicit readback via SVSTREAM <slot> CFG ....
  • Add per-MU SVSTREAM <slot> START|STOP TX enable gate sampled once on each shared 250-us publisher iteration, while preserving DDS phase progression and group smpCnt for late rejoin.
  • Maintain one shared GPTimer/PTP authority, one publisher task and one Ethernet MAC. Keep existing single-SV V1 commands, released M3.H.3 assets and single-SV TX untouched.
  • Regression coverage added to existing M4 signal test: concurrent drafts, checksum failure, stale-generation rejection, readback, 3-way enable isolation and same-phase late rejoin.
  • Fix stale MULTISV COMMITTED log output; document engineer protocol and limitations.

CI & physical proof

Require C++ GCC/Clang/MSVC, ESP32-P4 firmware build, Studio native preview, and all repository checks GREEN before merge. No claim of measured physical 12kfps, 250us deadline, packet skew, or PTP phase from CI.

Next

P0E native Studio roster/pages/deploy/readback. P0F paired builds and physical Ethernet 3×4000fps capture. Tracks #333.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 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-26T00:23:32.125144Z be01dfb 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: be01dfb245

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

M4ThreeSvSignalBanks banks{};
std::array<std::uint32_t, 3> sent{};
std::array<std::uint16_t, 3> last_sample{};
for (std::uint32_t tick = 0U; tick < 4050U; ++tick) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reset the stream gate before the shared-grid simulation

The preceding gate checks leave the mask at 0x03, so MU3 remains disabled throughout this loop and sent[2] stays zero. Consequently, the new test always fails at line 212 instead of validating late rejoin, breaking the registered CTest target. I reproduced this by compiling and running tests/test_m4_three_sv_signals.cpp with g++ -std=c++20 -Iinclude. Reset the gate to all-enabled before starting the simulation.

Useful? React with 👍 / 👎.

std::uint32_t evidence_session = 0U;
std::uint32_t fault_generation_before = 0U;
if (epoch_armed && g_sample_clock_context.phase_enabled &&
if (send_primary && epoch_armed && g_sample_clock_context.phase_enabled &&

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Collect group timing evidence from an enabled MU

With hardware egress timestamping and AUTO synchronization enabled, SVSTREAM 1 STOP now disables the only path that records MAC timing evidence, even while MU2 and MU3 continue transmitting. SvLocalSyncEvidenceGate::qualified() and qualified_source_fast() expire that evidence after kMaxEvidenceAgeEpochs, and the phase observer subsequently clears the group's synchronization qualification, making the remaining streams advertise unsynchronized samples despite their unchanged shared clock. Select an enabled stream for descriptor timestamping, with an appropriate evidence-baseline handoff, so muting MU1 does not prevent the other MUs from acquiring or retaining synchronization.

Useful? React with 👍 / 👎.

@masarray
masarray merged commit c79bbfb into main Oct 26, 2026
20 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