Repository navigation
M3.A–D FAT repair: simulated Global GM on boot/fallback and lossless warm SV STOP/START - #295
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. |
…TART with bounded MAC requalification
… isolated GM bootstrap
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f4e9ee893
ℹ️ 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".
| ar::iec61850::time_sync::SvWarmResumePolicy::retain( | ||
| warm_first, observation.last_sv_epoch_generation, | ||
| valid_live_phase, | ||
| same_sv_ptp_clock_lease( | ||
| armed_lease, g_sample_clock_context.armed_ptp_clock), | ||
| no_new_publisher_fault, smp_synch_source_local_qualified()); |
There was a problem hiding this comment.
Revoke warm retention when fresh MAC evidence fails its bounds
During a warm SOURCE restart, a coherent descriptor pair can return Evidence::measured while its TX offset is outside SvLocalSyncEvidenceGate's allowed range. observe() then resets the MAC qualification, but the publisher only revokes for results other than measured, and this retention path checks software phase and publisher faults without checking that MAC rejection. Consequently, warm_resume_authorized keeps advertising synchronization until the eight-epoch window expires despite newly measured invalid MAC evidence. Distinguish evidence that is still pending from evidence that has failed, and revoke warm retention immediately for the latter.
Useful? React with 👍 / 👎.
| g_warm_resume_first_epoch.store( | ||
| warm_resume | ||
| ? g_sample_clock_context.epoch_generation.load( | ||
| std::memory_order_acquire) : 0U, | ||
| std::memory_order_release); |
There was a problem hiding this comment.
Preserve the reacquisition deadline across repeated warm starts
If an already-qualified SOURCE repeatedly STOPs and STARTs before obtaining a new coherent MAC pair, every START resets both evidence trackers and replaces the warm-resume deadline with the current epoch. The retained qualification makes the next START eligible for warm resume again, so cycles shorter than the two-epoch descriptor cadence can advertise synchronization indefinitely without fresh MAC evidence, bypassing the stated eight-epoch reacquisition bound. Preserve the original outstanding deadline across these restarts, or require successful MAC requalification before granting another warm window.
Useful? React with 👍 / 👎.
|
Integrated into main through PR #299 — historical stacked review closed. Verified on 24 Oct 2026: this PR's exact HEAD This PR targeted an intermediate stacked branch, not |
Physical defect reproduced by user on M3.D (3a33575)
Root causes found in live firmware
bench_global_gm=false; after honest phase/MAC acquisition,smp_synch_lab.cppadvertises LOCAL (1) instead of simulated Global (2). M3.C fallback explicitly clears the bench seed.Corrective software
CONFIG_AR_PTP_BOOT_SIMULATED_GLOBAL_GM=yin paired injector preview: on boot with no GPS/USB, seed the SOURCE test-set PTP/TAI hardware clock from a plausible RTC or explicitly synthetic UTC anchor+monotonic; PTP Announce uses the existing simulated GNSS bench GM profile. This is NOT a physical GNSS time source and MUST NOT be used in an energized/live process bus.Release/FAT gates
Exactly matched Windows Setup+firmware HEAD and all relevant CI must pass. Then only physical ESP32-P4+SIPROTEC capture can show PTP GM accepted, SMV accepted, smpSynch=2 stable across 100 cycles, no PTP restart/generation change and measured channel values. DO NOT merge into M3.D, checkpoint or main, and DO NOT declare hardware FAT success solely from GitHub CI. Source stack: #288 -> #290 -> #291 -> #292 -> #293; this Draft #295 layers on top.