Skip to content

P0: ARStack Studio 4I+4V Quick Start reference profile - #79

Merged
masarray merged 272 commits into
mainfrom
feature/p0-smv-studio-4i4v-quickstart
Sep 15, 2026
Merged

masarray merged 272 commits into
mainfrom
feature/p0-smv-studio-4i4v-quickstart

Conversation

@masarray

@masarray masarray commented Sep 10, 2026 •

Copy link
Copy Markdown
Owner

Target

Start P0 productization of ARStack Studio for the first public release, intentionally bounded to 4I + 4V / 4000 fps / 9-2LE-style reference workflow.

What this PR adds

  • Bundled ARStack-owned 4I+4V reference SCL with one deterministic SV stream.
  • Native SclProfileModel::loadReferenceTemplate() path; the template is parsed and compiled through the same ARIEC61850 SCL/profile engine as customer SCD/CID/IID files.
  • Reference-profile provenance establishes smpCnt modulus 4000, so the bundled profile resolves as Class A without weakening the Class-B confirmation rule for arbitrary external SCL.
  • Home ribbon 4I+4V Quick Start action for first-run use.
  • Engineering ribbon access to the same reference template.
  • referenceTemplateActive UI/model state.
  • Native --check-reference-template regression gate verifying exactly one stream, Class A, deviceSupport=ready, ARSTACK_SV01, 4000 fps, smpCnt modulus 4000, 64-byte payload and 16 FCDA leaves.
  • GitHub Actions runs this reference-template regression before QML smoke launch.
  • ESP32-P4 deployment classifier now safely accepts both Amp/Vol and 9-2LE-style AmpSv/VolSv semantic names, while retaining the fixed TCTR/TVTR order, INT32+Quality, 16-leaf and 64-byte fail-closed boundary.
  • P0 release contract added at docs/SMV_STUDIO_P0_RELEASE.md to prevent scope creep beyond 4I+4V for the first release.

Why the classifier change is needed

The supplied 4I+4V 9-2LE reference uses TCTR*.AmpSv and TVTR*.VolSv. The previous classifier only recognized Amp/Vol, so a semantically correct 4I+4V 64-byte profile compiled as Class A but was blocked as unsupported-layout. The new alias recognition does not accept arbitrary same-sized datasets; LN class/instance, channel order, basic type, Quality pairing and payload shape remain mandatory.

Safety / truth boundary

This does not broaden embedded layout support. The release target remains the physically proven 4I+4V runtime. External SCL continues to use the normal Class A/B/C and device-support gates. smpSynch claims are unchanged.

Next P0 increments

  1. visual/UX release polish and first-run device/profile state;
  2. firmware identity/version capability contract;
  3. ESP32-P4-ETH Firmware Manager / flash-recovery workflow;
  4. Windows redistributable packaging and public beta release pipeline;
  5. physical acceptance pass before merge/release.

@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: 0e418ba3ef

ℹ️ 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 thread apps/arstack_studio/src/SclProfileModel.cpp

Copy link
Copy Markdown
Owner Author

Merge-preparation checkpoint — 2026-09-15

Progress is now preserved and PR #79 has been repaired for eventual merge without changing the board-tested runtime.

Preserved exact states

  • Board-tested production/blocker head: acd81524d59bd670f1ea2805ac755f5c1f34d6d5
  • Safety snapshot: archive/p0-premerge-product-20260915
  • Board-acceptance QA tooling head: 2d85af9269c60cdbdd9469dd13fd4c40a5fea6c5
  • QA safety snapshot: archive/p0-board-acceptance-tooling-20260915

PR head preparation

  • feature/p0-smv-studio-4i4v-quickstart was fast-forwarded to the tested blocker head; no force update was used.
  • The only merge-prep commit after that is d9b5b6848415c7e6d1c52ec929e57c66b608058d, which replaces only AGENTS.md with the current main contract. No Studio, ESP32 runtime, supervisor, publisher, packaging, or acceptance logic changed in this commit.
  • GitHub now reports PR P0: ARStack Studio 4I+4V Quick Start reference profile #79 as mergeable.
  • Exact-head CI for d9b5b684... has been triggered. Final merge remains blocked until those checks complete successfully.

Physical evidence interpretation

The interrupted soak is retained as useful positive/negative evidence, not final RC2 acceptance: 10/10 Start/Stop and checkpoints through 2520 s were clean at 4000 fps / missed=0 / txFail=0; Windows Modern Standby then interrupted the USB/session and invalidated the uninterrupted >=3600 s gate. The board recovered healthy/stopped after resume.

Therefore:

  • no progress is discarded;
  • the exact tested runtime SHA is permanently referenced by an archive branch;
  • PR P0: ARStack Studio 4I+4V Quick Start reference profile #79 now contains the blocker fix and is conflict-resolved against current main;
  • final merge/tag/public release is still withheld until uninterrupted physical acceptance is recorded.

@masarray
masarray marked this pull request as draft September 15, 2026 01:42

Copy link
Copy Markdown
Owner Author

Final P0 merge-preparation checkpoint

Physical P0 acceptance has been closed pragmatically in issue #83.

Validated real-board evidence:

  • 10/10 Start/Stop PASS
  • 3600 s uninterrupted retained RUNNING soak
  • 4000 fps min/max exactly 4000
  • missed=0, TX fail=0, health reconnects=0, automaticStarts=0
  • independent SV capture spot-check: 39,524 primary frames / 9.8809993 s / 3999.899 fps
  • MAC/VLAN/PCP/APPID/svID/confRev/1-ASDU/64-byte payload all match frozen reference
  • smpSynch=0 throughout capture
  • 10 observed 3999->0 wraps with zero smpCnt discontinuities

