Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 72d5163546
ℹ️ 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".
| if (result != ar::iec61850::time_sync::SvTxEvidenceResult::measured) | ||
| smp_synch_set_source_local_qualified(false); | ||
| smp_synch_set_receiver_timeline_qualified(false); |
There was a problem hiding this comment.
Keep receiver qualification after measured timestamps
When external-GM RECEIVER mode has qualified, every scheduled descriptor timestamp enters this block, but this call clears the receiver timeline unconditionally—even when result is measured. The 1 Hz observer does not restore it until roughly 250 ms later, so about 1,000 subsequent 4 kHz frames advertise smpSynch=0 every two seconds despite valid evidence. Move this revocation under the non-measured-result condition alongside the source revocation.
Useful? React with 👍 / 👎.
P0 continuation stacked on #254 (itself stacked on #252); no merge to main before physical relay acceptance.
Proven source-level failure:
g_sv_timeline_phase_qualifiedwas initialized false but never promoted anywhere. RECEIVER with real external GM discipline therefore could never emit qualified AUTO SV. Sparse descriptor evidence also calledar_ptp_lab_source_generation(), which intentionally returns zero for RECEIVER, making every receiver MAC observation invalid.Code:
smp_synch_policy_tests, proving receiver GM-only=0, true phase+MAC gate and traceable GM=2, loss/relock=0, source-only=1 and manual override invalidation. Additional portable MAC/GM generation/fault and receiver preflight tests. Correct stale Kconfig descriptor cadence comment 16→2.Important blockers: This repairs deterministic code path only. ESP-IDF 5.5.4 MAC TX descriptor polling is experimental and remains a real-time risk; must instrument 4kfps, phase, 120/3600s SV+PTP PCAP, independent time source, 10x cold/warm, real external GM and target relay (IED). No certification, no auto-flash, no source/receiver binary equivalence, no main merge.