Skip to content

Integrate tested M3.H Process Bus source into main without release drift - #299

Merged
masarray merged 643 commits into
mainfrom
integration/m3h-verified-source-to-main-20261024
Oct 24, 2026
Merged

masarray merged 643 commits into
mainfrom
integration/m3h-verified-source-to-main-20261024

Conversation

@masarray

@masarray masarray commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Purpose

Integrate the exact final verified M3.H SV/PTP Studio + ESP32-P4 source into main, using an explicit two-parent merge, while retaining main's post-release docs/landing/CI updates. Do not rebuild or replace the existing Stable release assets.

Proof of source identity and Git reconciliation

  • Tested final M3.H source: a922e9bdba4e57a4e88406eb83344455dd8ff142 (10/10 exact-SHA workflows SUCCESS).
  • Candidate two-parent merge: 7b8c72e6df1a22c8e44d5b05dc1cad0bd0e11245, parents 19c5f08fa3d7fac28c2587ee76639cec9732a4e3 (main) and a922e9bdba4e57a4e88406eb83344455dd8ff142.
  • Guarded staging run SUCCESS: zero merge conflicts; implementation CMakeLists.txt, Studio, ESP32-P4, core include/src/tests/scripts/tools identical to tested baseline; all files changed on main after fork retained with exact blob SHA; PTP/SV CI workflow files retain tested source blob SHA; no force push.
  • Release binary hashes unchanged: Setup 4902e8bf..., Portable ca01424e..., ESP32-P4 BIN 61c508e9... (source/build ID a922e9bdba4e57a4).
  • 40.762934-second valid M3.H PCAP: 163,048 SV, 100% smpSynch=2, 0 missing/duplicate, 44 Announce, 43 each Sync/Follow_Up; 120-second endurance and real relay lock remain unverified, not prerequisites for a public isolated-lab simulator.

Merge gate

Refs: release, source audit.

Final Git ancestry provenance (release = main)

  • Final reviewed head: c90a9798508fe5146d53cf3173b2980ded557198.
  • Original source integration commit 7b8c72e6... merges main and the validated M3.H source exactly (source files untouched, current main files kept).
  • A second documented, tree-identical metadata/lineage merge carries the official release tag commit a4b6e53d0dbbcababc55ba8a4ff97ade6f2a6200 as a Git parent. Its tree is exactly 19a1a9ce34d0b5f0f56fe2fbc56cd93726ef5ec5, identical to the verified source integration tree. The tag's five commits add historical release documentation and an old prerelease publishing workflow; their ancestry is retained without re-enabling obsolete publisher logic or replacing newer Stable docs from main. Compare release tag...candidate: ahead, 0 behind.
  • CI gate for merge is the NEW exact candidate head c90a9798..., not the superseded first candidate 7b8c72e....

@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: 7b8c72e6df

ℹ️ 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 on lines +367 to +369
std::array<std::uint8_t, 8> identity{};
std::copy_n(authority.selected_source_clock_identity, 8U, identity.begin());
asdu.gm_identity = identity;

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 Encode the selected grandmaster rather than the upstream port

When RECEIVER mode synchronizes through a PTP boundary clock, the upstream port's clock identity differs from the grandmaster identity carried in Announce. ptp_receiver_task.cpp populates selected_source_clock_identity from receiver.selected_source, while PtpTimeReceiver explicitly stores the Announce grandmaster separately in selected_grandmaster. Copying the port identity here therefore publishes an incorrect SV gmIdentity on that topology. Propagate the selected grandmaster through the authority snapshot and use it for this field.

Useful? React with 👍 / 👎.

Comment on lines +66 to +68
fields = dict(tlvs(asdu))
if 0x82 not in fields or 0x87 not in fields or 0x80 not in fields:
raise ValueError("missing smpCnt, seqData or svID")

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 Reject incomplete SV headers before passing the capture audit

The new acceptance parser checks only three ASDU fields, ignores the declared noASDU, and substitutes zero for an absent smpSynch. A synthetic continuous capture with noASDU=2, one actual ASDU, and neither confRev nor smpSynch returns PASS_PCAPPARSER_ONLY, zero malformed frames, and a fabricated smpSynch_0 distribution. Validate the required fields and their lengths, reject duplicate tags, and check the declared ASDU count before allowing these frames into the acceptance aggregates. This also follows the repository's explicit tag/count validation requirement.

AGENTS.md reference: AGENTS.md:L60-L64

Useful? React with 👍 / 👎.

Comment on lines +697 to +702
const double x = static_cast<double>(value);
powerSums[i] += x * x;
sums[i] += x;
if (frequencyValid && record.count < 4000U) {
sinSums[i] += x * sineBasis[record.count];
cosSums[i] += x * cosineBasis[record.count];

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 Scope waveform measurements to individual SV streams

On a TAP/SPAN carrying multiple SV publishers, the EtherType-only capture filter accepts every stream, but these accumulators combine all publishers into one channel measurement. Although continuity is tracked by streamKey, RMS, phase, quality counts, and observed_fps are calculated globally: two healthy 4000-fps streams appear as roughly 8000 fps, and equal signals with opposite phases can cancel the reported fundamental. Select the intended stream before aggregation or maintain and export these measurements per stream so the report describes an actual publisher.

Useful? React with 👍 / 👎.

…d safe release workflows

Record release/tag ancestry as a deliberate ours merge of documentation-only packaging commits. All shipped M3.H implementation bytes are inherited from verified source a922e9b. Existing main already contains updated Stable documentation; do not resurrect the original prerelease publisher which could overwrite pinned release assets. Tree identical to audited two-parent source-integration candidate.
@masarray
masarray merged commit ad2ebd0 into main Oct 24, 2026
27 checks passed
masarray added a commit that referenced this pull request Oct 24, 2026
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