Capture SHA-256:
08d3d2bcb723cd6f330c1167fb5269ece014152d2c896187c1fe6587b018b9c9

Board evidence SHA-256:
8094EDA62C2955C6EC6F252D842567BE7F8657B1EE326CE728F9EF3F34BA241F

Exact PR head d9b5b6848415c7e6d1c52ec929e57c66b608058d has all 12 associated workflows completed successfully, including Studio Qt, Release, RC2 policy, ESP32-P4 firmware, C++ CI, embedded, security/evidence, and interop gates.

The only delta after the board-tested blocker runtime acd81524d59bd670f1ea2805ac755f5c1f34d6d5 is the AGENTS.md documentation synchronization from main; production runtime is unchanged.

Disposition: READY FOR REVIEW / READY FOR MERGE. Legacy strict-lab evidence items deferred in #83 are not being represented as physically executed.

@masarray
masarray marked this pull request as ready for review September 15, 2026 05:05

@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: d9b5b68484

ℹ️ 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 +304 to +307
github-release:
name: Publish tagged release
if: startsWith(github.ref, 'refs/tags/')
needs: clean-windows-smoke

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 Gate tagged releases on physical acceptance

When v0.1.0 is tagged, this job proceeds from package smoke directly to action-gh-release; it neither checks the freeze manifest (currently FROZEN_PENDING_PHYSICAL_ACCEPTANCE) nor evaluates RC2 evidence tied to the tagged SHA. Consequently, an accidental or premature tag can publicly publish artifacts despite physicalAcceptanceRequiredBeforeMergeOrTag and the release-freeze contract; add an explicit exact-SHA physical-acceptance gate before this job.

AGENTS.md reference: AGENTS.md:L253-L263

Useful? React with 👍 / 👎.

Comment on lines +752 to +756
const QString recommended = device_->recommendedPort().trimmed();
if (recommended.isEmpty() || !device_->ports().contains(recommended)) {
blankBoardDetected_ = false;
blankBoardPort_.clear();
return;

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 Retain the manually selected recovery port

When the operator explicitly selects a blank board on a low-confidence port, or selects one board while multiple Espressif ports are attached, recommendedPort() is empty even though the attempted port remains visible. This branch therefore clears the recovery offer, and because firmware mutations are no longer exposed directly to QML, the operator cannot reach the guarded chip probe/install flow. Use the explicitly attempted port after the bounded identification failure (or the existing, currently unused recovery-port selector) rather than requiring an automatic recommendation.

Useful? React with 👍 / 👎.

Comment on lines +64 to +66
connect(presenceTimer_, &QTimer::timeout, this, [this] {
refreshPortsInternal(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.

P2 Badge Isolate port enumeration from lease heartbeats

While output is running, the 700 ms lease heartbeat and this 750 ms presence poll execute on the same worker event loop, but refreshPortsInternal() synchronously calls QSerialPortInfo::availablePorts(). If Windows device enumeration stalls because of a slow or failing USB driver, heartbeat callbacks cannot run and the firmware's 2.5-second lease expires, stopping otherwise healthy SMV output. Move enumeration off the heartbeat/serial owner or suspend it during RUNNING so unrelated discovery latency cannot violate the control lease.

AGENTS.md reference: AGENTS.md:L88-L94

Useful? React with 👍 / 👎.

Comment on lines +427 to +430
pendingRx_.append(serial_->readAll());
if (pendingRx_.size() > kMaxRxBytesWithoutLine && pendingRx_.indexOf('\n') < 0) {
handleSerialFailure(QStringLiteral("Serial receive line exceeded the bounded input size."));
return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject oversized terminated serial lines

If a corrupt or unexpected serial peer delivers a line larger than 16 KiB with its newline in the same readyRead batch, indexOf('\n') < 0 is false, so the declared bound is bypassed and the entire line is copied and converted to QString. Repeated terminated oversized lines can therefore impose unbounded allocation and processing despite the transport limit; compare the first newline offset with the maximum before extracting the line.

AGENTS.md reference: AGENTS.md:L55-L64

Useful? React with 👍 / 👎.

@masarray
masarray merged commit 9c7fc73 into main Sep 15, 2026
30 checks passed

Copy link
Copy Markdown
Owner Author

Public release published — v0.1.0

ARStack Studio / SMV Injector v0.1.0 is now publicly available as a stable GitHub Release.

Release: https://github.com/masarray/arstack61850/releases/tag/v0.1.0

Provenance:

  • tag target / accepted production merge: 9c7fc7300220db4643e5643081240b955cfe12df
  • accepted binary artifact build head: d9b5b6848415c7e6d1c52ec929e57c66b608058d
  • release artifact workflow: ARStack Studio Release run 34918302946 — SUCCESS
  • public publish workflow: 34933705055 — SUCCESS

Published assets:

  • ARStack-Studio-0.1.0-win-x64-setup.exe — SHA-256 877a35dbbe110cc8ab740d3fcdc44a63f348405dc509da3164d9aaa92e9e2622
  • ARStack-Studio-0.1.0-win-x64-portable.zip — SHA-256 1487e90254ddc5cab0f7b917580be951311c1697bec6dc19d2e2720683f00f83
  • arstack-esp32p4-smv-0.1.0.bin — SHA-256 fae413d7b6f65b7d10ca65dc277fbf586d487f21209a29875036791088afa9c7
  • firmware-manifest.json — SHA-256 32bfccac64378eeb55e49f9a2adce1ae53c109c755ee1472a614d6c1196102f2
  • consolidated RELEASE-SHA256SUMS.txt

Release is draft=false and prerelease=false. IED Simulator PRs remain untouched.

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