Skip to content

P0-B: atomic running 4I+4V live setpoints with firmware commit/readback - #253

Open
masarray wants to merge 25 commits into
fix/p0-sv-reject-unverified-start-20261019from
fix/p0-sv-atomic-live-apply-20261019
Open

masarray wants to merge 25 commits into
fix/p0-sv-reject-unverified-start-20261019from
fix/p0-sv-atomic-live-apply-20261019

Conversation

@masarray

@masarray masarray commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Root cause

RUNNING edits in Main.qml still used legacy per-channel SET / FREQ / SHAPE, which can publish mixed intermediate 4I+4V SV frames. Additionally an urgent SV STOP cleared a queued independent PTP STOP.

Design

Reuse the same SvScenarioTransaction and triple-bank state from parent PR #252; differentiate stopped START versus RUNNING live update, checksum the complete GUI 8-channel/FREQ/quality/enabled/CT shape snapshot, and atomically publish once. Firmware rejects non-transactional per-channel commands while RUNNING. Live transaction ACK + applied-state readback must agree with nonce/hash/boot/generation, without sending START or resetting smpCnt or phase. QML revisions preserve edits arriving during the in-flight transaction; pendingApply only clears on verified ACK. STOP suppresses retries and retains independent PTP STOP safety.

Tests: portable live transaction atomicity + replay rejection, Studio deterministic live ACK/no-START, emergency STOP with PTP STOP preserved; exact SHA CI must be green before hardware acceptance. No ISR/PTP/smpSynch modifications. No merge to main; physical waveform/phase/fps/PTP still pending.

Additional fail-closed reconnect gate

A board observed as RUNNING after USB reconnect is not proof of a newly operator-approved START. Main.qml now disarms live auto-apply on verification/reconnect and WorkflowBar arms it only from an in-flight operator START after token-bound ACK. Late or unsolicited RUNNING telemetry leaves the draft dirty without sending CFG. Source-policy regression guards this boundary. Independent PTP STOP still survives SV queue cancellation.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 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-19T09:01:41.766499Z 0e71eea 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 chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0e71eea9ae

ℹ️ 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".

Comment on lines +669 to +670
bool DeviceController::applyLiveScenario(const QVariantMap& scenario) {
return submitScenario(scenario, false);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Negotiate live CFG support separately

When Studio connects to a previous same-version build, that build remains compatible because build mismatch is advisory and it already advertises SV-CONFIG-TXN-V1, but it rejects CFG BEGIN while running. This new method therefore submits an unsupported live batch; processLine() does not recognize CFG BEGIN rejected as terminal, so eight seconds later failScenarioStart() sends STOP, unexpectedly terminating an otherwise valid injection on its first edit. Conversely, the new firmware retains LIVE-SETPOINTS while rejecting the legacy running SET path used by older Studio builds. Add a distinct capability or bump the protocol/version, then gate both behaviors on it.

AGENTS.md reference: AGENTS.md:L235-L236

Useful? React with 👍 / 👎.

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