Skip to content

M3C.3: include PTP/GPTimer clock-read uncertainty in SV phase tracking - #224

Merged
masarray merged 6 commits into
feature/esp32p4-smv-ptp-epoch-binding-m3c-20261015from
fix/ptp-m3-phase-confidence-bound-20261017
Oct 17, 2026
Merged

masarray merged 6 commits into
feature/esp32p4-smv-ptp-epoch-binding-m3c-20261015from
fix/ptp-m3-phase-confidence-bound-20261017

Conversation

@masarray

@masarray masarray commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Root cause

The M3 software phase authority promoted software_tracking after N nominal phase readings within 60 µs, without accounting for uncertainty of the bracketed EMAC PTP/GPTimer clock read. A 400-µs read bracket could therefore satisfy the tracking predicate with >=201 µs uncertainty — an unfounded precision claim.

Fix

  • Require abs(phase_error_us) + observation_uncertainty_us <= software_tracking_threshold_us before incrementing consecutive tracking samples.
  • Degrade tracking on uncertain readings, without modifying O(1) ISR, bounded PI/slew, integer PTP-second continuity, SOURCE/RECEIVER clock lease or smpSynch=AUTO semantics.
  • New portable positive/negative C++ regression: 6 high-uncertainty observations must not qualify despite exact nominal phase; 4 fresh narrow observations may qualify; one later degraded bracket revokes tracking.
  • Add scope and physical-evidence limitation to M3C acceptance note.

Acceptance

Require exact-commit PTP Core CI GCC/Clang/MSVC before merge into experimental M3 base. Firmware hardware phase/egress and IED evidence still missing; no public release claim. Commit 02e30509d92743c88d3616417d22156ab5130c94.

Exact-head CI remediation discovered during review

  • MSVC C4244 in pre-existing VLAN test was a narrowing uint32_t assignment to optional VLAN ID/PCP; replaced with explicit uint16_t/uint8_t constants (no wire change).
  • The PTP MSVC workflow configured five M3 CTest targets without building their executables; all five are now explicit build targets, preserving the full test suite.
  • ESP32-P4 realtime-boundary CI hardcoded an obsolete two-argument start_sample_clock call while M3 uses PTP epoch arguments. It now locates the current call but retains its no-logging-after-timer assertion. Removed an actual post-arm ESP_LOGI from the firmware START path, preventing console work after the ISR starts firing.

Newest exact head: c776e7b0f324e0bb9dae4e578495448ff00fdbdb. CI results must be read at this head; earlier superseded workflow failures must not be claimed as current validation. No physical PTP–SV phase or IED lock claim.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 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-17T08:32:29.134070Z 02e3050 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.

@masarray
masarray merged commit 2b68388 into feature/esp32p4-smv-ptp-epoch-binding-m3c-20261015 Oct 17, 2026
16 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