Repository navigation
Integrate tested M3.H Process Bus source into main without release drift - #299
Conversation
…enters binary profile
…from operator profile
…AC epoch and fresh source
…de and host UTC epoch
…ench and follower frames
…input and reload regression
…e SV golden fixture
…oss-stream stale value
…y and GM identity
There was a problem hiding this comment.
💡 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".
| std::array<std::uint8_t, 8> identity{}; | ||
| std::copy_n(authority.selected_source_clock_identity, 8U, identity.begin()); | ||
| asdu.gm_identity = identity; |
There was a problem hiding this comment.
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 👍 / 👎.
| 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") |
There was a problem hiding this comment.
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 👍 / 👎.
| 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]; |
There was a problem hiding this comment.
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.
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
a922e9bdba4e57a4e88406eb83344455dd8ff142(10/10 exact-SHA workflows SUCCESS).7b8c72e6df1a22c8e44d5b05dc1cad0bd0e11245, parents19c5f08fa3d7fac28c2587ee76639cec9732a4e3(main) anda922e9bdba4e57a4e88406eb83344455dd8ff142.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.4902e8bf..., Portableca01424e..., ESP32-P4 BIN61c508e9...(source/build IDa922e9bdba4e57a4).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)
c90a9798508fe5146d53cf3173b2980ded557198.7b8c72e6...merges main and the validated M3.H source exactly (source files untouched, current main files kept).a4b6e53d0dbbcababc55ba8a4ff97ade6f2a6200as a Git parent. Its tree is exactly19a1a9ce34d0b5f0f56fe2fbc56cd93726ef5ec5, 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. Comparerelease tag...candidate: ahead, 0 behind.c90a9798..., not the superseded first candidate7b8c72e....