Skip to content

Commit ad2ebd0

Browse files
authored
Integrate validated M3.H SV/PTP source and release ancestry into main (#299)
Integrates a922e9b source and a4b6e53 release tag lineage via conflict-free guarded two-parent merge. Candidate c90a979 passed 14/14 PR workflows. Preserves all existing main updates and immutable M3.H published binary hashes.
2 parents 19c5f08 + c90a979 commit ad2ebd0

142 files changed

Lines changed: 22024 additions & 808 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/arstack-studio-native-preview.yml‎

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
types: [opened, synchronize, reopened, ready_for_review]
66
paths:
77
- 'apps/arstack_studio/**'
8+
# Firmware-only timing fixes MUST create a matched ESP32 image and
9+
# Windows Inno installer; do not leave users on stale embedded firmware.
10+
- 'embedded/esp32p4_smv_injector/**'
11+
- 'include/ariec61850/time_sync/**'
812
- '.github/workflows/arstack-studio-native-preview.yml'
913

1014
permissions:
@@ -19,10 +23,14 @@ jobs:
1923
# rather than taking an older public firmware that lacks PROFILE-BINARY-V1.
2024
firmware:
2125
uses: ./.github/workflows/esp32p4-smv-injector.yml
26+
with:
27+
# Only the GUI Preview installer opts into measured local phase sync.
28+
# Stable release workflow keeps ordinary firmware until board validation.
29+
phase_sync_preview: true
2230

2331
windows-preview:
2432
needs: firmware
25-
if: ${{ !github.event.pull_request.draft && github.event.pull_request.head.repo.full_name == github.repository }}
33+
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
2634
runs-on: windows-2022
2735
timeout-minutes: 40
2836
env:
@@ -50,10 +58,17 @@ jobs:
5058
run: |
5159
cmake -S apps/arstack_studio -B build-studio-preview -G "Visual Studio 17 2022" -A x64 -DARIEC61850_WARNINGS_AS_ERRORS=ON -DARSTACK_STUDIO_ENGINEERING_PREVIEW=ON
5260
if ($LASTEXITCODE -ne 0) { throw 'Preview configuration failed' }
53-
cmake --build build-studio-preview --config Release --target arstack_studio arstack_session_harness --parallel 2
61+
cmake --build build-studio-preview --config Release --target arstack_studio arstack_session_harness arstack_clipboard_harness arstack_capture_harness --parallel 2
5462
if ($LASTEXITCODE -ne 0) { throw 'Native Studio preview build failed' }
5563
& "$PWD\build-studio-preview\Release\arstack_session_harness.exe"
5664
if ($LASTEXITCODE -ne 0) { throw 'Native session regression failed' }
65+
& "$PWD\build-studio-preview\Release\arstack_clipboard_harness.exe"
66+
if ($LASTEXITCODE -ne 0) { throw 'Production native clipboard readback regression failed' }
67+
# The exact production PCAP decoder must pass the real historical
68+
# 24-byte/zero-packet and STOPPED+stale-FPS regression, not just
69+
# the session and clipboard tests on Draft PRs.
70+
& "$PWD\build-studio-preview\Release\arstack_capture_harness.exe"
71+
if ($LASTEXITCODE -ne 0) { throw 'Native SV capture 24-byte PCAP / liveness regression failed' }
5772
# Differentiate product code regressions from missing deployed DLLs.
5873
$nativeGui = Join-Path $PWD 'build-studio-preview\Release\arstack_studio.exe'
5974
$probe = Start-Process -FilePath $nativeGui -ArgumentList '--check-reference-template' -Wait -PassThru
@@ -95,6 +110,16 @@ jobs:
95110
throw 'Matching firmware job did not provide its manifest'
96111
}
97112
$manifest = Get-Content -Raw -LiteralPath $manifestPath | ConvertFrom-Json
113+
if ($manifest.phaseSyncPreview -ne $true -or
114+
$manifest.bootSimulatedGlobalGmEnabled -ne $true -or
115+
$manifest.bootSourceAutostartEnabled -ne $true -or
116+
$manifest.defaultPtpPolicy -ne 'INTERNAL_GM_ONLY' -or
117+
$manifest.globalGmTraceabilityPhysicallyProven -ne $false -or
118+
$manifest.phaseServoEnabled -ne $true -or
119+
$manifest.canonicalMacTxEvidenceEnabled -ne $true -or
120+
$manifest.broadcastMirrorEnabled -ne $false) {
121+
throw 'FAT preview requires simulated Global GM BOOT + PTP-source autostart + measured SV phase/MAC evidence, never LOCAL-only firmware'
122+
}
98123
$expectedCapabilities = @('SMV-4I4V', 'PROFILE', 'PROFILE-BINARY-V1', 'LIVE-SETPOINTS', 'SESSION-LEASE', 'PTP-P2', 'SMPSYNCH-AUTO')
99124
foreach ($capability in $expectedCapabilities) {
100125
if ($manifest.capabilities -notcontains $capability) { throw "PR firmware lacks capability: $capability" }
@@ -216,7 +241,7 @@ jobs:
216241
$env:ARSTACK_STUDIO_FIRMWARE_DIR = Join-Path $stage 'firmware'
217242
$env:ARSTACK_STUDIO_ESPFLASH = Join-Path $stage 'tools\espflash.exe'
218243
$env:ESPFLASH_SKIP_UPDATE_CHECK = 'true'
219-
foreach ($check in @('--check-reference-template', '--check-firmware-contract', '--check-p0-policy', '--check-app-lifecycle')) {
244+
foreach ($check in @('--check-reference-template', '--check-firmware-contract', '--check-p0-policy', '--check-clipboard', '--check-app-lifecycle')) {
220245
$probe = Start-Process -FilePath $exe -ArgumentList $check -Wait -PassThru
221246
Write-Host "PACKAGED_PREVIEW_CHECK=$check EXIT=$($probe.ExitCode)"
222247
if ($probe.ExitCode -ne 0) {
@@ -264,7 +289,7 @@ jobs:
264289
$env:ARSTACK_STUDIO_FIRMWARE_DIR = Join-Path $installDir 'firmware'
265290
$env:ARSTACK_STUDIO_ESPFLASH = Join-Path $installDir 'tools\espflash.exe'
266291
$env:ESPFLASH_SKIP_UPDATE_CHECK = 'true'
267-
foreach ($check in @('--check-firmware-contract', '--check-p0-policy', '--check-app-lifecycle')) {
292+
foreach ($check in @('--check-firmware-contract', '--check-p0-policy', '--check-clipboard', '--check-app-lifecycle')) {
268293
$probe = Start-Process -FilePath $exe -ArgumentList $check -Wait -PassThru
269294
if ($probe.ExitCode -ne 0) { throw "Installed preview failed $check code $($probe.ExitCode)" }
270295
}

‎.github/workflows/arstack-studio-qt.yml‎

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
shell: powershell
8282
run: |
8383
cmake --build build-arstack-studio --config Release `
84-
--target arstack_session_harness arstack_windows_ownership_harness --parallel
84+
--target arstack_session_harness arstack_clipboard_harness arstack_windows_ownership_harness --parallel
8585
8686
- name: S8A deterministic session harness on Windows
8787
timeout-minutes: 1
@@ -98,6 +98,16 @@ jobs:
9898
throw "S8A Windows deterministic harness failed with exit code $exitCode."
9999
}
100100
101+
- name: Native Windows clipboard roundtrip regression
102+
timeout-minutes: 1
103+
shell: powershell
104+
run: |
105+
$exe = Join-Path $PWD 'build-arstack-studio\Release\arstack_clipboard_harness.exe'
106+
& $exe
107+
if ($LASTEXITCODE -ne 0) {
108+
throw "Native Windows OS clipboard readback failed: exit $LASTEXITCODE"
109+
}
110+
101111
- name: S8B cross-process ownership and serial-loss harness
102112
timeout-minutes: 1
103113
shell: powershell
@@ -174,6 +184,10 @@ jobs:
174184
shell: bash
175185
run: python3 apps/arstack_studio/tests/check_operator_workspace.py
176186

187+
- name: Independent SV PCAP decoder deterministic regressions
188+
shell: bash
189+
run: python3 -m unittest discover -s tests -p test_smv_wire_capture_audit.py -v
190+
177191
- name: Native binary profile authority regression
178192
shell: bash
179193
run: |
@@ -212,7 +226,7 @@ jobs:
212226
run: |
213227
set -o pipefail
214228
cmake --build build-arstack-studio \
215-
--target arstack_studio arstack_session_harness --parallel 2 \
229+
--target arstack_studio arstack_session_harness arstack_capture_harness arstack_clipboard_harness --parallel 2 \
216230
2>&1 | tee /tmp/arstack-studio-build.log
217231
218232
- name: 4I+4V reference template regression
@@ -236,6 +250,21 @@ jobs:
236250
timeout 20s ./build-arstack-studio/arstack_session_harness \
237251
2>&1 | tee /tmp/arstack-studio-session-harness.log
238252
253+
- name: Native GUI clipboard content/readback regression
254+
shell: bash
255+
run: |
256+
set -o pipefail
257+
timeout 15s env QT_QPA_PLATFORM=offscreen \
258+
./build-arstack-studio/arstack_clipboard_harness \
259+
2>&1 | tee /tmp/arstack-studio-clipboard-harness.log
260+
261+
- name: Native SV PCAP capture and CSV decoder regression
262+
shell: bash
263+
run: |
264+
set -o pipefail
265+
timeout 20s ./build-arstack-studio/arstack_capture_harness \
266+
2>&1 | tee /tmp/arstack-studio-capture-harness.log
267+
239268
- name: Firmware bundle contract regression
240269
shell: bash
241270
run: |

‎.github/workflows/arstack-studio-windows-lifecycle.yml‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,14 @@ jobs:
104104
New-Item -ItemType Directory -Path 'studio-ui-evidence' -Force | Out-Null
105105
Remove-Item Env:ARSTACK_STUDIO_QA_DIR -ErrorAction SilentlyContinue
106106
Remove-Item Env:ARSTACK_STUDIO_QA_NATIVE_ONLY -ErrorAction SilentlyContinue
107-
foreach ($scale in @('1', '1.5', '1.75')) {
107+
foreach ($scale in @('1', '1.25', '1.5', '1.75')) {
108108
$env:QT_SCALE_FACTOR = $scale
109109
$suffix = 'dpi-' + [string][int]([double]::Parse($scale, [System.Globalization.CultureInfo]::InvariantCulture) * 100)
110110
$logdir = Join-Path (Join-Path $PWD 'studio-ui-evidence') $suffix
111111
New-Item -ItemType Directory -Path $logdir -Force | Out-Null
112+
# Software viewport shots, when grabWindow supports the CI backend.
113+
# Native Windows fidelity is verified separately below.
114+
$env:ARSTACK_STUDIO_QA_DIR = $logdir
112115
$stdout = Join-Path $logdir 'geometry-stdout.txt'
113116
$stderr = Join-Path $logdir 'geometry-stderr.txt'
114117
$probe = Start-Process -FilePath $exe -ArgumentList '--check-operator-ui' -Wait -PassThru `
@@ -136,11 +139,11 @@ jobs:
136139
if ($probe.ExitCode -ne 0) {
137140
throw "Native Windows screenshot acceptance failed, exit=$($probe.ExitCode)"
138141
}
139-
$png = Join-Path $env:ARSTACK_STUDIO_QA_DIR 'studio-960x620.png'
142+
$png = Join-Path $env:ARSTACK_STUDIO_QA_DIR 'studio-960x680.png'
140143
if (-not (Test-Path $png) -or (Get-Item $png).Length -lt 10000) {
141-
throw 'Native Windows 960x620 screenshot was missing or empty'
144+
throw 'Native Windows 960x680 screenshot was missing or empty'
142145
}
143-
Write-Host 'Windows Qt deterministic 3-viewports x 3-DPI geometry + native 960x620 screenshot: PASS'
146+
Write-Host 'Windows Qt deterministic 5-viewports x 4-DPI geometry + native 960x680 screenshot: PASS'
144147
- name: Upload desktop layout evidence
145148
if: always()
146149
uses: actions/upload-artifact@v4

‎.github/workflows/ci-routing-policy.yml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@ on:
55
- '.github/workflows/**'
66
- 'scripts/check_ci_trigger_policy.py'
77
- 'docs/CI_WORKFLOW_ROUTING.md'
8+
- 'docs/integration/**'
9+
- 'tools/integration_preservation_audit.py'
810
push:
911
branches: [main]
1012
paths:
1113
- '.github/workflows/**'
1214
- 'scripts/check_ci_trigger_policy.py'
1315
- 'docs/CI_WORKFLOW_ROUTING.md'
16+
- 'docs/integration/**'
17+
- 'tools/integration_preservation_audit.py'
1418
permissions:
1519
contents: read
1620
concurrency:
@@ -24,3 +28,11 @@ jobs:
2428
- uses: actions/checkout@v4
2529
- name: Verify scoped PR workflow routing
2630
run: python3 scripts/check_ci_trigger_policy.py
31+
- name: Verify preservation manifest and all 37 non-chain source inventories
32+
shell: bash
33+
run: |
34+
if [ -f docs/integration/PR_PRESERVATION_SNAPSHOT_2026-10-22.json ]; then
35+
python3 tools/integration_preservation_audit.py --verify-only
36+
else
37+
echo 'No integration manifest in this branch; no-op.'
38+
fi

‎.github/workflows/esp32p4-ptp-lab.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
'g_announce_sent.load',
9494
'g_sync_sent.load',
9595
'g_follow_up_sent.load',
96-
'return g_ptp_ready.load',
96+
'return source_has_fresh_evidence();',
9797
]
9898
combined = eth + '\n' + ptp
9999
missing = [token for token in required if token not in combined]

0 commit comments

Comments
 (0)