Skip to content

P0: ship Studio Preview with matching PTP–SV phase-evidence firmware, not obsolete v0.1.1 - #234

Open
masarray wants to merge 15 commits into
mainfrom
feature/studio-matched-ptp-sv-auto-20261017
Open

masarray wants to merge 15 commits into
mainfrom
feature/studio-matched-ptp-sv-auto-20261017

Conversation

@masarray

Copy link
Copy Markdown
Owner

User failure reproduced on ESP32-P4 COM15

The 2026-10-17 native Preview bundled firmware e4bbf6f (Exact bundled build match), while the tested M3C.5 phase-servo/egress source exists only on stacked branch. Clicking Studio Reinstall current therefore reflashed the old free-running firmware. User's 120s capture showed 4000 canonical fps, smpSynch=AUTO wire value 0 everywhere, PTP 120 Sync/FUP/Announce but no SV epoch lock. This is a bundle/source integration failure, not a Wireshark problem.

Concrete integrated fix

  • Port 40 protocol/embedded/test files + 14 contract docs from M3C.5 commit bc7f5c204331852b571b5c2d8e01fb90be6c0a3e directly onto current public Studio main tree, checking every ported path was unchanged on main relative to ancestor 9e70a4937874e3e1752b725264fe5a2008aa8fb0. Do not regress ~219 newer GUI commits or merge obsolete Studio QML.
  • Add optional phase_sync_preview boolean to reusable ESP-IDF firmware build: only native Studio Preview explicitly selects CONFIG_AR_SMV_PTP_PHASE_SERVO_EXPERIMENTAL=y, sparse canonical MAC descriptor TX timestamps on, broadcast mirror off, SOURCE role on; compile-time and manifest checks enforce profile.
  • Native Preview packaging fails if exact-head manifest does not assert phase servo + MAC evidence + mirror off; prevents silently installing the old firmware. Stable release workflow stays unchanged pending actual board/IED measurement.
  • GUI: remove old Lab simulation controls heading and show Changes sent on Start when Studio has unsent 4I+4V draft, explaining user screenshot Ic=90° while stopped device log still showed Ic=120° from prior injection.

No fake locked claim

AUTO=1 requires measured software phase plus actual canonical MAC egress evidence. SOURCE UNLOCKED in receiver discipline status is NOT an actual local-SV phase lock claim; separate PTP/SV synchronization required. CI cannot certify SIPROTEC 5 alarm-free reception. Installer is a phase-qualified evaluation Preview, not a production release.

Acceptance

  • PTP core GCC/Clang/MSVC, Embedded, guarded SOURCE + RECEIVER firmware, Qt studio and Windows lifecycle CI PASS.
  • Exact-commit Windows Native Preview builds firmware with declared flags and bundles that same image. Inspect manifest build SHA and real ESP32-P4 after flashing. Verify AUTO=1 only after actual timestamp/phase qualification; otherwise keep 0. Check no counter gaps and relay Accepted SmpSynch matching local source.

@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 ⚠️ Failed 2026-10-17T13:18:19.554481Z 81999d9 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

