Skip to content

P0: preserve canonical SV TX fault evidence and make revocation burst-bounded - #327

Merged
masarray merged 13 commits into
mainfrom
fix/p0-canonical-sv-tx-fault-evidence-20261025
Oct 24, 2026
Merged

masarray merged 13 commits into
mainfrom
fix/p0-canonical-sv-tx-fault-evidence-20261025

Conversation

@masarray

Copy link
Copy Markdown
Owner

Physical P0 — frequent spontaneous SV STOP on ESP32-P4 preview (COM15)

Device evidence (24 Oct 22:44 UTC)

Operator screenshot shows SV stopped · board runtime fault. Attached field diagnostics show:

  • exact Studio/firmware preview build 83439a4 matched; session heartbeat active, lease 6000ms with max observed gap 774ms
  • saved SVLIFE ... stop_cause=RUNTIME_FAULT stop_seq=3 stop_uptime_ms=1308494 stop_hb_age_ms=0
  • SVSYNC EVENT ... state=REVOKED reason=CANONICAL_SV_TX_FAILURE uptime_ms=1308394, ~100ms before forced stop
  • PTP driver=STARTED link=UP and cumulative TXfail=30 in later log; later SV after manual restart reported 4000 fps, no misses
  • original driver error status at stop not contained in attached last-12K telemetry snippets; transient MAC/DMA/PHY cause remains unproven.

Fix (no unsafe optimistic transmission/restart)

  • Add 32-bit lock-free, single-writer SV TX failure-burst evidence; capture first and last esp_err_t, link state when failed, contiguous-failure count, recovery episodes and sticky stop record across subsequent manual START; print SVTXFAULT on every device SHOW. Existing 400-consecutive-failure (~100ms at 4000fps) fail-closed protection remains unchanged.
  • On the first failure of a contiguous burst, revoke measured smpSynch authority and invalidate phase once. Subsequent failed frames continue counting toward STOP without 400 repeated revocations in the 4kHz transmit hot path. Any successful canonical frame resets the contiguous count; no transmission retries, suppression, auto restart or fake synchronization.
  • Add native C++ regression in tests/ptp_profile: 400 consecutive failures, first/last driver errors, link state, sticky evidence after restart and recovery burst semantics.

Gates

  • ESP-IDF 5.5.4 firmware CI + C++ GCC/Clang/MSVC strict tests
  • PR Windows native preview builds paired exact-HEAD firmware, no overwrite of stable M3.H.1 release.
  • Physical retest must run the newly paired PR preview and capture diagnostics on failure: SVTXFAULT last_stop_first_error, last_stop_last_error, last_stop_link_up + PTP TXfail, NIC wire capture, Ethernet link evidence. Do not close P0 hardware acceptance from CI alone.

Issue #324 remains open until physical stability and independent SV reception verified.

@chatgpt-codex-connector

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 🔄 Running since 2026-10-24T23:05:04.048668Z 440b578 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 09095e2 into main Oct 24, 2026
26 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