Skip to content

Add bounded two-cycle Sampled Values snapshot proof - #106

Merged
masarray merged 4 commits into
mainfrom
agent/sv-two-cycle-snapshot
Jul 27, 2026
Merged

Add bounded two-cycle Sampled Values snapshot proof#106
masarray merged 4 commits into
mainfrom
agent/sv-two-cycle-snapshot

Conversation

@masarray

@masarray masarray commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Purpose

Add a passive, non-realtime IEC 61850-9-2 snapshot workflow so an engineer can prove that one selected Sampled Values stream is visible, parsed, structurally stable, and sample-counter observable without running a continuous oscilloscope.

Workflow

  1. Open the per-IED SMV viewer.
  2. Select the configured/discovered stream.
  3. Select the Windows/Npcap process-bus or mirror-port adapter.
  4. Explicitly select 50 Hz or 60 Hz.
  5. Click Capture 2 cycles.
  6. Review static raw waveform lanes and bounded evidence.

Snapshot evidence

  • passive EtherType 0x88BA reception
  • APPID, destination MAC, and svID filtering when identities are available
  • engine-owned IEC 61850-9-2 frame/ASDU parsing
  • explicit two-cycle timebase
  • stable seqOfData structure
  • smpCnt continuity, wrap, gap, missing-sample, duplicate, and out-of-order evidence
  • static signed-INT32 raw lanes

Semantic boundary

Without trusted ordered SCL mapping, lanes remain raw structural words. ARSAS does not invent phase names, current/voltage meaning, engineering units, or IEC quality semantics. This is reception/parsing evidence, not calibrated measurement or formal conformance certification.

Dependency

The required reusable SV core was merged through masarray/ARIEC61850#45. ARSAS builds against the validated engine content represented by commit fcc05de1f4b11560195e2589aa032e1d4c4b95f7, now integrated into ARIEC61850/main by squash commit 0f8453182957900bc6d91287fb8177c8d9762188.

Validation

Build ARSAS run 679 completed successfully:

  • source, website, and license validation
  • GOOSE/SMV/SAS UX invariants
  • pinned engine API verification
  • .NET 8 restore and Release build
  • portable Windows publication and artifact upload

No unresolved review thread remains.

Post-merge field acceptance

The following remain acceptance tests before broader interoperability or measurement claims:

  • contributor-owned nofASDU=1 and multi-ASDU replay
  • 50 Hz and 60 Hz protection-rate captures
  • deliberate gap/duplicate/out-of-order regression capture
  • no-SCL raw fallback review
  • matching-SCL ordered mapping review
  • authorized isolated live MU or replay test

The feature remains passive and transmits no process-bus frame.

@masarray
masarray marked this pull request as ready for review July 27, 2026 07:31
@masarray
masarray merged commit de147c0 into main Jul 27, 2026
1 check passed

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

ℹ️ 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 +82 to +84
public bool HasCounterAnomaly => GapTransitions > 0 || DuplicateTransitions > 0 || OutOfOrderTransitions > 0;
public bool IsComplete => CapturedSamples >= TargetSamples;
public bool IsCleanProof => IsComplete && !HasCounterAnomaly;

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 Treat sample-counter restarts as anomalies

When the tracker classifies a counter transition as Restart, RestartTransitions is incremented but HasCounterAnomaly remains false. A snapshot containing only a publisher restart therefore satisfies IsCleanProof and is presented as PASS with “continuous smpCnt,” despite the counter discontinuity; include restarts in the anomaly decision and its displayed evidence.

Useful? React with 👍 / 👎.

Comment thread SmvViewerWindow.xaml.cs
Comment on lines +290 to +293
CaptureButton.IsEnabled = !capturing && AdapterOptions.Count > 0;
CancelButton.IsEnabled = capturing;
AdapterCombo.IsEnabled = !capturing;
FrequencyCombo.IsEnabled = !capturing;

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 Lock the selected stream while capture is active

During an active capture, the adapter and frequency controls are disabled but the stream grid remains editable. If the operator selects stream B while the request for stream A is running, the setter resets the presentation, but completion subsequently applies A's snapshot while SelectedStreamDetail describes B, misassociating the proof with the currently selected stream; disable stream selection for the capture duration or cancel the request when it changes.

Useful? React with 👍 / 👎.

Comment on lines +187 to +190
git clone --quiet --depth 1 --branch $env:ARIEC61850_REF https://github.com/masarray/ARIEC61850.git ARIEC61850
$actual = (git -C .\ARIEC61850 rev-parse HEAD).Trim()
if ($actual -ne $env:ARIEC61850_COMMIT) {
throw "ARIEC61850 pin mismatch. Expected $env:ARIEC61850_COMMIT, got $actual."

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 Fetch the pinned engine commit independently of the branch

This checkout depends on the temporary agent/sv-core-unification branch still existing and still pointing at the expected commit, so deleting or advancing that branch makes every build fail before the commit validation can provide a reproducible checkout. As git clone -h documents, --branch “checkout[s] instead of the remote's HEAD”; fetch or check out the pinned hash directly, or reference the stable integration commit on main, rather than coupling the pin to a mutable feature branch.

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