… state (#235)

* fix(studio): prevent stale PTP role readbacks toggling RUNNING off; coalesce serial log UI signals

* fix(studio): own bounded telemetry-log notification timer

* fix(studio): restore in-session explicit PTP ON after verified firmware reflash

* fix(studio): PTP OFF explicitly clears in-session restore intent

* fix(sv): distinguish sample phase from nonzero canonical MAC publish delay in AUTO gate

* test(sv): prove 110–180us publish latency may qualify while sample phase remains ≤4us

* fix(studio): bound in-session post-flash PTP rearm attempt to 36 seconds

* test(studio): protect PTP runtime authority, session-only restart intent and coalesced logs

* docs(ptp-sv): align AUTO gate with IEC sample time vs MU publish delay, and Studio PTP state ownership
* fix(studio): serialize edited phasors directly to live SET and stack voltage/current matrices

* style(studio): promote SMV Injector identity to normal desktop header size

* style(studio): center ribbon icon and label in both axes

* style(studio): consistent hover contrast, alignment and stable checkbox indicator

* style(studio): consistent hover contrast, alignment and stable checkbox indicator

* style(studio): consistent hover contrast, alignment and stable checkbox indicator

* feat(studio): one-shot default PTP SOURCE startup with explicit OFF cancellation

* test(studio): lock PTP defaults, vertical 4I4V layout and live table setpoint contract

* fix(studio): every START sends exact displayed 4I+4V setpoints, never stale board phases

* test(studio): prevent reintroduction of bare START losing displayed phase angles

* test(studio): accept readable wrapped START snapshot expression

* test(studio): keep Edit-to-Start guarantee independent of formatting

* test(studio): enforce vertical voltage/current viewport geometry at 100–175 percent DPI
…and legible controls (#243)

* fix(studio): synchronously commit focused and debounced phasor cells before START snapshot

* fix(studio): flush displayed phase before START and expand stacked 4I/4V matrices

* fix(studio): reject START if an active table editor has invalid or unsent phase

* fix(studio): readable brand, centered ribbon/buttons and stable checkbox hover geometry

* fix(studio): readable brand, centered ribbon/buttons and stable checkbox hover geometry

* fix(studio): readable brand, centered ribbon/buttons and stable checkbox hover geometry

* fix(studio): readable brand, centered ribbon/buttons and stable checkbox hover geometry

* fix(ribbon): center icon+caption vertically with symmetric stretch spacers

* test(studio): protect phase start snapshot, vertical matrix, branding and consistent hover

* test(studio): validate flexible vertical matrix instead of obsolete fixed height

* test(studio): regress actual IA −30°/IB −150°/IC +90° wire SET encoding

* test(studio): require validated table snapshot before START admission

* test(studio): enforce one-click validated START without obsolete inline expression

* fix(qml): remove read-only Row implicit size assignments; preserve centered content

* fix(qml): do not assign generated Text implicitHeight in checkbox content

* fix(studio): keep stacked editors elastic and within 960x620 Windows viewport

* test(studio): require compressible editor min-height at 960x620

Copy link
Copy Markdown
Owner Author

SV–PTP preservation gate (2026-10-18): Latest operator-supplied 120s PCAP on ASIX: 480,294 canonical 0x88BA SV frames, APPID 0x4000, confRev 1, 1 ASDU with 4I+4V; no diagnostic mirror; 0 smpCnt jumps/duplicates, 120 modulo-4000 wraps; every SV emitted smpSynch=AUTO → 1 (local). 120 PTP Announce, 120 Sync, 120 matching Follow_Up; host-relative smpCnt=0 to PTP second phase median ~+48.9µs, P95 ~67.2µs, host NIC timestamp not hardware sample-phase accuracy. This is the minimum known-good wire/counter/status baseline; avoid regressions. Do not claim physical µs lock merely from software timestamp or flag. Child PR #243 fixes last-keystroke 90ms QML editor debounce via synchronous pre-START flush and adds IA −30/IB −150/IC +90 millidegree serial regression; adaptive stacked Voltage/Current, brand sizing, hover/checkbox geometry. QT, Windows DPI/geometry/lifecycle, and exact Preview CI passed at child exact-head da0cd171...; child merged to this branch 8999bac.... Complete full parent-branch CI before merging main. No changes to firmware/PTP/SMV wire protocol in child.

…ceptance (#244)

* fix(studio): improve readable ribbon, consistent hover controls and vertically filled injection layout

* fix(studio): improve readable ribbon, consistent hover controls and vertically filled injection layout

* fix(studio): improve readable ribbon, consistent hover controls and vertically filled injection layout

* fix(studio): improve readable ribbon, consistent hover controls and vertically filled injection layout

* fix(studio): improve readable ribbon, consistent hover controls and vertically filled injection layout

* fix(studio): avoid conflicting anchors in ribbon Controls content layout

* test(studio): lock snapshot START, full 4I+4V signed phases and readable UI components

* fix(studio): dark caption on white hover for Advanced icon/text tool buttons

* test(studio): keep readable Advanced tool hovers and single-size checkbox visual

* test(studio): pin verified SV/PTP phase-evidence profile across future GUI builds

* fix(studio): Advanced dropdown hover uses white surface and dark readable option text

* test(studio): prevent white-on-white Advanced dropdown hover regressions

* docs: freeze 120s SV/PTP local-lock wire checkpoint and table-to-SV fidelity acceptance

* fix(studio): pair white Advanced button hover with dark icon artwork too

* test(studio): preserve dark icon/caption on light Advanced hover

* fix(studio): distribute vertical matrix height among four editable channels instead of blank spacer

* test(studio): prevent blank-bottom Voltage/Current editor layout regression
…TP regression (#245)

* fix(studio): strengthen phase table SSOT and operator workspace legibility

* fix(studio): strengthen phase table SSOT and operator workspace legibility

* fix(studio): strengthen phase table SSOT and operator workspace legibility

* fix(studio): strengthen phase table SSOT and operator workspace legibility

* fix(studio): strengthen phase table SSOT and operator workspace legibility

* fix(qml): center button row in valid Item content root

* fix(qml): keep checkbox label visible with single custom indicator

* test(studio): enforce valid centered controls and one checkbox indicator

* feat(studio): default verified-session PTP SOURCE ON without extra dialogs

* test(studio): guard default PTP and phase SET millidegrees end-to-end

* fix(studio): reuse existing one-shot PTP ON, never create duplicate timer

* test(studio): validate compact stacked matrices and single pre-existing PTP default

* docs(studio): pin observed PTP/SV continuity and GUI setpoint nonregression gate

* test(studio): update legacy tiny logo expectation to legible branded ribbon

* fix(studio): keep stacked signal matrices within minimum 960x620 Windows viewport

* test(studio): preserve responsive bounded stacked height at 960x620 and desktop viewports
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