From ca06163fbe0fc443293961745f790fd10e499178 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Tue, 15 Sep 2026 12:47:02 +0700 Subject: [PATCH 1/4] docs: stage SMV v0.1.0 milestone synchronization --- .github/workflows/docs-sync-smv-v010.yml | 114 +++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 .github/workflows/docs-sync-smv-v010.yml diff --git a/.github/workflows/docs-sync-smv-v010.yml b/.github/workflows/docs-sync-smv-v010.yml new file mode 100644 index 000000000..49b37bfab --- /dev/null +++ b/.github/workflows/docs-sync-smv-v010.yml @@ -0,0 +1,114 @@ +name: Sync SMV v0.1.0 milestone docs + +on: + push: + branches: + - docs/sync-smv-v0.1.0-milestone + +permissions: + contents: write + +jobs: + sync-docs: + if: github.actor != 'github-actions[bot]' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: docs/sync-smv-v0.1.0-milestone + fetch-depth: 0 + + - name: Synchronize release milestone documentation + shell: python + run: | + from pathlib import Path + import re + + release_url = "https://github.com/masarray/arstack61850/releases/tag/v0.1.0" + source_sha = "9c7fc7300220db4643e5643081240b955cfe12df" + artifact_sha = "d9b5b6848415c7e6d1c52ec929e57c66b608058d" + + def replace_once(text, old, new, label): + if old not in text: + raise SystemExit(f"missing expected block: {label}") + if text.count(old) != 1: + raise SystemExit(f"expected exactly one block for {label}; got {text.count(old)}") + return text.replace(old, new, 1) + + # Repository landing page. + p = Path("README.md") + text = p.read_text(encoding="utf-8") + intro_anchor = "The portable C++20 stack remains rooted in the ARIEC61850 behavioral model, but the project north star is now broader: build an open, deterministic IEC 61850 instrumentation platform for hardware-timestamped Sampled Values/GOOSE/PTP injection, analysis, commissioning and real-time closed-loop testing.\n" + public_block = f'''{intro_anchor}\n## Public release — SMV Injector v0.1.0\n\n**Status: STABLE PUBLIC RELEASE · 2026-09-15**\n\nARStack Studio / SMV Injector v0.1.0 is the first public production milestone of the ESP32-P4 Sampled Values track. It packages the native Windows operator application, the accepted ESP32-P4 firmware, recovery tooling, and the validated 4I+4V reference workflow.\n\n**[Download SMV Injector v0.1.0]({release_url})**\n\nPublic P0 profile:\n\n- 4 current + 4 voltage channels;\n- 4000 frames/s;\n- 1 ASDU per Ethernet frame;\n- 64-byte sample payload;\n- `smpCnt` modulus 4000;\n- `smpSynch=0` until separately measured disciplined-clock evidence exists.\n\nAccepted physical evidence includes 10/10 Start/Stop cycles, live engineering edits, an uninterrupted 3600-second retained run at 4000 fps with `missed=0`, `txFailures=0`, `healthReconnects=0`, and `automaticStarts=0`, plus an independent SV capture spot-check with continuous `smpCnt` including 3999 -> 0 wraps.\n\nRelease source target: `{source_sha}`. Accepted binary build head: `{artifact_sha}`. See [`docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md`](docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md) for immutable release provenance, hashes, scope, and the remaining non-blocking research boundary.\n''' + text = replace_once(text, intro_anchor, public_block, "README public release insert") + + start_pattern = re.compile(r"## Start here\n\n.*?\nThe project deliberately separates", re.S) + start_replacement = '''## Start here\n\nFor a new engineer or AI development thread, read these before making architecture changes:\n\n1. [`NORTH_STAR.md`](NORTH_STAR.md) — product thesis, standards, hardware roadmap and definition of success.\n2. [`docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md`](docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md) — current public SMV product milestone, release provenance and validated boundary.\n3. [`PROJECT_HANDOFF.md`](PROJECT_HANDOFF.md) — current repository handoff and separation between released SMV work and active follow-on tracks.\n4. [`apps/arstack_studio/README.md`](apps/arstack_studio/README.md) — operator workflow, firmware recovery and Windows distribution details.\n5. [`docs/ONLINE_MODEL_CONNECT_DECISION.md`](docs/ONLINE_MODEL_CONNECT_DECISION.md) — short decision contract separating full live discovery from SCL-assisted online connect.\n6. [`LIVE_DISCOVERY_PROFILE.md`](LIVE_DISCOVERY_PROFILE.md) — detailed live-discovery and online-model interoperability boundary.\n7. [`embedded/esp32p4_smv_injector/ARCHITECTURE.md`](embedded/esp32p4_smv_injector/ARCHITECTURE.md) — embedded real-time architecture boundaries.\n8. [`docs/GLOBAL_BENCHMARK.md`](docs/GLOBAL_BENCHMARK.md) — vendor-neutral standards/industry research behind the direction.\n\nThe project deliberately separates''' + text, count = start_pattern.subn(start_replacement, text, count=1) + if count != 1: + raise SystemExit("README Start here block not replaced") + + milestone_pattern = re.compile(r"## Current hardware milestone\n\n.*?(?=\n## Lineage and portable core)", re.S) + milestone_replacement = f'''## Current SMV product milestone\n\nThe P0 ESP32-P4 Sampled Values product track is **released and public** as `v0.1.0`. The stable GitHub release points to production merge `{source_sha}` and publishes a Windows installer, portable package, accepted firmware image, manifest and release checksums.\n\nPhysical acceptance retained for the public milestone:\n\n- 10/10 Start/Stop cycles passed;\n- uninterrupted 3600-second retained run held 4000 fps;\n- `missed=0`, `txFailures=0`, `healthReconnects=0`, `automaticStarts=0`;\n- independent capture confirmed the expected SV profile, one ASDU, 64-byte `seqData`, continuous `smpCnt` and 3999 -> 0 wraps;\n- `smpSynch=0` remains the truthful synchronization state.\n\nThe next process-bus research gate is measured hardware timestamp/PTP discipline and broader profile support. Those are follow-on milestones and are **not** retroactively claimed by v0.1.0.\n''' + text, count = milestone_pattern.subn(milestone_replacement.rstrip(), text, count=1) + if count != 1: + raise SystemExit("README current hardware milestone block not replaced") + p.write_text(text, encoding="utf-8") + + # Product landing README. + p = Path("apps/arstack_studio/README.md") + text = p.read_text(encoding="utf-8") + opening = "ARStack Studio is the **canonical native desktop operator surface** for the first ARStack61850 public Sampled Values release. It is a Qt 6 / C++ / QML application; the ESP32-P4 remains the deterministic real-time publisher.\n" + opening_new = f'''ARStack Studio is the **canonical native desktop operator surface** for the first ARStack61850 public Sampled Values release. It is a Qt 6 / C++ / QML application; the ESP32-P4 remains the deterministic real-time publisher.\n\n> **v0.1.0 is publicly released and stable.** Download: {release_url}\n>\n> Production source target: `{source_sha}` · accepted binary build head: `{artifact_sha}`.\n''' + text = replace_once(text, opening, opening_new, "Studio README release banner") + + windows_pattern = re.compile(r"## Windows release artifacts\n\n.*?(?=\n## Truthfulness boundary)", re.S) + windows_replacement = f'''## Windows release artifacts\n\nThe stable `v0.1.0` public release is available at:\n\n- [GitHub Release — ARStack Studio / SMV Injector v0.1.0]({release_url})\n- `ARStack-Studio-0.1.0-win-x64-setup.exe` — recommended normal installation\n- `ARStack-Studio-0.1.0-win-x64-portable.zip` — portable package\n- `arstack-esp32p4-smv-0.1.0.bin` — standalone ESP32-P4 firmware asset\n- `firmware-manifest.json`\n- `RELEASE-SHA256SUMS.txt`\n\nPublished SHA-256 values:\n\n```text\n877a35dbbe110cc8ab740d3fcdc44a63f348405dc509da3164d9aaa92e9e2622 ARStack-Studio-0.1.0-win-x64-setup.exe\n1487e90254ddc5cab0f7b917580be951311c1697bec6dc19d2e2720683f00f83 ARStack-Studio-0.1.0-win-x64-portable.zip\nfae413d7b6f65b7d10ca65dc277fbf586d487f21209a29875036791088afa9c7 arstack-esp32p4-smv-0.1.0.bin\n```\n\nBoth Windows packages contain the Qt runtime, verified ESP32-P4 firmware bundle, and pinned standalone flasher. The installer is per-user and does not require administrator elevation. The release is **stable**, not draft and not prerelease.\n''' + text, count = windows_pattern.subn(windows_replacement.rstrip(), text, count=1) + if count != 1: + raise SystemExit("Studio README Windows release block not replaced") + p.write_text(text, encoding="utf-8") + + # P0 release contract becomes a release-status record while preserving honesty boundaries. + Path("docs/SMV_STUDIO_P0_RELEASE.md").write_text(f'''# ARStack Studio P0 public-release contract\n\n**Milestone status: RELEASED · stable public `v0.1.0` · 2026-09-15**\n\nPublic release: {release_url}\n\nProduction source target: `{source_sha}` \nAccepted binary build head: `{artifact_sha}` \nPublic release workflow source: ARStack Studio Release run `34918302946` (SUCCESS)\n\n## Product target\n\nThe first public ARStack Studio release is intentionally bounded to one professional workflow:\n\n> **IEC 61850 Sampled Values Injector / Generator — 4I + 4V**\n\nThe milestone packages the ESP32-P4 publisher as a usable Windows instrument without requiring the operator to install or understand the development toolchain.\n\n## P0 profile boundary\n\n- 4 current channels: `Ia`, `Ib`, `Ic`, `In`\n- 4 voltage channels: `Ua`, `Ub`, `Uc`, `Un`\n- one `INT32 value + Quality` pair per channel\n- 16 ordered FCDA leaves\n- 64-byte sample payload\n- one ASDU\n- 4000 samples/s reference profile\n- sample-counter cycle `0..3999`\n- SCL/CID/SCD/IID import remains available when the compiled stream fits the same firmware boundary\n- `smpSynch=0` until separately measured disciplined-clock evidence exists\n\nProfiles outside this layout may still be parsed and explained, but they are not v0.1.0 deployment targets and must remain blocked from deployment.\n\n## Closed work packages\n\n### P0.1 — Canonical Quick Start — CLOSED\n\n- [x] ARStack-owned 4I+4V reference SCL bundled with the native Qt application\n- [x] canonical C++ SCL parser/profile compiler path\n- [x] Class-A reference profile at 4000 fps / modulus 4000 / 64-byte payload / 16 leaves\n- [x] one-click `4I+4V Quick Start` operator path\n\n### P0.2 — Release UI / UX — CLOSED\n\n- [x] ARStack Studio is the canonical public operator surface\n- [x] device, firmware, profile and output states are explicit\n- [x] Current / Voltage matrices remain the primary work surface\n- [x] disabled Start/Deploy paths expose operator-readable reasons\n- [x] Expert diagnostics remain secondary to the normal workflow\n\n### P0.3 — ESP32-P4 firmware/session manager — CLOSED FOR v0.1.0\n\n- [x] typed semantic device identity and protocol versioning\n- [x] packaged firmware image + manifest + SHA-256 enforcement\n- [x] bounded serial ownership and firmware handoff\n- [x] reconnect verification after firmware operations\n- [x] wrong-device and incompatible-image paths fail closed\n- [x] single-instance/session ownership hardening\n\n### P0.4 — Windows public distribution — CLOSED\n\n- [x] native Release build\n- [x] bundled Qt runtime\n- [x] portable package\n- [x] Windows installer\n- [x] clean Windows package smoke\n- [x] versioned firmware bundle and manifest\n- [x] SHA-256 checksums and release provenance\n- [x] stable tagged GitHub Release `v0.1.0`\n\n### P0.5 — Physical product acceptance — ACCEPTED\n\nExecuted evidence used for the public milestone:\n\n- [x] 10/10 Start/Stop cycles\n- [x] Quick Start profile deploy/start path on the accepted physical board\n- [x] live magnitude / phase / frequency / Quality / CT edits\n- [x] Zero operation\n- [x] uninterrupted 3600-second retained run at 4000 fps\n- [x] `missed=0`, `txFailures=0`, `healthReconnects=0`, `automaticStarts=0`\n- [x] independent capture spot-check of destination MAC, APPID, VLAN/PCP, svID, confRev, one ASDU, 64-byte payload, `smpCnt` continuity and 3999 -> 0 wrap\n- [x] `smpSynch=0` truth boundary retained\n\nThe following strict-lab cases were intentionally deferred as non-blocking follow-on validation and are **not represented as completed physical PASS cases**:\n\n- [ ] exhaustive blank-board/recovery permutations across USB-driver combinations\n- [ ] exhaustive external engineering SCL physical matrix beyond the accepted P0 reference path\n- [ ] broader power-cycle/unplug/replug permutations beyond the product-owner pragmatic release gate\n\n## Published assets\n\n```text\n877a35dbbe110cc8ab740d3fcdc44a63f348405dc509da3164d9aaa92e9e2622 ARStack-Studio-0.1.0-win-x64-setup.exe\n1487e90254ddc5cab0f7b917580be951311c1697bec6dc19d2e2720683f00f83 ARStack-Studio-0.1.0-win-x64-portable.zip\nfae413d7b6f65b7d10ca65dc277fbf586d487f21209a29875036791088afa9c7 arstack-esp32p4-smv-0.1.0.bin\n```\n\n## Explicitly outside v0.1.0\n\n- generalized 3I / 8I / 8I+4V / 9I+6V / 12I+4V / 12I+8V runtime layouts\n- multi-stream publication\n- arbitrary DataSet layouts\n- COMTRADE playback as a released device data plane\n- scripted fault sequences\n- full Process Bus analyzer\n- protection-grade timing claims\n- IEC 61850 conformance/certification claims\n\nThe P0 boundary can widen only through a later versioned milestone. Public v0.1.0 remains a deliberately bounded engineering instrument release.\n''', encoding="utf-8") + + # Immutable public milestone record / documentation landing page. + Path("docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md").write_text(f'''# ARStack Studio / SMV Injector v0.1.0\n\n**Stable public release · 15 September 2026**\n\n[Download v0.1.0]({release_url})\n\n## Milestone\n\n`v0.1.0` closes the first public ARStack Sampled Values product milestone: a Windows engineering application supervising a deterministic ESP32-P4 publisher for the validated 4I+4V / 4000 fps profile.\n\nThis milestone is deliberately narrower than the full ARStack roadmap. It is a usable public engineering release, not a protection-grade timing or conformance-certification claim.\n\n## Public package\n\n- Windows x64 installer — recommended for normal use\n- Windows x64 portable package\n- ESP32-P4 firmware image\n- firmware manifest\n- release SHA-256 ledger\n- bundled firmware recovery/flash tooling inside ARStack Studio\n\n## Validated profile\n\n| Property | v0.1.0 value |\n|---|---|\n| Channels | 4 current + 4 voltage |\n| Frame rate | 4000 frames/s |\n| ASDU | 1 per frame |\n| Sample payload | 64 bytes |\n| `smpCnt` modulus | 4000 |\n| `smpSynch` | 0 |\n| Firmware protocol | ARStack protocol v1 |\n\n## Physical acceptance summary\n\nThe accepted physical board run completed:\n\n- 10/10 Start/Stop cycles;\n- live magnitude, phase, frequency, Quality and CT edits;\n- Zero;\n- uninterrupted 3600-second retained run;\n- 4000 fps minimum and maximum throughout retained telemetry;\n- zero missed sample slots;\n- zero TX failures;\n- zero health reconnects;\n- zero automatic Start events.\n\nAn independent capture spot-check contained 39,524 primary SV frames over approximately 9.881 seconds, an effective rate of approximately 3999.899 fps, zero observed `smpCnt` discontinuities, and ten 3999 -> 0 wraps. The capture matched the accepted P0 wire identity and retained `smpSynch=0`.\n\n## Release provenance\n\n| Item | Value |\n|---|---|\n| Stable tag | `v0.1.0` |\n| Production merge | `{source_sha}` |\n| Accepted binary build head | `{artifact_sha}` |\n| Release build | ARStack Studio Release run `34918302946` — SUCCESS |\n| Public publish workflow | Publish Public SMV Injector v0.1.0 run `34933705055` — SUCCESS |\n\nThe `v0.1.0` tag points directly to the production merge SHA above.\n\n## Published SHA-256\n\n```text\n877a35dbbe110cc8ab740d3fcdc44a63f348405dc509da3164d9aaa92e9e2622 ARStack-Studio-0.1.0-win-x64-setup.exe\n1487e90254ddc5cab0f7b917580be951311c1697bec6dc19d2e2720683f00f83 ARStack-Studio-0.1.0-win-x64-portable.zip\nfae413d7b6f65b7d10ca65dc277fbf586d487f21209a29875036791088afa9c7 arstack-esp32p4-smv-0.1.0.bin\n```\n\n## Product boundary after this milestone\n\nThe next SMV work may expand timing evidence, profiles, multi-stream support, replay/sequencing and interoperability. None of that changes the truth of this release:\n\n> v0.1.0 is the stable public 4I+4V / 4000 fps engineering-instrument baseline.\n\nIED Simulator / IEC 61850 Workbench development is a separate product track and should not be used to redefine the v0.1.0 SMV acceptance boundary.\n''', encoding="utf-8") + + # Feature matrix: synchronize only SMV product rows and terminology. + p = Path("docs/FEATURE_MATRIX.md") + text = p.read_text(encoding="utf-8") + status_anchor = "- **Live-proven** — exercised against a reachable IED or vendor simulator.\n" + status_new = status_anchor + "- **Public release** — packaged, versioned and publicly downloadable with accepted product-level evidence and an explicit claim boundary.\n" + text = replace_once(text, status_anchor, status_new, "feature matrix public-release status") + old_row = "| Sampled Values | Live MCU publisher | Planned / embedded path staged | First reference hardware is the Waveshare ESP32-S3-POE-ETH-8DI-8DO; synthetic W5500/ESP-IDF MACRAW transmission proof is required before any timing-grade claim. |" + new_rows = "| Sampled Values | Live MCU publisher | Public release / physical accepted | ESP32-P4 ARStack Studio v0.1.0 completed 10/10 Start/Stop cycles and an uninterrupted 3600-second 4000 fps retained run with zero missed slots, TX failures, health reconnects or automatic starts; `smpSynch=0` remains the truthful timing boundary. |\n| Desktop product | ARStack Studio / SMV Injector v0.1.0 | Public release | Stable Windows installer + portable package + ESP32-P4 firmware published under tag `v0.1.0`; independent SV spot-check confirmed the bounded 4I+4V / 4000 fps / 1 ASDU / 64-byte profile. |" + text = replace_once(text, old_row, new_rows, "feature matrix SMV live publisher row") + old_next = "The next gaps are association-loss and contention evidence for control, remaining MMS file-service parity and fault-record workflows, mutable SCL export/reconstruction, deterministic IED simulator/server integration, and broader application/UI parity. Sampled Values and ESP hardware work remain separate from this MMS-control tranche." + new_next = "The next gaps are association-loss and contention evidence for control, remaining MMS file-service parity and fault-record workflows, mutable SCL export/reconstruction, deterministic IED simulator/server integration, and broader application/UI parity. The SMV/ESP32-P4 P0 track is now released as stable `v0.1.0`; future process-bus timing/profile expansion remains a separate follow-on tranche rather than an open blocker for that release." + text = replace_once(text, old_next, new_next, "feature matrix next direction") + p.write_text(text, encoding="utf-8") + + # Current-state handoff: retire stale PR #19 as the current milestone without rewriting historical bench evidence. + p = Path("PROJECT_HANDOFF.md") + text = p.read_text(encoding="utf-8") + text = replace_once(text, "Last major bench update: **2026-08-10**.", "Last major product milestone update: **2026-09-15 — stable public SMV Injector v0.1.0 released**.", "handoff date") + section_pattern = re.compile(r"## 1\. Active repository work\n\n.*?(?=\n## 2\. Tested hardware/toolchain)", re.S) + section_replacement = f'''## 1. Active repository work\n\n- Repository: `masarray/arstack61850`\n- Production branch: `main`\n- SMV production merge: `{source_sha}` — PR #79\n- Stable public SMV release: [`v0.1.0`]({release_url})\n- P0.5 supervisor/physical release issue: #83 — closed\n- Legacy first-trial SV PR #15 — archived/superseded, not merged\n- IED Simulator PRs #75/#82 remain separate tracks and must not be conflated with the SMV release baseline\n\nFor current SMV product truth, start with [`docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md`](docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md). Sections below retain useful historical bench/toolchain context; where they conflict with the versioned release record, the release record and current `main` take precedence.\n''' + text, count = section_pattern.subn(section_replacement.rstrip(), text, count=1) + if count != 1: + raise SystemExit("PROJECT_HANDOFF active repository block not replaced") + p.write_text(text, encoding="utf-8") + + # This helper workflow is intentionally ephemeral; remove it from the final docs branch. + Path(".github/workflows/docs-sync-smv-v010.yml").unlink() + + - name: Commit synchronized documentation + shell: bash + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add README.md apps/arstack_studio/README.md docs/SMV_STUDIO_P0_RELEASE.md docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md docs/FEATURE_MATRIX.md PROJECT_HANDOFF.md .github/workflows/docs-sync-smv-v010.yml + git diff --cached --check + git commit -m "docs: synchronize public SMV v0.1.0 milestone" + git push origin HEAD:docs/sync-smv-v0.1.0-milestone From cf2c9db30ba12d205031e853710f5b9a3b0c086a Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Tue, 15 Sep 2026 12:49:14 +0700 Subject: [PATCH 2/4] chore: remove failed docs sync helper --- .github/workflows/docs-sync-smv-v010.yml | 114 ----------------------- 1 file changed, 114 deletions(-) delete mode 100644 .github/workflows/docs-sync-smv-v010.yml diff --git a/.github/workflows/docs-sync-smv-v010.yml b/.github/workflows/docs-sync-smv-v010.yml deleted file mode 100644 index 49b37bfab..000000000 --- a/.github/workflows/docs-sync-smv-v010.yml +++ /dev/null @@ -1,114 +0,0 @@ -name: Sync SMV v0.1.0 milestone docs - -on: - push: - branches: - - docs/sync-smv-v0.1.0-milestone - -permissions: - contents: write - -jobs: - sync-docs: - if: github.actor != 'github-actions[bot]' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: docs/sync-smv-v0.1.0-milestone - fetch-depth: 0 - - - name: Synchronize release milestone documentation - shell: python - run: | - from pathlib import Path - import re - - release_url = "https://github.com/masarray/arstack61850/releases/tag/v0.1.0" - source_sha = "9c7fc7300220db4643e5643081240b955cfe12df" - artifact_sha = "d9b5b6848415c7e6d1c52ec929e57c66b608058d" - - def replace_once(text, old, new, label): - if old not in text: - raise SystemExit(f"missing expected block: {label}") - if text.count(old) != 1: - raise SystemExit(f"expected exactly one block for {label}; got {text.count(old)}") - return text.replace(old, new, 1) - - # Repository landing page. - p = Path("README.md") - text = p.read_text(encoding="utf-8") - intro_anchor = "The portable C++20 stack remains rooted in the ARIEC61850 behavioral model, but the project north star is now broader: build an open, deterministic IEC 61850 instrumentation platform for hardware-timestamped Sampled Values/GOOSE/PTP injection, analysis, commissioning and real-time closed-loop testing.\n" - public_block = f'''{intro_anchor}\n## Public release — SMV Injector v0.1.0\n\n**Status: STABLE PUBLIC RELEASE · 2026-09-15**\n\nARStack Studio / SMV Injector v0.1.0 is the first public production milestone of the ESP32-P4 Sampled Values track. It packages the native Windows operator application, the accepted ESP32-P4 firmware, recovery tooling, and the validated 4I+4V reference workflow.\n\n**[Download SMV Injector v0.1.0]({release_url})**\n\nPublic P0 profile:\n\n- 4 current + 4 voltage channels;\n- 4000 frames/s;\n- 1 ASDU per Ethernet frame;\n- 64-byte sample payload;\n- `smpCnt` modulus 4000;\n- `smpSynch=0` until separately measured disciplined-clock evidence exists.\n\nAccepted physical evidence includes 10/10 Start/Stop cycles, live engineering edits, an uninterrupted 3600-second retained run at 4000 fps with `missed=0`, `txFailures=0`, `healthReconnects=0`, and `automaticStarts=0`, plus an independent SV capture spot-check with continuous `smpCnt` including 3999 -> 0 wraps.\n\nRelease source target: `{source_sha}`. Accepted binary build head: `{artifact_sha}`. See [`docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md`](docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md) for immutable release provenance, hashes, scope, and the remaining non-blocking research boundary.\n''' - text = replace_once(text, intro_anchor, public_block, "README public release insert") - - start_pattern = re.compile(r"## Start here\n\n.*?\nThe project deliberately separates", re.S) - start_replacement = '''## Start here\n\nFor a new engineer or AI development thread, read these before making architecture changes:\n\n1. [`NORTH_STAR.md`](NORTH_STAR.md) — product thesis, standards, hardware roadmap and definition of success.\n2. [`docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md`](docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md) — current public SMV product milestone, release provenance and validated boundary.\n3. [`PROJECT_HANDOFF.md`](PROJECT_HANDOFF.md) — current repository handoff and separation between released SMV work and active follow-on tracks.\n4. [`apps/arstack_studio/README.md`](apps/arstack_studio/README.md) — operator workflow, firmware recovery and Windows distribution details.\n5. [`docs/ONLINE_MODEL_CONNECT_DECISION.md`](docs/ONLINE_MODEL_CONNECT_DECISION.md) — short decision contract separating full live discovery from SCL-assisted online connect.\n6. [`LIVE_DISCOVERY_PROFILE.md`](LIVE_DISCOVERY_PROFILE.md) — detailed live-discovery and online-model interoperability boundary.\n7. [`embedded/esp32p4_smv_injector/ARCHITECTURE.md`](embedded/esp32p4_smv_injector/ARCHITECTURE.md) — embedded real-time architecture boundaries.\n8. [`docs/GLOBAL_BENCHMARK.md`](docs/GLOBAL_BENCHMARK.md) — vendor-neutral standards/industry research behind the direction.\n\nThe project deliberately separates''' - text, count = start_pattern.subn(start_replacement, text, count=1) - if count != 1: - raise SystemExit("README Start here block not replaced") - - milestone_pattern = re.compile(r"## Current hardware milestone\n\n.*?(?=\n## Lineage and portable core)", re.S) - milestone_replacement = f'''## Current SMV product milestone\n\nThe P0 ESP32-P4 Sampled Values product track is **released and public** as `v0.1.0`. The stable GitHub release points to production merge `{source_sha}` and publishes a Windows installer, portable package, accepted firmware image, manifest and release checksums.\n\nPhysical acceptance retained for the public milestone:\n\n- 10/10 Start/Stop cycles passed;\n- uninterrupted 3600-second retained run held 4000 fps;\n- `missed=0`, `txFailures=0`, `healthReconnects=0`, `automaticStarts=0`;\n- independent capture confirmed the expected SV profile, one ASDU, 64-byte `seqData`, continuous `smpCnt` and 3999 -> 0 wraps;\n- `smpSynch=0` remains the truthful synchronization state.\n\nThe next process-bus research gate is measured hardware timestamp/PTP discipline and broader profile support. Those are follow-on milestones and are **not** retroactively claimed by v0.1.0.\n''' - text, count = milestone_pattern.subn(milestone_replacement.rstrip(), text, count=1) - if count != 1: - raise SystemExit("README current hardware milestone block not replaced") - p.write_text(text, encoding="utf-8") - - # Product landing README. - p = Path("apps/arstack_studio/README.md") - text = p.read_text(encoding="utf-8") - opening = "ARStack Studio is the **canonical native desktop operator surface** for the first ARStack61850 public Sampled Values release. It is a Qt 6 / C++ / QML application; the ESP32-P4 remains the deterministic real-time publisher.\n" - opening_new = f'''ARStack Studio is the **canonical native desktop operator surface** for the first ARStack61850 public Sampled Values release. It is a Qt 6 / C++ / QML application; the ESP32-P4 remains the deterministic real-time publisher.\n\n> **v0.1.0 is publicly released and stable.** Download: {release_url}\n>\n> Production source target: `{source_sha}` · accepted binary build head: `{artifact_sha}`.\n''' - text = replace_once(text, opening, opening_new, "Studio README release banner") - - windows_pattern = re.compile(r"## Windows release artifacts\n\n.*?(?=\n## Truthfulness boundary)", re.S) - windows_replacement = f'''## Windows release artifacts\n\nThe stable `v0.1.0` public release is available at:\n\n- [GitHub Release — ARStack Studio / SMV Injector v0.1.0]({release_url})\n- `ARStack-Studio-0.1.0-win-x64-setup.exe` — recommended normal installation\n- `ARStack-Studio-0.1.0-win-x64-portable.zip` — portable package\n- `arstack-esp32p4-smv-0.1.0.bin` — standalone ESP32-P4 firmware asset\n- `firmware-manifest.json`\n- `RELEASE-SHA256SUMS.txt`\n\nPublished SHA-256 values:\n\n```text\n877a35dbbe110cc8ab740d3fcdc44a63f348405dc509da3164d9aaa92e9e2622 ARStack-Studio-0.1.0-win-x64-setup.exe\n1487e90254ddc5cab0f7b917580be951311c1697bec6dc19d2e2720683f00f83 ARStack-Studio-0.1.0-win-x64-portable.zip\nfae413d7b6f65b7d10ca65dc277fbf586d487f21209a29875036791088afa9c7 arstack-esp32p4-smv-0.1.0.bin\n```\n\nBoth Windows packages contain the Qt runtime, verified ESP32-P4 firmware bundle, and pinned standalone flasher. The installer is per-user and does not require administrator elevation. The release is **stable**, not draft and not prerelease.\n''' - text, count = windows_pattern.subn(windows_replacement.rstrip(), text, count=1) - if count != 1: - raise SystemExit("Studio README Windows release block not replaced") - p.write_text(text, encoding="utf-8") - - # P0 release contract becomes a release-status record while preserving honesty boundaries. - Path("docs/SMV_STUDIO_P0_RELEASE.md").write_text(f'''# ARStack Studio P0 public-release contract\n\n**Milestone status: RELEASED · stable public `v0.1.0` · 2026-09-15**\n\nPublic release: {release_url}\n\nProduction source target: `{source_sha}` \nAccepted binary build head: `{artifact_sha}` \nPublic release workflow source: ARStack Studio Release run `34918302946` (SUCCESS)\n\n## Product target\n\nThe first public ARStack Studio release is intentionally bounded to one professional workflow:\n\n> **IEC 61850 Sampled Values Injector / Generator — 4I + 4V**\n\nThe milestone packages the ESP32-P4 publisher as a usable Windows instrument without requiring the operator to install or understand the development toolchain.\n\n## P0 profile boundary\n\n- 4 current channels: `Ia`, `Ib`, `Ic`, `In`\n- 4 voltage channels: `Ua`, `Ub`, `Uc`, `Un`\n- one `INT32 value + Quality` pair per channel\n- 16 ordered FCDA leaves\n- 64-byte sample payload\n- one ASDU\n- 4000 samples/s reference profile\n- sample-counter cycle `0..3999`\n- SCL/CID/SCD/IID import remains available when the compiled stream fits the same firmware boundary\n- `smpSynch=0` until separately measured disciplined-clock evidence exists\n\nProfiles outside this layout may still be parsed and explained, but they are not v0.1.0 deployment targets and must remain blocked from deployment.\n\n## Closed work packages\n\n### P0.1 — Canonical Quick Start — CLOSED\n\n- [x] ARStack-owned 4I+4V reference SCL bundled with the native Qt application\n- [x] canonical C++ SCL parser/profile compiler path\n- [x] Class-A reference profile at 4000 fps / modulus 4000 / 64-byte payload / 16 leaves\n- [x] one-click `4I+4V Quick Start` operator path\n\n### P0.2 — Release UI / UX — CLOSED\n\n- [x] ARStack Studio is the canonical public operator surface\n- [x] device, firmware, profile and output states are explicit\n- [x] Current / Voltage matrices remain the primary work surface\n- [x] disabled Start/Deploy paths expose operator-readable reasons\n- [x] Expert diagnostics remain secondary to the normal workflow\n\n### P0.3 — ESP32-P4 firmware/session manager — CLOSED FOR v0.1.0\n\n- [x] typed semantic device identity and protocol versioning\n- [x] packaged firmware image + manifest + SHA-256 enforcement\n- [x] bounded serial ownership and firmware handoff\n- [x] reconnect verification after firmware operations\n- [x] wrong-device and incompatible-image paths fail closed\n- [x] single-instance/session ownership hardening\n\n### P0.4 — Windows public distribution — CLOSED\n\n- [x] native Release build\n- [x] bundled Qt runtime\n- [x] portable package\n- [x] Windows installer\n- [x] clean Windows package smoke\n- [x] versioned firmware bundle and manifest\n- [x] SHA-256 checksums and release provenance\n- [x] stable tagged GitHub Release `v0.1.0`\n\n### P0.5 — Physical product acceptance — ACCEPTED\n\nExecuted evidence used for the public milestone:\n\n- [x] 10/10 Start/Stop cycles\n- [x] Quick Start profile deploy/start path on the accepted physical board\n- [x] live magnitude / phase / frequency / Quality / CT edits\n- [x] Zero operation\n- [x] uninterrupted 3600-second retained run at 4000 fps\n- [x] `missed=0`, `txFailures=0`, `healthReconnects=0`, `automaticStarts=0`\n- [x] independent capture spot-check of destination MAC, APPID, VLAN/PCP, svID, confRev, one ASDU, 64-byte payload, `smpCnt` continuity and 3999 -> 0 wrap\n- [x] `smpSynch=0` truth boundary retained\n\nThe following strict-lab cases were intentionally deferred as non-blocking follow-on validation and are **not represented as completed physical PASS cases**:\n\n- [ ] exhaustive blank-board/recovery permutations across USB-driver combinations\n- [ ] exhaustive external engineering SCL physical matrix beyond the accepted P0 reference path\n- [ ] broader power-cycle/unplug/replug permutations beyond the product-owner pragmatic release gate\n\n## Published assets\n\n```text\n877a35dbbe110cc8ab740d3fcdc44a63f348405dc509da3164d9aaa92e9e2622 ARStack-Studio-0.1.0-win-x64-setup.exe\n1487e90254ddc5cab0f7b917580be951311c1697bec6dc19d2e2720683f00f83 ARStack-Studio-0.1.0-win-x64-portable.zip\nfae413d7b6f65b7d10ca65dc277fbf586d487f21209a29875036791088afa9c7 arstack-esp32p4-smv-0.1.0.bin\n```\n\n## Explicitly outside v0.1.0\n\n- generalized 3I / 8I / 8I+4V / 9I+6V / 12I+4V / 12I+8V runtime layouts\n- multi-stream publication\n- arbitrary DataSet layouts\n- COMTRADE playback as a released device data plane\n- scripted fault sequences\n- full Process Bus analyzer\n- protection-grade timing claims\n- IEC 61850 conformance/certification claims\n\nThe P0 boundary can widen only through a later versioned milestone. Public v0.1.0 remains a deliberately bounded engineering instrument release.\n''', encoding="utf-8") - - # Immutable public milestone record / documentation landing page. - Path("docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md").write_text(f'''# ARStack Studio / SMV Injector v0.1.0\n\n**Stable public release · 15 September 2026**\n\n[Download v0.1.0]({release_url})\n\n## Milestone\n\n`v0.1.0` closes the first public ARStack Sampled Values product milestone: a Windows engineering application supervising a deterministic ESP32-P4 publisher for the validated 4I+4V / 4000 fps profile.\n\nThis milestone is deliberately narrower than the full ARStack roadmap. It is a usable public engineering release, not a protection-grade timing or conformance-certification claim.\n\n## Public package\n\n- Windows x64 installer — recommended for normal use\n- Windows x64 portable package\n- ESP32-P4 firmware image\n- firmware manifest\n- release SHA-256 ledger\n- bundled firmware recovery/flash tooling inside ARStack Studio\n\n## Validated profile\n\n| Property | v0.1.0 value |\n|---|---|\n| Channels | 4 current + 4 voltage |\n| Frame rate | 4000 frames/s |\n| ASDU | 1 per frame |\n| Sample payload | 64 bytes |\n| `smpCnt` modulus | 4000 |\n| `smpSynch` | 0 |\n| Firmware protocol | ARStack protocol v1 |\n\n## Physical acceptance summary\n\nThe accepted physical board run completed:\n\n- 10/10 Start/Stop cycles;\n- live magnitude, phase, frequency, Quality and CT edits;\n- Zero;\n- uninterrupted 3600-second retained run;\n- 4000 fps minimum and maximum throughout retained telemetry;\n- zero missed sample slots;\n- zero TX failures;\n- zero health reconnects;\n- zero automatic Start events.\n\nAn independent capture spot-check contained 39,524 primary SV frames over approximately 9.881 seconds, an effective rate of approximately 3999.899 fps, zero observed `smpCnt` discontinuities, and ten 3999 -> 0 wraps. The capture matched the accepted P0 wire identity and retained `smpSynch=0`.\n\n## Release provenance\n\n| Item | Value |\n|---|---|\n| Stable tag | `v0.1.0` |\n| Production merge | `{source_sha}` |\n| Accepted binary build head | `{artifact_sha}` |\n| Release build | ARStack Studio Release run `34918302946` — SUCCESS |\n| Public publish workflow | Publish Public SMV Injector v0.1.0 run `34933705055` — SUCCESS |\n\nThe `v0.1.0` tag points directly to the production merge SHA above.\n\n## Published SHA-256\n\n```text\n877a35dbbe110cc8ab740d3fcdc44a63f348405dc509da3164d9aaa92e9e2622 ARStack-Studio-0.1.0-win-x64-setup.exe\n1487e90254ddc5cab0f7b917580be951311c1697bec6dc19d2e2720683f00f83 ARStack-Studio-0.1.0-win-x64-portable.zip\nfae413d7b6f65b7d10ca65dc277fbf586d487f21209a29875036791088afa9c7 arstack-esp32p4-smv-0.1.0.bin\n```\n\n## Product boundary after this milestone\n\nThe next SMV work may expand timing evidence, profiles, multi-stream support, replay/sequencing and interoperability. None of that changes the truth of this release:\n\n> v0.1.0 is the stable public 4I+4V / 4000 fps engineering-instrument baseline.\n\nIED Simulator / IEC 61850 Workbench development is a separate product track and should not be used to redefine the v0.1.0 SMV acceptance boundary.\n''', encoding="utf-8") - - # Feature matrix: synchronize only SMV product rows and terminology. - p = Path("docs/FEATURE_MATRIX.md") - text = p.read_text(encoding="utf-8") - status_anchor = "- **Live-proven** — exercised against a reachable IED or vendor simulator.\n" - status_new = status_anchor + "- **Public release** — packaged, versioned and publicly downloadable with accepted product-level evidence and an explicit claim boundary.\n" - text = replace_once(text, status_anchor, status_new, "feature matrix public-release status") - old_row = "| Sampled Values | Live MCU publisher | Planned / embedded path staged | First reference hardware is the Waveshare ESP32-S3-POE-ETH-8DI-8DO; synthetic W5500/ESP-IDF MACRAW transmission proof is required before any timing-grade claim. |" - new_rows = "| Sampled Values | Live MCU publisher | Public release / physical accepted | ESP32-P4 ARStack Studio v0.1.0 completed 10/10 Start/Stop cycles and an uninterrupted 3600-second 4000 fps retained run with zero missed slots, TX failures, health reconnects or automatic starts; `smpSynch=0` remains the truthful timing boundary. |\n| Desktop product | ARStack Studio / SMV Injector v0.1.0 | Public release | Stable Windows installer + portable package + ESP32-P4 firmware published under tag `v0.1.0`; independent SV spot-check confirmed the bounded 4I+4V / 4000 fps / 1 ASDU / 64-byte profile. |" - text = replace_once(text, old_row, new_rows, "feature matrix SMV live publisher row") - old_next = "The next gaps are association-loss and contention evidence for control, remaining MMS file-service parity and fault-record workflows, mutable SCL export/reconstruction, deterministic IED simulator/server integration, and broader application/UI parity. Sampled Values and ESP hardware work remain separate from this MMS-control tranche." - new_next = "The next gaps are association-loss and contention evidence for control, remaining MMS file-service parity and fault-record workflows, mutable SCL export/reconstruction, deterministic IED simulator/server integration, and broader application/UI parity. The SMV/ESP32-P4 P0 track is now released as stable `v0.1.0`; future process-bus timing/profile expansion remains a separate follow-on tranche rather than an open blocker for that release." - text = replace_once(text, old_next, new_next, "feature matrix next direction") - p.write_text(text, encoding="utf-8") - - # Current-state handoff: retire stale PR #19 as the current milestone without rewriting historical bench evidence. - p = Path("PROJECT_HANDOFF.md") - text = p.read_text(encoding="utf-8") - text = replace_once(text, "Last major bench update: **2026-08-10**.", "Last major product milestone update: **2026-09-15 — stable public SMV Injector v0.1.0 released**.", "handoff date") - section_pattern = re.compile(r"## 1\. Active repository work\n\n.*?(?=\n## 2\. Tested hardware/toolchain)", re.S) - section_replacement = f'''## 1. Active repository work\n\n- Repository: `masarray/arstack61850`\n- Production branch: `main`\n- SMV production merge: `{source_sha}` — PR #79\n- Stable public SMV release: [`v0.1.0`]({release_url})\n- P0.5 supervisor/physical release issue: #83 — closed\n- Legacy first-trial SV PR #15 — archived/superseded, not merged\n- IED Simulator PRs #75/#82 remain separate tracks and must not be conflated with the SMV release baseline\n\nFor current SMV product truth, start with [`docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md`](docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md). Sections below retain useful historical bench/toolchain context; where they conflict with the versioned release record, the release record and current `main` take precedence.\n''' - text, count = section_pattern.subn(section_replacement.rstrip(), text, count=1) - if count != 1: - raise SystemExit("PROJECT_HANDOFF active repository block not replaced") - p.write_text(text, encoding="utf-8") - - # This helper workflow is intentionally ephemeral; remove it from the final docs branch. - Path(".github/workflows/docs-sync-smv-v010.yml").unlink() - - - name: Commit synchronized documentation - shell: bash - run: | - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git add README.md apps/arstack_studio/README.md docs/SMV_STUDIO_P0_RELEASE.md docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md docs/FEATURE_MATRIX.md PROJECT_HANDOFF.md .github/workflows/docs-sync-smv-v010.yml - git diff --cached --check - git commit -m "docs: synchronize public SMV v0.1.0 milestone" - git push origin HEAD:docs/sync-smv-v0.1.0-milestone From 439bc65afbb17fe05ee15f6074cbdaee9bdff1b4 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Tue, 15 Sep 2026 12:50:10 +0700 Subject: [PATCH 3/4] docs: retry SMV v0.1.0 milestone synchronization --- .github/workflows/docs-sync-smv-v010-v2.yml | 126 ++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 .github/workflows/docs-sync-smv-v010-v2.yml diff --git a/.github/workflows/docs-sync-smv-v010-v2.yml b/.github/workflows/docs-sync-smv-v010-v2.yml new file mode 100644 index 000000000..06f468feb --- /dev/null +++ b/.github/workflows/docs-sync-smv-v010-v2.yml @@ -0,0 +1,126 @@ +name: Sync SMV v0.1.0 milestone docs v2 + +on: + push: + branches: + - docs/sync-smv-v0.1.0-milestone + +permissions: + contents: write + +jobs: + sync-docs: + if: github.actor != 'github-actions[bot]' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: docs/sync-smv-v0.1.0-milestone + fetch-depth: 0 + + - name: Synchronize release milestone documentation + shell: python + run: | + from pathlib import Path + import re + + release_url = "https://github.com/masarray/arstack61850/releases/tag/v0.1.0" + source_sha = "9c7fc7300220db4643e5643081240b955cfe12df" + artifact_sha = "d9b5b6848415c7e6d1c52ec929e57c66b608058d" + + def replace_once(text, old, new, label): + if old not in text: + raise SystemExit(f"missing expected block: {label}") + if text.count(old) != 1: + raise SystemExit(f"expected exactly one block for {label}; got {text.count(old)}") + return text.replace(old, new, 1) + + # Repository landing page. + p = Path("README.md") + text = p.read_text(encoding="utf-8") + intro_anchor = "The portable C++20 stack remains rooted in the ARIEC61850 behavioral model, but the project north star is now broader: build an open, deterministic IEC 61850 instrumentation platform for hardware-timestamped Sampled Values/GOOSE/PTP injection, analysis, commissioning and real-time closed-loop testing.\n" + public_block = f'''{intro_anchor}\n## Public release — SMV Injector v0.1.0\n\n**Status: STABLE PUBLIC RELEASE · 2026-09-15**\n\nARStack Studio / SMV Injector v0.1.0 is the first public production milestone of the ESP32-P4 Sampled Values track. It packages the native Windows operator application, the accepted ESP32-P4 firmware, recovery tooling, and the validated 4I+4V reference workflow.\n\n**[Download SMV Injector v0.1.0]({release_url})**\n\nPublic P0 profile:\n\n- 4 current + 4 voltage channels;\n- 4000 frames/s;\n- 1 ASDU per Ethernet frame;\n- 64-byte sample payload;\n- `smpCnt` modulus 4000;\n- `smpSynch=0` until separately measured disciplined-clock evidence exists.\n\nAccepted physical evidence includes 10/10 Start/Stop cycles, live engineering edits, an uninterrupted 3600-second retained run at 4000 fps with `missed=0`, `txFailures=0`, `healthReconnects=0`, and `automaticStarts=0`, plus an independent SV capture spot-check with continuous `smpCnt` including 3999 -> 0 wraps.\n\nRelease source target: `{source_sha}`. Accepted binary build head: `{artifact_sha}`. See [`docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md`](docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md) for immutable release provenance, hashes, scope, and the remaining non-blocking research boundary.\n''' + text = replace_once(text, intro_anchor, public_block, "README public release insert") + + start_pattern = re.compile(r"## Start here\n\n.*?\nThe project deliberately separates", re.S) + start_replacement = '''## Start here\n\nFor a new engineer or AI development thread, read these before making architecture changes:\n\n1. [`NORTH_STAR.md`](NORTH_STAR.md) — product thesis, standards, hardware roadmap and definition of success.\n2. [`docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md`](docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md) — current public SMV product milestone, release provenance and validated boundary.\n3. [`PROJECT_HANDOFF.md`](PROJECT_HANDOFF.md) — current repository handoff and separation between released SMV work and active follow-on tracks.\n4. [`apps/arstack_studio/README.md`](apps/arstack_studio/README.md) — operator workflow, firmware recovery and Windows distribution details.\n5. [`docs/ONLINE_MODEL_CONNECT_DECISION.md`](docs/ONLINE_MODEL_CONNECT_DECISION.md) — short decision contract separating full live discovery from SCL-assisted online connect.\n6. [`LIVE_DISCOVERY_PROFILE.md`](LIVE_DISCOVERY_PROFILE.md) — detailed live-discovery and online-model interoperability boundary.\n7. [`embedded/esp32p4_smv_injector/ARCHITECTURE.md`](embedded/esp32p4_smv_injector/ARCHITECTURE.md) — embedded real-time architecture boundaries.\n8. [`docs/GLOBAL_BENCHMARK.md`](docs/GLOBAL_BENCHMARK.md) — vendor-neutral standards/industry research behind the direction.\n\nThe project deliberately separates''' + text, count = start_pattern.subn(start_replacement, text, count=1) + if count != 1: + raise SystemExit("README Start here block not replaced") + + milestone_pattern = re.compile(r"## Current hardware milestone\n\n.*?(?=\n## Lineage and portable core)", re.S) + milestone_replacement = f'''## Current SMV product milestone\n\nThe P0 ESP32-P4 Sampled Values product track is **released and public** as `v0.1.0`. The stable GitHub release points to production merge `{source_sha}` and publishes a Windows installer, portable package, accepted firmware image, manifest and release checksums.\n\nPhysical acceptance retained for the public milestone:\n\n- 10/10 Start/Stop cycles passed;\n- uninterrupted 3600-second retained run held 4000 fps;\n- `missed=0`, `txFailures=0`, `healthReconnects=0`, `automaticStarts=0`;\n- independent capture confirmed the expected SV profile, one ASDU, 64-byte `seqData`, continuous `smpCnt` and 3999 -> 0 wraps;\n- `smpSynch=0` remains the truthful synchronization state.\n\nThe next process-bus research gate is measured hardware timestamp/PTP discipline and broader profile support. Those are follow-on milestones and are **not** retroactively claimed by v0.1.0.\n''' + text, count = milestone_pattern.subn(milestone_replacement.rstrip(), text, count=1) + if count != 1: + raise SystemExit("README current hardware milestone block not replaced") + p.write_text(text, encoding="utf-8") + + # Product landing README. + p = Path("apps/arstack_studio/README.md") + text = p.read_text(encoding="utf-8") + opening = "ARStack Studio is the **canonical native desktop operator surface** for the first ARStack61850 public Sampled Values release. It is a Qt 6 / C++ / QML application; the ESP32-P4 remains the deterministic real-time publisher.\n" + opening_new = f'''ARStack Studio is the **canonical native desktop operator surface** for the first ARStack61850 public Sampled Values release. It is a Qt 6 / C++ / QML application; the ESP32-P4 remains the deterministic real-time publisher.\n\n> **v0.1.0 is publicly released and stable.** Download: {release_url}\n>\n> Production source target: `{source_sha}` · accepted binary build head: `{artifact_sha}`.\n''' + text = replace_once(text, opening, opening_new, "Studio README release banner") + + windows_pattern = re.compile(r"## Windows release artifacts\n\n.*?(?=\n## Truthfulness boundary)", re.S) + windows_replacement = f'''## Windows release artifacts\n\nThe stable `v0.1.0` public release is available at:\n\n- [GitHub Release — ARStack Studio / SMV Injector v0.1.0]({release_url})\n- `ARStack-Studio-0.1.0-win-x64-setup.exe` — recommended normal installation\n- `ARStack-Studio-0.1.0-win-x64-portable.zip` — portable package\n- `arstack-esp32p4-smv-0.1.0.bin` — standalone ESP32-P4 firmware asset\n- `firmware-manifest.json`\n- `RELEASE-SHA256SUMS.txt`\n\nPublished SHA-256 values:\n\n```text\n877a35dbbe110cc8ab740d3fcdc44a63f348405dc509da3164d9aaa92e9e2622 ARStack-Studio-0.1.0-win-x64-setup.exe\n1487e90254ddc5cab0f7b917580be951311c1697bec6dc19d2e2720683f00f83 ARStack-Studio-0.1.0-win-x64-portable.zip\nfae413d7b6f65b7d10ca65dc277fbf586d487f21209a29875036791088afa9c7 arstack-esp32p4-smv-0.1.0.bin\n```\n\nBoth Windows packages contain the Qt runtime, verified ESP32-P4 firmware bundle, and pinned standalone flasher. The installer is per-user and does not require administrator elevation. The release is **stable**, not draft and not prerelease.\n''' + text, count = windows_pattern.subn(windows_replacement.rstrip(), text, count=1) + if count != 1: + raise SystemExit("Studio README Windows release block not replaced") + p.write_text(text, encoding="utf-8") + + # Embedded landing README. + p = Path("embedded/esp32p4_smv_injector/README.md") + text = p.read_text(encoding="utf-8") + embedded_intro = "This target runs the ARStack61850 Sampled Values injector on the current ESP32-P4 Ethernet development board using the internal EMAC and onboard RMII PHY.\n" + embedded_new = f'''This target runs the ARStack61850 Sampled Values injector on the current ESP32-P4 Ethernet development board using the internal EMAC and onboard RMII PHY.\n\n> **Public product milestone:** the validated 4I+4V / 4000 fps path is released as stable [`v0.1.0`]({release_url}). The broader runtime experiments documented below remain engineering follow-on work and do not expand the v0.1.0 claim boundary.\n''' + text = replace_once(text, embedded_intro, embedded_new, "embedded README release banner") + hw_pattern = re.compile(r"## Current hardware result\n\n.*?(?=\n## Runtime profile model)", re.S) + hw_replacement = '''## Current hardware result\n\nThe released P0 baseline has been proven on real ESP32-P4 hardware:\n\n- 10/10 Start/Stop cycles passed;\n- the 4I+4V reference profile retained 4000 fps for an uninterrupted 3600-second run;\n- retained telemetry reported zero missed slots, zero TX failures, zero health reconnects and zero automatic starts;\n- an independent SV capture spot-check confirmed one ASDU, 64-byte sample data, continuous `smpCnt` including 3999 -> 0 wraps, and truthful `smpSynch=0`;\n- live magnitude, phase, frequency, Quality and CT edits were exercised without turning the desktop application into the realtime sample clock.\n\nThe repository also contains broader engineering experiments, including SCL-driven alternate rates such as 4800 fps. Those experiments are not part of the stable v0.1.0 public product boundary unless a later versioned release explicitly promotes them.\n\nThis is product-level engineering evidence for the bounded v0.1.0 profile, not IEC 61850 conformance certification or a protection-grade synchronization claim.\n''' + text, count = hw_pattern.subn(hw_replacement.rstrip(), text, count=1) + if count != 1: + raise SystemExit("embedded README hardware result block not replaced") + p.write_text(text, encoding="utf-8") + + # P0 release contract becomes a release-status record while preserving honesty boundaries. + Path("docs/SMV_STUDIO_P0_RELEASE.md").write_text(f'''# ARStack Studio P0 public-release contract\n\n**Milestone status: RELEASED · stable public `v0.1.0` · 2026-09-15**\n\nPublic release: {release_url}\n\nProduction source target: `{source_sha}`\nAccepted binary build head: `{artifact_sha}`\nPublic release workflow source: ARStack Studio Release run `34918302946` (SUCCESS)\n\n## Product target\n\nThe first public ARStack Studio release is intentionally bounded to one professional workflow:\n\n> **IEC 61850 Sampled Values Injector / Generator — 4I + 4V**\n\nThe milestone packages the ESP32-P4 publisher as a usable Windows instrument without requiring the operator to install or understand the development toolchain.\n\n## P0 profile boundary\n\n- 4 current channels: `Ia`, `Ib`, `Ic`, `In`\n- 4 voltage channels: `Ua`, `Ub`, `Uc`, `Un`\n- one `INT32 value + Quality` pair per channel\n- 16 ordered FCDA leaves\n- 64-byte sample payload\n- one ASDU\n- 4000 samples/s reference profile\n- sample-counter cycle `0..3999`\n- SCL/CID/SCD/IID import remains available when the compiled stream fits the same firmware boundary\n- `smpSynch=0` until separately measured disciplined-clock evidence exists\n\nProfiles outside this layout may still be parsed and explained, but they are not v0.1.0 deployment targets and must remain blocked from deployment.\n\n## Closed work packages\n\n### P0.1 — Canonical Quick Start — CLOSED\n\n- [x] ARStack-owned 4I+4V reference SCL bundled with the native Qt application\n- [x] canonical C++ SCL parser/profile compiler path\n- [x] Class-A reference profile at 4000 fps / modulus 4000 / 64-byte payload / 16 leaves\n- [x] one-click `4I+4V Quick Start` operator path\n\n### P0.2 — Release UI / UX — CLOSED\n\n- [x] ARStack Studio is the canonical public operator surface\n- [x] device, firmware, profile and output states are explicit\n- [x] Current / Voltage matrices remain the primary work surface\n- [x] disabled Start/Deploy paths expose operator-readable reasons\n- [x] Expert diagnostics remain secondary to the normal workflow\n\n### P0.3 — ESP32-P4 firmware/session manager — CLOSED FOR v0.1.0\n\n- [x] typed semantic device identity and protocol versioning\n- [x] packaged firmware image + manifest + SHA-256 enforcement\n- [x] bounded serial ownership and firmware handoff\n- [x] reconnect verification after firmware operations\n- [x] wrong-device and incompatible-image paths fail closed\n- [x] single-instance/session ownership hardening\n\n### P0.4 — Windows public distribution — CLOSED\n\n- [x] native Release build\n- [x] bundled Qt runtime\n- [x] portable package\n- [x] Windows installer\n- [x] clean Windows package smoke\n- [x] versioned firmware bundle and manifest\n- [x] SHA-256 checksums and release provenance\n- [x] stable tagged GitHub Release `v0.1.0`\n\n### P0.5 — Physical product acceptance — ACCEPTED\n\nExecuted evidence used for the public milestone:\n\n- [x] 10/10 Start/Stop cycles\n- [x] Quick Start profile deploy/start path on the accepted physical board\n- [x] live magnitude / phase / frequency / Quality / CT edits\n- [x] Zero operation\n- [x] uninterrupted 3600-second retained run at 4000 fps\n- [x] `missed=0`, `txFailures=0`, `healthReconnects=0`, `automaticStarts=0`\n- [x] independent capture spot-check of destination MAC, APPID, VLAN/PCP, svID, confRev, one ASDU, 64-byte payload, `smpCnt` continuity and 3999 -> 0 wrap\n- [x] `smpSynch=0` truth boundary retained\n\nThe following strict-lab cases were intentionally deferred as non-blocking follow-on validation and are **not represented as completed physical PASS cases**:\n\n- [ ] exhaustive blank-board/recovery permutations across USB-driver combinations\n- [ ] exhaustive external engineering SCL physical matrix beyond the accepted P0 reference path\n- [ ] broader power-cycle/unplug/replug permutations beyond the product-owner pragmatic release gate\n\n## Published assets\n\n```text\n877a35dbbe110cc8ab740d3fcdc44a63f348405dc509da3164d9aaa92e9e2622 ARStack-Studio-0.1.0-win-x64-setup.exe\n1487e90254ddc5cab0f7b917580be951311c1697bec6dc19d2e2720683f00f83 ARStack-Studio-0.1.0-win-x64-portable.zip\nfae413d7b6f65b7d10ca65dc277fbf586d487f21209a29875036791088afa9c7 arstack-esp32p4-smv-0.1.0.bin\n```\n\n## Explicitly outside v0.1.0\n\n- generalized 3I / 8I / 8I+4V / 9I+6V / 12I+4V / 12I+8V runtime layouts\n- multi-stream publication\n- arbitrary DataSet layouts\n- COMTRADE playback as a released device data plane\n- scripted fault sequences\n- full Process Bus analyzer\n- protection-grade timing claims\n- IEC 61850 conformance/certification claims\n\nThe P0 boundary can widen only through a later versioned milestone. Public v0.1.0 remains a deliberately bounded engineering instrument release.\n''', encoding="utf-8") + + # Immutable public milestone record / documentation landing page. + Path("docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md").write_text(f'''# ARStack Studio / SMV Injector v0.1.0\n\n**Stable public release · 15 September 2026**\n\n[Download v0.1.0]({release_url})\n\n## Milestone\n\n`v0.1.0` closes the first public ARStack Sampled Values product milestone: a Windows engineering application supervising a deterministic ESP32-P4 publisher for the validated 4I+4V / 4000 fps profile.\n\nThis milestone is deliberately narrower than the full ARStack roadmap. It is a usable public engineering release, not a protection-grade timing or conformance-certification claim.\n\n## Public package\n\n- Windows x64 installer — recommended for normal use\n- Windows x64 portable package\n- ESP32-P4 firmware image\n- firmware manifest\n- release SHA-256 ledger\n- bundled firmware recovery/flash tooling inside ARStack Studio\n\n## Validated profile\n\n| Property | v0.1.0 value |\n|---|---|\n| Channels | 4 current + 4 voltage |\n| Frame rate | 4000 frames/s |\n| ASDU | 1 per frame |\n| Sample payload | 64 bytes |\n| `smpCnt` modulus | 4000 |\n| `smpSynch` | 0 |\n| Firmware protocol | ARStack protocol v1 |\n\n## Physical acceptance summary\n\nThe accepted physical board run completed:\n\n- 10/10 Start/Stop cycles;\n- live magnitude, phase, frequency, Quality and CT edits;\n- Zero;\n- uninterrupted 3600-second retained run;\n- 4000 fps minimum and maximum throughout retained telemetry;\n- zero missed sample slots;\n- zero TX failures;\n- zero health reconnects;\n- zero automatic Start events.\n\nAn independent capture spot-check contained 39,524 primary SV frames over approximately 9.881 seconds, an effective rate of approximately 3999.899 fps, zero observed `smpCnt` discontinuities, and ten 3999 -> 0 wraps. The capture matched the accepted P0 wire identity and retained `smpSynch=0`.\n\n## Release provenance\n\n| Item | Value |\n|---|---|\n| Stable tag | `v0.1.0` |\n| Production merge | `{source_sha}` |\n| Accepted binary build head | `{artifact_sha}` |\n| Release build | ARStack Studio Release run `34918302946` — SUCCESS |\n| Public publish workflow | Publish Public SMV Injector v0.1.0 run `34933705055` — SUCCESS |\n\nThe `v0.1.0` tag points directly to the production merge SHA above.\n\n## Published SHA-256\n\n```text\n877a35dbbe110cc8ab740d3fcdc44a63f348405dc509da3164d9aaa92e9e2622 ARStack-Studio-0.1.0-win-x64-setup.exe\n1487e90254ddc5cab0f7b917580be951311c1697bec6dc19d2e2720683f00f83 ARStack-Studio-0.1.0-win-x64-portable.zip\nfae413d7b6f65b7d10ca65dc277fbf586d487f21209a29875036791088afa9c7 arstack-esp32p4-smv-0.1.0.bin\n```\n\n## Product boundary after this milestone\n\nThe next SMV work may expand timing evidence, profiles, multi-stream support, replay/sequencing and interoperability. None of that changes the truth of this release:\n\n> v0.1.0 is the stable public 4I+4V / 4000 fps engineering-instrument baseline.\n\nIED Simulator / IEC 61850 Workbench development is a separate product track and should not be used to redefine the v0.1.0 SMV acceptance boundary.\n''', encoding="utf-8") + + # Feature matrix: synchronize only SMV product rows and terminology. + p = Path("docs/FEATURE_MATRIX.md") + text = p.read_text(encoding="utf-8") + status_anchor = "- **Live-proven** — exercised against a reachable IED or vendor simulator.\n" + status_new = status_anchor + "- **Public release** — packaged, versioned and publicly downloadable with accepted product-level evidence and an explicit claim boundary.\n" + text = replace_once(text, status_anchor, status_new, "feature matrix public-release status") + old_row = "| Sampled Values | Live MCU publisher | Planned / embedded path staged | First reference hardware is the Waveshare ESP32-S3-POE-ETH-8DI-8DO; synthetic W5500/ESP-IDF MACRAW transmission proof is required before any timing-grade claim. |" + new_rows = "| Sampled Values | Live MCU publisher | Public release / physical accepted | ESP32-P4 ARStack Studio v0.1.0 completed 10/10 Start/Stop cycles and an uninterrupted 3600-second 4000 fps retained run with zero missed slots, TX failures, health reconnects or automatic starts; `smpSynch=0` remains the truthful timing boundary. |\n| Desktop product | ARStack Studio / SMV Injector v0.1.0 | Public release | Stable Windows installer + portable package + ESP32-P4 firmware published under tag `v0.1.0`; independent SV spot-check confirmed the bounded 4I+4V / 4000 fps / 1 ASDU / 64-byte profile. |" + text = replace_once(text, old_row, new_rows, "feature matrix SMV live publisher row") + old_next = "The next gaps are association-loss and contention evidence for control, remaining MMS file-service parity and fault-record workflows, mutable SCL export/reconstruction, deterministic IED simulator/server integration, and broader application/UI parity. Sampled Values and ESP hardware work remain separate from this MMS-control tranche." + new_next = "The next gaps are association-loss and contention evidence for control, remaining MMS file-service parity and fault-record workflows, mutable SCL export/reconstruction, deterministic IED simulator/server integration, and broader application/UI parity. The SMV/ESP32-P4 P0 track is now released as stable `v0.1.0`; future process-bus timing/profile expansion remains a separate follow-on tranche rather than an open blocker for that release." + text = replace_once(text, old_next, new_next, "feature matrix next direction") + p.write_text(text, encoding="utf-8") + + # Current-state handoff: retire stale PR #19 as the current milestone without rewriting historical bench evidence. + p = Path("PROJECT_HANDOFF.md") + text = p.read_text(encoding="utf-8") + text = replace_once(text, "Last major bench update: **2026-08-10**.", "Last major product milestone update: **2026-09-15 — stable public SMV Injector v0.1.0 released**.", "handoff date") + section_pattern = re.compile(r"## 1\. Active repository work\n\n.*?(?=\n## 2\. Tested hardware/toolchain)", re.S) + section_replacement = f'''## 1. Active repository work\n\n- Repository: `masarray/arstack61850`\n- Production branch: `main`\n- SMV production merge: `{source_sha}` — PR #79\n- Stable public SMV release: [`v0.1.0`]({release_url})\n- P0.5 supervisor/physical release issue: #83 — closed\n- Legacy first-trial SV PR #15 — archived/superseded, not merged\n- IED Simulator PRs #75/#82 remain separate tracks and must not be conflated with the SMV release baseline\n\nFor current SMV product truth, start with [`docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md`](docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md). Sections below retain useful historical bench/toolchain context; where they conflict with the versioned release record, the release record and current `main` take precedence.\n''' + text, count = section_pattern.subn(section_replacement.rstrip(), text, count=1) + if count != 1: + raise SystemExit("PROJECT_HANDOFF active repository block not replaced") + p.write_text(text, encoding="utf-8") + + Path(".github/workflows/docs-sync-smv-v010-v2.yml").unlink() + + - name: Commit synchronized documentation + shell: bash + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add README.md apps/arstack_studio/README.md embedded/esp32p4_smv_injector/README.md docs/SMV_STUDIO_P0_RELEASE.md docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md docs/FEATURE_MATRIX.md PROJECT_HANDOFF.md .github/workflows/docs-sync-smv-v010-v2.yml + git diff --cached --check + git commit -m "docs: synchronize public SMV v0.1.0 milestone" + git push origin HEAD:docs/sync-smv-v0.1.0-milestone From 476a167f0d864bd374a62a7d8d32a64929670e71 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 15 Sep 2026 05:50:34 +0000 Subject: [PATCH 4/4] docs: synchronize public SMV v0.1.0 milestone --- .github/workflows/docs-sync-smv-v010-v2.yml | 126 ----------------- PROJECT_HANDOFF.md | 17 +-- README.md | 54 +++++--- apps/arstack_studio/README.md | 24 +++- docs/FEATURE_MATRIX.md | 6 +- docs/SMV_STUDIO_P0_RELEASE.md | 143 +++++++++++--------- docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md | 76 +++++++++++ embedded/esp32p4_smv_injector/README.md | 21 ++- 8 files changed, 235 insertions(+), 232 deletions(-) delete mode 100644 .github/workflows/docs-sync-smv-v010-v2.yml create mode 100644 docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md diff --git a/.github/workflows/docs-sync-smv-v010-v2.yml b/.github/workflows/docs-sync-smv-v010-v2.yml deleted file mode 100644 index 06f468feb..000000000 --- a/.github/workflows/docs-sync-smv-v010-v2.yml +++ /dev/null @@ -1,126 +0,0 @@ -name: Sync SMV v0.1.0 milestone docs v2 - -on: - push: - branches: - - docs/sync-smv-v0.1.0-milestone - -permissions: - contents: write - -jobs: - sync-docs: - if: github.actor != 'github-actions[bot]' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: docs/sync-smv-v0.1.0-milestone - fetch-depth: 0 - - - name: Synchronize release milestone documentation - shell: python - run: | - from pathlib import Path - import re - - release_url = "https://github.com/masarray/arstack61850/releases/tag/v0.1.0" - source_sha = "9c7fc7300220db4643e5643081240b955cfe12df" - artifact_sha = "d9b5b6848415c7e6d1c52ec929e57c66b608058d" - - def replace_once(text, old, new, label): - if old not in text: - raise SystemExit(f"missing expected block: {label}") - if text.count(old) != 1: - raise SystemExit(f"expected exactly one block for {label}; got {text.count(old)}") - return text.replace(old, new, 1) - - # Repository landing page. - p = Path("README.md") - text = p.read_text(encoding="utf-8") - intro_anchor = "The portable C++20 stack remains rooted in the ARIEC61850 behavioral model, but the project north star is now broader: build an open, deterministic IEC 61850 instrumentation platform for hardware-timestamped Sampled Values/GOOSE/PTP injection, analysis, commissioning and real-time closed-loop testing.\n" - public_block = f'''{intro_anchor}\n## Public release — SMV Injector v0.1.0\n\n**Status: STABLE PUBLIC RELEASE · 2026-09-15**\n\nARStack Studio / SMV Injector v0.1.0 is the first public production milestone of the ESP32-P4 Sampled Values track. It packages the native Windows operator application, the accepted ESP32-P4 firmware, recovery tooling, and the validated 4I+4V reference workflow.\n\n**[Download SMV Injector v0.1.0]({release_url})**\n\nPublic P0 profile:\n\n- 4 current + 4 voltage channels;\n- 4000 frames/s;\n- 1 ASDU per Ethernet frame;\n- 64-byte sample payload;\n- `smpCnt` modulus 4000;\n- `smpSynch=0` until separately measured disciplined-clock evidence exists.\n\nAccepted physical evidence includes 10/10 Start/Stop cycles, live engineering edits, an uninterrupted 3600-second retained run at 4000 fps with `missed=0`, `txFailures=0`, `healthReconnects=0`, and `automaticStarts=0`, plus an independent SV capture spot-check with continuous `smpCnt` including 3999 -> 0 wraps.\n\nRelease source target: `{source_sha}`. Accepted binary build head: `{artifact_sha}`. See [`docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md`](docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md) for immutable release provenance, hashes, scope, and the remaining non-blocking research boundary.\n''' - text = replace_once(text, intro_anchor, public_block, "README public release insert") - - start_pattern = re.compile(r"## Start here\n\n.*?\nThe project deliberately separates", re.S) - start_replacement = '''## Start here\n\nFor a new engineer or AI development thread, read these before making architecture changes:\n\n1. [`NORTH_STAR.md`](NORTH_STAR.md) — product thesis, standards, hardware roadmap and definition of success.\n2. [`docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md`](docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md) — current public SMV product milestone, release provenance and validated boundary.\n3. [`PROJECT_HANDOFF.md`](PROJECT_HANDOFF.md) — current repository handoff and separation between released SMV work and active follow-on tracks.\n4. [`apps/arstack_studio/README.md`](apps/arstack_studio/README.md) — operator workflow, firmware recovery and Windows distribution details.\n5. [`docs/ONLINE_MODEL_CONNECT_DECISION.md`](docs/ONLINE_MODEL_CONNECT_DECISION.md) — short decision contract separating full live discovery from SCL-assisted online connect.\n6. [`LIVE_DISCOVERY_PROFILE.md`](LIVE_DISCOVERY_PROFILE.md) — detailed live-discovery and online-model interoperability boundary.\n7. [`embedded/esp32p4_smv_injector/ARCHITECTURE.md`](embedded/esp32p4_smv_injector/ARCHITECTURE.md) — embedded real-time architecture boundaries.\n8. [`docs/GLOBAL_BENCHMARK.md`](docs/GLOBAL_BENCHMARK.md) — vendor-neutral standards/industry research behind the direction.\n\nThe project deliberately separates''' - text, count = start_pattern.subn(start_replacement, text, count=1) - if count != 1: - raise SystemExit("README Start here block not replaced") - - milestone_pattern = re.compile(r"## Current hardware milestone\n\n.*?(?=\n## Lineage and portable core)", re.S) - milestone_replacement = f'''## Current SMV product milestone\n\nThe P0 ESP32-P4 Sampled Values product track is **released and public** as `v0.1.0`. The stable GitHub release points to production merge `{source_sha}` and publishes a Windows installer, portable package, accepted firmware image, manifest and release checksums.\n\nPhysical acceptance retained for the public milestone:\n\n- 10/10 Start/Stop cycles passed;\n- uninterrupted 3600-second retained run held 4000 fps;\n- `missed=0`, `txFailures=0`, `healthReconnects=0`, `automaticStarts=0`;\n- independent capture confirmed the expected SV profile, one ASDU, 64-byte `seqData`, continuous `smpCnt` and 3999 -> 0 wraps;\n- `smpSynch=0` remains the truthful synchronization state.\n\nThe next process-bus research gate is measured hardware timestamp/PTP discipline and broader profile support. Those are follow-on milestones and are **not** retroactively claimed by v0.1.0.\n''' - text, count = milestone_pattern.subn(milestone_replacement.rstrip(), text, count=1) - if count != 1: - raise SystemExit("README current hardware milestone block not replaced") - p.write_text(text, encoding="utf-8") - - # Product landing README. - p = Path("apps/arstack_studio/README.md") - text = p.read_text(encoding="utf-8") - opening = "ARStack Studio is the **canonical native desktop operator surface** for the first ARStack61850 public Sampled Values release. It is a Qt 6 / C++ / QML application; the ESP32-P4 remains the deterministic real-time publisher.\n" - opening_new = f'''ARStack Studio is the **canonical native desktop operator surface** for the first ARStack61850 public Sampled Values release. It is a Qt 6 / C++ / QML application; the ESP32-P4 remains the deterministic real-time publisher.\n\n> **v0.1.0 is publicly released and stable.** Download: {release_url}\n>\n> Production source target: `{source_sha}` · accepted binary build head: `{artifact_sha}`.\n''' - text = replace_once(text, opening, opening_new, "Studio README release banner") - - windows_pattern = re.compile(r"## Windows release artifacts\n\n.*?(?=\n## Truthfulness boundary)", re.S) - windows_replacement = f'''## Windows release artifacts\n\nThe stable `v0.1.0` public release is available at:\n\n- [GitHub Release — ARStack Studio / SMV Injector v0.1.0]({release_url})\n- `ARStack-Studio-0.1.0-win-x64-setup.exe` — recommended normal installation\n- `ARStack-Studio-0.1.0-win-x64-portable.zip` — portable package\n- `arstack-esp32p4-smv-0.1.0.bin` — standalone ESP32-P4 firmware asset\n- `firmware-manifest.json`\n- `RELEASE-SHA256SUMS.txt`\n\nPublished SHA-256 values:\n\n```text\n877a35dbbe110cc8ab740d3fcdc44a63f348405dc509da3164d9aaa92e9e2622 ARStack-Studio-0.1.0-win-x64-setup.exe\n1487e90254ddc5cab0f7b917580be951311c1697bec6dc19d2e2720683f00f83 ARStack-Studio-0.1.0-win-x64-portable.zip\nfae413d7b6f65b7d10ca65dc277fbf586d487f21209a29875036791088afa9c7 arstack-esp32p4-smv-0.1.0.bin\n```\n\nBoth Windows packages contain the Qt runtime, verified ESP32-P4 firmware bundle, and pinned standalone flasher. The installer is per-user and does not require administrator elevation. The release is **stable**, not draft and not prerelease.\n''' - text, count = windows_pattern.subn(windows_replacement.rstrip(), text, count=1) - if count != 1: - raise SystemExit("Studio README Windows release block not replaced") - p.write_text(text, encoding="utf-8") - - # Embedded landing README. - p = Path("embedded/esp32p4_smv_injector/README.md") - text = p.read_text(encoding="utf-8") - embedded_intro = "This target runs the ARStack61850 Sampled Values injector on the current ESP32-P4 Ethernet development board using the internal EMAC and onboard RMII PHY.\n" - embedded_new = f'''This target runs the ARStack61850 Sampled Values injector on the current ESP32-P4 Ethernet development board using the internal EMAC and onboard RMII PHY.\n\n> **Public product milestone:** the validated 4I+4V / 4000 fps path is released as stable [`v0.1.0`]({release_url}). The broader runtime experiments documented below remain engineering follow-on work and do not expand the v0.1.0 claim boundary.\n''' - text = replace_once(text, embedded_intro, embedded_new, "embedded README release banner") - hw_pattern = re.compile(r"## Current hardware result\n\n.*?(?=\n## Runtime profile model)", re.S) - hw_replacement = '''## Current hardware result\n\nThe released P0 baseline has been proven on real ESP32-P4 hardware:\n\n- 10/10 Start/Stop cycles passed;\n- the 4I+4V reference profile retained 4000 fps for an uninterrupted 3600-second run;\n- retained telemetry reported zero missed slots, zero TX failures, zero health reconnects and zero automatic starts;\n- an independent SV capture spot-check confirmed one ASDU, 64-byte sample data, continuous `smpCnt` including 3999 -> 0 wraps, and truthful `smpSynch=0`;\n- live magnitude, phase, frequency, Quality and CT edits were exercised without turning the desktop application into the realtime sample clock.\n\nThe repository also contains broader engineering experiments, including SCL-driven alternate rates such as 4800 fps. Those experiments are not part of the stable v0.1.0 public product boundary unless a later versioned release explicitly promotes them.\n\nThis is product-level engineering evidence for the bounded v0.1.0 profile, not IEC 61850 conformance certification or a protection-grade synchronization claim.\n''' - text, count = hw_pattern.subn(hw_replacement.rstrip(), text, count=1) - if count != 1: - raise SystemExit("embedded README hardware result block not replaced") - p.write_text(text, encoding="utf-8") - - # P0 release contract becomes a release-status record while preserving honesty boundaries. - Path("docs/SMV_STUDIO_P0_RELEASE.md").write_text(f'''# ARStack Studio P0 public-release contract\n\n**Milestone status: RELEASED · stable public `v0.1.0` · 2026-09-15**\n\nPublic release: {release_url}\n\nProduction source target: `{source_sha}`\nAccepted binary build head: `{artifact_sha}`\nPublic release workflow source: ARStack Studio Release run `34918302946` (SUCCESS)\n\n## Product target\n\nThe first public ARStack Studio release is intentionally bounded to one professional workflow:\n\n> **IEC 61850 Sampled Values Injector / Generator — 4I + 4V**\n\nThe milestone packages the ESP32-P4 publisher as a usable Windows instrument without requiring the operator to install or understand the development toolchain.\n\n## P0 profile boundary\n\n- 4 current channels: `Ia`, `Ib`, `Ic`, `In`\n- 4 voltage channels: `Ua`, `Ub`, `Uc`, `Un`\n- one `INT32 value + Quality` pair per channel\n- 16 ordered FCDA leaves\n- 64-byte sample payload\n- one ASDU\n- 4000 samples/s reference profile\n- sample-counter cycle `0..3999`\n- SCL/CID/SCD/IID import remains available when the compiled stream fits the same firmware boundary\n- `smpSynch=0` until separately measured disciplined-clock evidence exists\n\nProfiles outside this layout may still be parsed and explained, but they are not v0.1.0 deployment targets and must remain blocked from deployment.\n\n## Closed work packages\n\n### P0.1 — Canonical Quick Start — CLOSED\n\n- [x] ARStack-owned 4I+4V reference SCL bundled with the native Qt application\n- [x] canonical C++ SCL parser/profile compiler path\n- [x] Class-A reference profile at 4000 fps / modulus 4000 / 64-byte payload / 16 leaves\n- [x] one-click `4I+4V Quick Start` operator path\n\n### P0.2 — Release UI / UX — CLOSED\n\n- [x] ARStack Studio is the canonical public operator surface\n- [x] device, firmware, profile and output states are explicit\n- [x] Current / Voltage matrices remain the primary work surface\n- [x] disabled Start/Deploy paths expose operator-readable reasons\n- [x] Expert diagnostics remain secondary to the normal workflow\n\n### P0.3 — ESP32-P4 firmware/session manager — CLOSED FOR v0.1.0\n\n- [x] typed semantic device identity and protocol versioning\n- [x] packaged firmware image + manifest + SHA-256 enforcement\n- [x] bounded serial ownership and firmware handoff\n- [x] reconnect verification after firmware operations\n- [x] wrong-device and incompatible-image paths fail closed\n- [x] single-instance/session ownership hardening\n\n### P0.4 — Windows public distribution — CLOSED\n\n- [x] native Release build\n- [x] bundled Qt runtime\n- [x] portable package\n- [x] Windows installer\n- [x] clean Windows package smoke\n- [x] versioned firmware bundle and manifest\n- [x] SHA-256 checksums and release provenance\n- [x] stable tagged GitHub Release `v0.1.0`\n\n### P0.5 — Physical product acceptance — ACCEPTED\n\nExecuted evidence used for the public milestone:\n\n- [x] 10/10 Start/Stop cycles\n- [x] Quick Start profile deploy/start path on the accepted physical board\n- [x] live magnitude / phase / frequency / Quality / CT edits\n- [x] Zero operation\n- [x] uninterrupted 3600-second retained run at 4000 fps\n- [x] `missed=0`, `txFailures=0`, `healthReconnects=0`, `automaticStarts=0`\n- [x] independent capture spot-check of destination MAC, APPID, VLAN/PCP, svID, confRev, one ASDU, 64-byte payload, `smpCnt` continuity and 3999 -> 0 wrap\n- [x] `smpSynch=0` truth boundary retained\n\nThe following strict-lab cases were intentionally deferred as non-blocking follow-on validation and are **not represented as completed physical PASS cases**:\n\n- [ ] exhaustive blank-board/recovery permutations across USB-driver combinations\n- [ ] exhaustive external engineering SCL physical matrix beyond the accepted P0 reference path\n- [ ] broader power-cycle/unplug/replug permutations beyond the product-owner pragmatic release gate\n\n## Published assets\n\n```text\n877a35dbbe110cc8ab740d3fcdc44a63f348405dc509da3164d9aaa92e9e2622 ARStack-Studio-0.1.0-win-x64-setup.exe\n1487e90254ddc5cab0f7b917580be951311c1697bec6dc19d2e2720683f00f83 ARStack-Studio-0.1.0-win-x64-portable.zip\nfae413d7b6f65b7d10ca65dc277fbf586d487f21209a29875036791088afa9c7 arstack-esp32p4-smv-0.1.0.bin\n```\n\n## Explicitly outside v0.1.0\n\n- generalized 3I / 8I / 8I+4V / 9I+6V / 12I+4V / 12I+8V runtime layouts\n- multi-stream publication\n- arbitrary DataSet layouts\n- COMTRADE playback as a released device data plane\n- scripted fault sequences\n- full Process Bus analyzer\n- protection-grade timing claims\n- IEC 61850 conformance/certification claims\n\nThe P0 boundary can widen only through a later versioned milestone. Public v0.1.0 remains a deliberately bounded engineering instrument release.\n''', encoding="utf-8") - - # Immutable public milestone record / documentation landing page. - Path("docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md").write_text(f'''# ARStack Studio / SMV Injector v0.1.0\n\n**Stable public release · 15 September 2026**\n\n[Download v0.1.0]({release_url})\n\n## Milestone\n\n`v0.1.0` closes the first public ARStack Sampled Values product milestone: a Windows engineering application supervising a deterministic ESP32-P4 publisher for the validated 4I+4V / 4000 fps profile.\n\nThis milestone is deliberately narrower than the full ARStack roadmap. It is a usable public engineering release, not a protection-grade timing or conformance-certification claim.\n\n## Public package\n\n- Windows x64 installer — recommended for normal use\n- Windows x64 portable package\n- ESP32-P4 firmware image\n- firmware manifest\n- release SHA-256 ledger\n- bundled firmware recovery/flash tooling inside ARStack Studio\n\n## Validated profile\n\n| Property | v0.1.0 value |\n|---|---|\n| Channels | 4 current + 4 voltage |\n| Frame rate | 4000 frames/s |\n| ASDU | 1 per frame |\n| Sample payload | 64 bytes |\n| `smpCnt` modulus | 4000 |\n| `smpSynch` | 0 |\n| Firmware protocol | ARStack protocol v1 |\n\n## Physical acceptance summary\n\nThe accepted physical board run completed:\n\n- 10/10 Start/Stop cycles;\n- live magnitude, phase, frequency, Quality and CT edits;\n- Zero;\n- uninterrupted 3600-second retained run;\n- 4000 fps minimum and maximum throughout retained telemetry;\n- zero missed sample slots;\n- zero TX failures;\n- zero health reconnects;\n- zero automatic Start events.\n\nAn independent capture spot-check contained 39,524 primary SV frames over approximately 9.881 seconds, an effective rate of approximately 3999.899 fps, zero observed `smpCnt` discontinuities, and ten 3999 -> 0 wraps. The capture matched the accepted P0 wire identity and retained `smpSynch=0`.\n\n## Release provenance\n\n| Item | Value |\n|---|---|\n| Stable tag | `v0.1.0` |\n| Production merge | `{source_sha}` |\n| Accepted binary build head | `{artifact_sha}` |\n| Release build | ARStack Studio Release run `34918302946` — SUCCESS |\n| Public publish workflow | Publish Public SMV Injector v0.1.0 run `34933705055` — SUCCESS |\n\nThe `v0.1.0` tag points directly to the production merge SHA above.\n\n## Published SHA-256\n\n```text\n877a35dbbe110cc8ab740d3fcdc44a63f348405dc509da3164d9aaa92e9e2622 ARStack-Studio-0.1.0-win-x64-setup.exe\n1487e90254ddc5cab0f7b917580be951311c1697bec6dc19d2e2720683f00f83 ARStack-Studio-0.1.0-win-x64-portable.zip\nfae413d7b6f65b7d10ca65dc277fbf586d487f21209a29875036791088afa9c7 arstack-esp32p4-smv-0.1.0.bin\n```\n\n## Product boundary after this milestone\n\nThe next SMV work may expand timing evidence, profiles, multi-stream support, replay/sequencing and interoperability. None of that changes the truth of this release:\n\n> v0.1.0 is the stable public 4I+4V / 4000 fps engineering-instrument baseline.\n\nIED Simulator / IEC 61850 Workbench development is a separate product track and should not be used to redefine the v0.1.0 SMV acceptance boundary.\n''', encoding="utf-8") - - # Feature matrix: synchronize only SMV product rows and terminology. - p = Path("docs/FEATURE_MATRIX.md") - text = p.read_text(encoding="utf-8") - status_anchor = "- **Live-proven** — exercised against a reachable IED or vendor simulator.\n" - status_new = status_anchor + "- **Public release** — packaged, versioned and publicly downloadable with accepted product-level evidence and an explicit claim boundary.\n" - text = replace_once(text, status_anchor, status_new, "feature matrix public-release status") - old_row = "| Sampled Values | Live MCU publisher | Planned / embedded path staged | First reference hardware is the Waveshare ESP32-S3-POE-ETH-8DI-8DO; synthetic W5500/ESP-IDF MACRAW transmission proof is required before any timing-grade claim. |" - new_rows = "| Sampled Values | Live MCU publisher | Public release / physical accepted | ESP32-P4 ARStack Studio v0.1.0 completed 10/10 Start/Stop cycles and an uninterrupted 3600-second 4000 fps retained run with zero missed slots, TX failures, health reconnects or automatic starts; `smpSynch=0` remains the truthful timing boundary. |\n| Desktop product | ARStack Studio / SMV Injector v0.1.0 | Public release | Stable Windows installer + portable package + ESP32-P4 firmware published under tag `v0.1.0`; independent SV spot-check confirmed the bounded 4I+4V / 4000 fps / 1 ASDU / 64-byte profile. |" - text = replace_once(text, old_row, new_rows, "feature matrix SMV live publisher row") - old_next = "The next gaps are association-loss and contention evidence for control, remaining MMS file-service parity and fault-record workflows, mutable SCL export/reconstruction, deterministic IED simulator/server integration, and broader application/UI parity. Sampled Values and ESP hardware work remain separate from this MMS-control tranche." - new_next = "The next gaps are association-loss and contention evidence for control, remaining MMS file-service parity and fault-record workflows, mutable SCL export/reconstruction, deterministic IED simulator/server integration, and broader application/UI parity. The SMV/ESP32-P4 P0 track is now released as stable `v0.1.0`; future process-bus timing/profile expansion remains a separate follow-on tranche rather than an open blocker for that release." - text = replace_once(text, old_next, new_next, "feature matrix next direction") - p.write_text(text, encoding="utf-8") - - # Current-state handoff: retire stale PR #19 as the current milestone without rewriting historical bench evidence. - p = Path("PROJECT_HANDOFF.md") - text = p.read_text(encoding="utf-8") - text = replace_once(text, "Last major bench update: **2026-08-10**.", "Last major product milestone update: **2026-09-15 — stable public SMV Injector v0.1.0 released**.", "handoff date") - section_pattern = re.compile(r"## 1\. Active repository work\n\n.*?(?=\n## 2\. Tested hardware/toolchain)", re.S) - section_replacement = f'''## 1. Active repository work\n\n- Repository: `masarray/arstack61850`\n- Production branch: `main`\n- SMV production merge: `{source_sha}` — PR #79\n- Stable public SMV release: [`v0.1.0`]({release_url})\n- P0.5 supervisor/physical release issue: #83 — closed\n- Legacy first-trial SV PR #15 — archived/superseded, not merged\n- IED Simulator PRs #75/#82 remain separate tracks and must not be conflated with the SMV release baseline\n\nFor current SMV product truth, start with [`docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md`](docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md). Sections below retain useful historical bench/toolchain context; where they conflict with the versioned release record, the release record and current `main` take precedence.\n''' - text, count = section_pattern.subn(section_replacement.rstrip(), text, count=1) - if count != 1: - raise SystemExit("PROJECT_HANDOFF active repository block not replaced") - p.write_text(text, encoding="utf-8") - - Path(".github/workflows/docs-sync-smv-v010-v2.yml").unlink() - - - name: Commit synchronized documentation - shell: bash - run: | - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git add README.md apps/arstack_studio/README.md embedded/esp32p4_smv_injector/README.md docs/SMV_STUDIO_P0_RELEASE.md docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md docs/FEATURE_MATRIX.md PROJECT_HANDOFF.md .github/workflows/docs-sync-smv-v010-v2.yml - git diff --cached --check - git commit -m "docs: synchronize public SMV v0.1.0 milestone" - git push origin HEAD:docs/sync-smv-v0.1.0-milestone diff --git a/PROJECT_HANDOFF.md b/PROJECT_HANDOFF.md index 6df09a917..6bf39c92e 100644 --- a/PROJECT_HANDOFF.md +++ b/PROJECT_HANDOFF.md @@ -2,18 +2,19 @@ This file is the **current-state handoff** for a new engineer or AI thread. Read [`NORTH_STAR.md`](NORTH_STAR.md) first for the long-term direction, then use this file to continue active development without reconstructing the bench history from chat. -Last major bench update: **2026-08-10**. +Last major product milestone update: **2026-09-15 — stable public SMV Injector v0.1.0 released**. ## 1. Active repository work - Repository: `masarray/arstack61850` -- Active branch: `feature/esp32p4-smv-injector-p0-p1` -- Active PR: **#19 — Add ESP32-P4-ETH SMV injector P0/P1 and P2 50 Hz realtime foundation** -- Timing evidence issue: **#21** -- Standards-first SCL/profile/PTP roadmap: **#24** - -Do not assume PR #19 is merged. Check its current head and CI before branching new embedded work. - +- Production branch: `main` +- SMV production merge: `9c7fc7300220db4643e5643081240b955cfe12df` — PR #79 +- Stable public SMV release: [`v0.1.0`](https://github.com/masarray/arstack61850/releases/tag/v0.1.0) +- P0.5 supervisor/physical release issue: #83 — closed +- Legacy first-trial SV PR #15 — archived/superseded, not merged +- IED Simulator PRs #75/#82 remain separate tracks and must not be conflated with the SMV release baseline + +For current SMV product truth, start with [`docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md`](docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md). Sections below retain useful historical bench/toolchain context; where they conflict with the versioned release record, the release record and current `main` take precedence. ## 2. Tested hardware/toolchain ### Device diff --git a/README.md b/README.md index dcd2fb546..9218e4223 100644 --- a/README.md +++ b/README.md @@ -6,35 +6,55 @@ ARStack61850 is the real-time, hardware-aware evolution of ARIEC61850. The portable C++20 stack remains rooted in the ARIEC61850 behavioral model, but the project north star is now broader: build an open, deterministic IEC 61850 instrumentation platform for hardware-timestamped Sampled Values/GOOSE/PTP injection, analysis, commissioning and real-time closed-loop testing. +## Public release — SMV Injector v0.1.0 + +**Status: STABLE PUBLIC RELEASE · 2026-09-15** + +ARStack Studio / SMV Injector v0.1.0 is the first public production milestone of the ESP32-P4 Sampled Values track. It packages the native Windows operator application, the accepted ESP32-P4 firmware, recovery tooling, and the validated 4I+4V reference workflow. + +**[Download SMV Injector v0.1.0](https://github.com/masarray/arstack61850/releases/tag/v0.1.0)** + +Public P0 profile: + +- 4 current + 4 voltage channels; +- 4000 frames/s; +- 1 ASDU per Ethernet frame; +- 64-byte sample payload; +- `smpCnt` modulus 4000; +- `smpSynch=0` until separately measured disciplined-clock evidence exists. + +Accepted physical evidence includes 10/10 Start/Stop cycles, live engineering edits, an uninterrupted 3600-second retained run at 4000 fps with `missed=0`, `txFailures=0`, `healthReconnects=0`, and `automaticStarts=0`, plus an independent SV capture spot-check with continuous `smpCnt` including 3999 -> 0 wraps. + +Release source target: `9c7fc7300220db4643e5643081240b955cfe12df`. Accepted binary build head: `d9b5b6848415c7e6d1c52ec929e57c66b608058d`. See [`docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md`](docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md) for immutable release provenance, hashes, scope, and the remaining non-blocking research boundary. + ## Start here For a new engineer or AI development thread, read these before making architecture changes: 1. [`NORTH_STAR.md`](NORTH_STAR.md) — product thesis, standards, hardware roadmap and definition of success. -2. [`PROJECT_HANDOFF.md`](PROJECT_HANDOFF.md) — current ESP32-P4 bench status and immediate next work. -3. [`docs/ONLINE_MODEL_CONNECT_DECISION.md`](docs/ONLINE_MODEL_CONNECT_DECISION.md) — short decision contract separating full live discovery from SCL-assisted online connect. -4. [`LIVE_DISCOVERY_PROFILE.md`](LIVE_DISCOVERY_PROFILE.md) — detailed live-discovery and online-model interoperability boundary. -5. [`embedded/esp32p4_smv_injector/ARCHITECTURE.md`](embedded/esp32p4_smv_injector/ARCHITECTURE.md) — embedded real-time architecture boundaries. -6. [`docs/GLOBAL_BENCHMARK.md`](docs/GLOBAL_BENCHMARK.md) — vendor-neutral standards/industry research behind the direction. -7. Issue #21 — deterministic SV timing-evidence gate. -8. Issue #24 — standards-first SCL/profile/PTP roadmap. -9. PR #19 — current ESP32-P4 hardware implementation under bench validation. +2. [`docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md`](docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md) — current public SMV product milestone, release provenance and validated boundary. +3. [`PROJECT_HANDOFF.md`](PROJECT_HANDOFF.md) — current repository handoff and separation between released SMV work and active follow-on tracks. +4. [`apps/arstack_studio/README.md`](apps/arstack_studio/README.md) — operator workflow, firmware recovery and Windows distribution details. +5. [`docs/ONLINE_MODEL_CONNECT_DECISION.md`](docs/ONLINE_MODEL_CONNECT_DECISION.md) — short decision contract separating full live discovery from SCL-assisted online connect. +6. [`LIVE_DISCOVERY_PROFILE.md`](LIVE_DISCOVERY_PROFILE.md) — detailed live-discovery and online-model interoperability boundary. +7. [`embedded/esp32p4_smv_injector/ARCHITECTURE.md`](embedded/esp32p4_smv_injector/ARCHITECTURE.md) — embedded real-time architecture boundaries. +8. [`docs/GLOBAL_BENCHMARK.md`](docs/GLOBAL_BENCHMARK.md) — vendor-neutral standards/industry research behind the direction. The project deliberately separates **wire facts**, **configured expectations**, **profile claims**, and **synchronization evidence**. A packet that decodes in a host capture tool is not, by itself, a conformance or timing claim. -## Current hardware milestone +## Current SMV product milestone -The active ESP32-P4 work has demonstrated on a real development bench: +The P0 ESP32-P4 Sampled Values product track is **released and public** as `v0.1.0`. The stable GitHub release points to production merge `9c7fc7300220db4643e5643081240b955cfe12df` and publishes a Windows installer, portable package, accepted firmware image, manifest and release checksums. -- ESP32-P4 rev 1.3 + onboard RMII PHY bring-up; -- raw Ethernet TX reaching a host capture path; -- independently decoded IEC 61850 Sampled Values frames; -- GPTimer/FreeRTOS-driven 50 Hz / 80 samples-per-cycle publishing at about 4000 samples/s; -- stable observed runs with zero device-side TX failures and zero missed GPTimer notifications; -- balanced three-phase waveform reconstruction on a separate lab diagnostic stream. +Physical acceptance retained for the public milestone: -The next timing gate is **ESP32-P4 EMAC IEEE1588v2 hardware timestamp evidence**, not tuning the publisher against host USB-Ethernet arrival jitter. +- 10/10 Start/Stop cycles passed; +- uninterrupted 3600-second retained run held 4000 fps; +- `missed=0`, `txFailures=0`, `healthReconnects=0`, `automaticStarts=0`; +- independent capture confirmed the expected SV profile, one ASDU, 64-byte `seqData`, continuous `smpCnt` and 3999 -> 0 wraps; +- `smpSynch=0` remains the truthful synchronization state. +The next process-bus research gate is measured hardware timestamp/PTP discipline and broader profile support. Those are follow-on milestones and are **not** retroactively claimed by v0.1.0. ## Lineage and portable core The original work began as an incremental C++20 migration of the ARIEC61850 C# protocol stack. The C# implementation remains a behavioral oracle where cross-language equivalence is still useful, while ARStack-specific work adds deterministic RTOS/hardware execution and evidence that a normal desktop stack cannot provide. diff --git a/apps/arstack_studio/README.md b/apps/arstack_studio/README.md index be139bdcb..08cd7a615 100644 --- a/apps/arstack_studio/README.md +++ b/apps/arstack_studio/README.md @@ -2,6 +2,10 @@ ARStack Studio is the **canonical native desktop operator surface** for the first ARStack61850 public Sampled Values release. It is a Qt 6 / C++ / QML application; the ESP32-P4 remains the deterministic real-time publisher. +> **v0.1.0 is publicly released and stable.** Download: https://github.com/masarray/arstack61850/releases/tag/v0.1.0 +> +> Production source target: `9c7fc7300220db4643e5643081240b955cfe12df` · accepted binary build head: `d9b5b6848415c7e6d1c52ec929e57c66b608058d`. + ## P0 public boundary The first release is intentionally narrow and testable: @@ -88,16 +92,24 @@ Protocol `1` is the P0 GUI/firmware capability contract for the supported `SMV-4 ## Windows release artifacts -The P0 release workflow creates separate downloadable files: +The stable `v0.1.0` public release is available at: -- `ARStack-Studio-0.1.0-win-x64-portable.zip` -- `ARStack-Studio-0.1.0-win-x64-setup.exe` -- `SHA256SUMS.txt` +- [GitHub Release — ARStack Studio / SMV Injector v0.1.0](https://github.com/masarray/arstack61850/releases/tag/v0.1.0) +- `ARStack-Studio-0.1.0-win-x64-setup.exe` — recommended normal installation +- `ARStack-Studio-0.1.0-win-x64-portable.zip` — portable package +- `arstack-esp32p4-smv-0.1.0.bin` — standalone ESP32-P4 firmware asset +- `firmware-manifest.json` +- `RELEASE-SHA256SUMS.txt` -Both packages contain the Qt runtime, verified ESP32-P4 firmware bundle, and pinned standalone flasher. The installer is per-user and does not require administrator elevation. +Published SHA-256 values: -A `v0.1.0` tag is the only accepted P0 publish tag. The GitHub release is intentionally marked prerelease until physical P0 acceptance is complete. +```text +877a35dbbe110cc8ab740d3fcdc44a63f348405dc509da3164d9aaa92e9e2622 ARStack-Studio-0.1.0-win-x64-setup.exe +1487e90254ddc5cab0f7b917580be951311c1697bec6dc19d2e2720683f00f83 ARStack-Studio-0.1.0-win-x64-portable.zip +fae413d7b6f65b7d10ca65dc277fbf586d487f21209a29875036791088afa9c7 arstack-esp32p4-smv-0.1.0.bin +``` +Both Windows packages contain the Qt runtime, verified ESP32-P4 firmware bundle, and pinned standalone flasher. The installer is per-user and does not require administrator elevation. The release is **stable**, not draft and not prerelease. ## Truthfulness boundary Phasor and waveform views are generated setpoint previews, not independent Ethernet capture evidence. `smpSynch` remains an embedded synchronization truth and must not be promoted to a synchronization claim without measured evidence. diff --git a/docs/FEATURE_MATRIX.md b/docs/FEATURE_MATRIX.md index 81ccea65b..30c01b41e 100644 --- a/docs/FEATURE_MATRIX.md +++ b/docs/FEATURE_MATRIX.md @@ -3,6 +3,7 @@ Status terms are intentionally conservative: - **Live-proven** — exercised against a reachable IED or vendor simulator. +- **Public release** — packaged, versioned and publicly downloadable with accepted product-level evidence and an explicit claim boundary. - **Offline-tested** — deterministic unit/integration/fuzz/CI evidence exists, but no current live-device claim is made. - **Software-ready for lab** — the production path and guarded live-test harness are implemented; retained physical/simulator evidence is still required. - **Partial** — useful implementation exists but important parity or interoperability gaps remain. @@ -51,7 +52,8 @@ Status terms are intentionally conservative: | GOOSE | Publisher/subscriber runtime foundations | Offline-tested | Physical process-bus acceptance remains pending. | | Sampled Values | PDU / Ethernet encode-decode | Offline-tested | Process-bus work remains separate from MMS control evidence. | | Sampled Values | Caller-owned bounded encode path | Offline-tested | `encode_into(span)` avoids fresh frame-buffer allocation in steady-state publisher design. | -| Sampled Values | Live MCU publisher | Planned / embedded path staged | First reference hardware is the Waveshare ESP32-S3-POE-ETH-8DI-8DO; synthetic W5500/ESP-IDF MACRAW transmission proof is required before any timing-grade claim. | +| Sampled Values | Live MCU publisher | Public release / physical accepted | ESP32-P4 ARStack Studio v0.1.0 completed 10/10 Start/Stop cycles and an uninterrupted 3600-second 4000 fps retained run with zero missed slots, TX failures, health reconnects or automatic starts; `smpSynch=0` remains the truthful timing boundary. | +| Desktop product | ARStack Studio / SMV Injector v0.1.0 | Public release | Stable Windows installer + portable package + ESP32-P4 firmware published under tag `v0.1.0`; independent SV spot-check confirmed the bounded 4I+4V / 4000 fps / 1 ASDU / 64-byte profile. | | SCL | Read-only parser / engineering support | Offline-tested | Host engineering surface; mutable standards-aware export remains later work. | | COMTRADE | CFG/DAT read support | Offline-tested | ASCII/BINARY/BINARY32/FLOAT32 and mapping foundations are implemented. | | PCAP | Read/write/evidence support | Live-proven for C5 evidence | Npcap loopback captures were reconciled with JSON Write lists and retained SHA-256 hashes. | @@ -90,4 +92,4 @@ C1-C5 provide a guarded production control path plus a live evidence harness. Th ## Next parity direction -The next gaps are association-loss and contention evidence for control, remaining MMS file-service parity and fault-record workflows, mutable SCL export/reconstruction, deterministic IED simulator/server integration, and broader application/UI parity. Sampled Values and ESP hardware work remain separate from this MMS-control tranche. +The next gaps are association-loss and contention evidence for control, remaining MMS file-service parity and fault-record workflows, mutable SCL export/reconstruction, deterministic IED simulator/server integration, and broader application/UI parity. The SMV/ESP32-P4 P0 track is now released as stable `v0.1.0`; future process-bus timing/profile expansion remains a separate follow-on tranche rather than an open blocker for that release. diff --git a/docs/SMV_STUDIO_P0_RELEASE.md b/docs/SMV_STUDIO_P0_RELEASE.md index b53bea211..89431387b 100644 --- a/docs/SMV_STUDIO_P0_RELEASE.md +++ b/docs/SMV_STUDIO_P0_RELEASE.md @@ -1,12 +1,20 @@ # ARStack Studio P0 public-release contract +**Milestone status: RELEASED · stable public `v0.1.0` · 2026-09-15** + +Public release: https://github.com/masarray/arstack61850/releases/tag/v0.1.0 + +Production source target: `9c7fc7300220db4643e5643081240b955cfe12df` +Accepted binary build head: `d9b5b6848415c7e6d1c52ec929e57c66b608058d` +Public release workflow source: ARStack Studio Release run `34918302946` (SUCCESS) + ## Product target The first public ARStack Studio release is intentionally bounded to one professional workflow: > **IEC 61850 Sampled Values Injector / Generator — 4I + 4V** -The release must make the already proven ESP32-P4 publisher usable as a clean desktop instrument without requiring the operator to install or understand the development toolchain. +The milestone packages the ESP32-P4 publisher as a usable Windows instrument without requiring the operator to install or understand the development toolchain. ## P0 profile boundary @@ -17,74 +25,85 @@ The release must make the already proven ESP32-P4 publisher usable as a clean de - 64-byte sample payload - one ASDU - 4000 samples/s reference profile -- sample-counter cycle `0..3999` for the bundled ARStack reference profile +- sample-counter cycle `0..3999` - SCL/CID/SCD/IID import remains available when the compiled stream fits the same firmware boundary +- `smpSynch=0` until separately measured disciplined-clock evidence exists -Profiles outside this layout may still be parsed and explained, but they are not P0 release targets and must remain blocked from deployment. +Profiles outside this layout may still be parsed and explained, but they are not v0.1.0 deployment targets and must remain blocked from deployment. -## P0 work packages +## Closed work packages -### P0.1 — Canonical Quick Start +### P0.1 — Canonical Quick Start — CLOSED - [x] ARStack-owned 4I+4V reference SCL bundled with the native Qt application -- [x] template goes through the canonical C++ SCL parser/profile compiler -- [x] application-owned reference counter policy resolves the template to Class A -- [x] Home ribbon exposes one-click `4I+4V Quick Start` -- [x] CI regression checks Class A, device support, 4000 fps, 4000 modulus, 64-byte payload and 16 leaves -- [ ] first-run visual state makes `Quick Start -> Connect -> Deploy -> Start` self-explanatory - -### P0.2 — Release UI / UX polish - -- [ ] make ARStack Studio the only canonical public operator surface -- [ ] present device, firmware, profile and output state in one compact hierarchy -- [ ] keep Current / Voltage matrices as the primary work surface -- [ ] remove development-language friction from normal workflow -- [ ] ensure every disabled Deploy/Start state has an operator-readable reason -- [ ] preserve Expert diagnostics without making them primary UI -- [ ] verify keyboard, resizing, DPI scaling and laptop layouts - -### P0.3 — ESP32-P4-ETH Firmware Manager - -- [ ] identify supported ESP32-P4-ETH target before flash -- [ ] version GUI <-> firmware protocol/capabilities -- [ ] package a release firmware image and manifest with hashes -- [ ] install firmware from inside ARStack Studio without ESP-IDF -- [ ] support firmware update and recovery flow -- [ ] reset/reconnect and verify `IDENTIFY` after flash -- [ ] refuse incompatible target/image combinations - -### P0.4 — Windows public distribution - -- [ ] native Release build -- [ ] bundle required Qt runtime with deployment tooling -- [ ] portable package -- [ ] Windows installer -- [ ] clean-machine smoke test with no Qt/Python/CMake/Ninja/ESP-IDF installed -- [ ] versioned firmware bundled or release-resolved by manifest -- [ ] SHA-256 checksums and reproducible release metadata -- [ ] tagged GitHub Release workflow - -### P0.5 — Physical acceptance before public release - -- [ ] blank/recovery ESP32-P4-ETH -> Firmware Manager -> verified device -- [ ] bundled 4I+4V Quick Start -> Deploy -> Start -- [ ] external 4I+4V engineering SCL -> compile -> Deploy -> Start -- [ ] 4000 fps retained run with no unexpected missed slots / canonical TX failures -- [ ] live I/U/phase/frequency/quality edits without unintended `smpCnt` restart -- [ ] Stop / Zero / reconnect / power-cycle behavior -- [ ] trusted independent capture of destination MAC, APPID, VLAN/PCP, svID, confRev and counter continuity -- [ ] no synchronization claim beyond measured evidence; `smpSynch` truth boundary retained - -## Explicitly outside the first release - -The following are valuable follow-on work but must not delay or destabilize P0: - -- 3I / 8I / 8I+4V / 9I+6V / 12I+4V / 12I+8V runtime layouts +- [x] canonical C++ SCL parser/profile compiler path +- [x] Class-A reference profile at 4000 fps / modulus 4000 / 64-byte payload / 16 leaves +- [x] one-click `4I+4V Quick Start` operator path + +### P0.2 — Release UI / UX — CLOSED + +- [x] ARStack Studio is the canonical public operator surface +- [x] device, firmware, profile and output states are explicit +- [x] Current / Voltage matrices remain the primary work surface +- [x] disabled Start/Deploy paths expose operator-readable reasons +- [x] Expert diagnostics remain secondary to the normal workflow + +### P0.3 — ESP32-P4 firmware/session manager — CLOSED FOR v0.1.0 + +- [x] typed semantic device identity and protocol versioning +- [x] packaged firmware image + manifest + SHA-256 enforcement +- [x] bounded serial ownership and firmware handoff +- [x] reconnect verification after firmware operations +- [x] wrong-device and incompatible-image paths fail closed +- [x] single-instance/session ownership hardening + +### P0.4 — Windows public distribution — CLOSED + +- [x] native Release build +- [x] bundled Qt runtime +- [x] portable package +- [x] Windows installer +- [x] clean Windows package smoke +- [x] versioned firmware bundle and manifest +- [x] SHA-256 checksums and release provenance +- [x] stable tagged GitHub Release `v0.1.0` + +### P0.5 — Physical product acceptance — ACCEPTED + +Executed evidence used for the public milestone: + +- [x] 10/10 Start/Stop cycles +- [x] Quick Start profile deploy/start path on the accepted physical board +- [x] live magnitude / phase / frequency / Quality / CT edits +- [x] Zero operation +- [x] uninterrupted 3600-second retained run at 4000 fps +- [x] `missed=0`, `txFailures=0`, `healthReconnects=0`, `automaticStarts=0` +- [x] independent capture spot-check of destination MAC, APPID, VLAN/PCP, svID, confRev, one ASDU, 64-byte payload, `smpCnt` continuity and 3999 -> 0 wrap +- [x] `smpSynch=0` truth boundary retained + +The following strict-lab cases were intentionally deferred as non-blocking follow-on validation and are **not represented as completed physical PASS cases**: + +- [ ] exhaustive blank-board/recovery permutations across USB-driver combinations +- [ ] exhaustive external engineering SCL physical matrix beyond the accepted P0 reference path +- [ ] broader power-cycle/unplug/replug permutations beyond the product-owner pragmatic release gate + +## Published assets + +```text +877a35dbbe110cc8ab740d3fcdc44a63f348405dc509da3164d9aaa92e9e2622 ARStack-Studio-0.1.0-win-x64-setup.exe +1487e90254ddc5cab0f7b917580be951311c1697bec6dc19d2e2720683f00f83 ARStack-Studio-0.1.0-win-x64-portable.zip +fae413d7b6f65b7d10ca65dc277fbf586d487f21209a29875036791088afa9c7 arstack-esp32p4-smv-0.1.0.bin +``` + +## Explicitly outside v0.1.0 + +- generalized 3I / 8I / 8I+4V / 9I+6V / 12I+4V / 12I+8V runtime layouts - multi-stream publication -- generalized arbitrary DataSet layouts -- COMTRADE playback +- arbitrary DataSet layouts +- COMTRADE playback as a released device data plane - scripted fault sequences - full Process Bus analyzer -- formal conformance/certification claims +- protection-grade timing claims +- IEC 61850 conformance/certification claims -This boundary can be widened only after the 4I+4V product path is packaged, recoverable, independently verified and usable by a new operator without development tooling. +The P0 boundary can widen only through a later versioned milestone. Public v0.1.0 remains a deliberately bounded engineering instrument release. diff --git a/docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md b/docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md new file mode 100644 index 000000000..cbdf484df --- /dev/null +++ b/docs/SMV_STUDIO_V0.1.0_PUBLIC_RELEASE.md @@ -0,0 +1,76 @@ +# ARStack Studio / SMV Injector v0.1.0 + +**Stable public release · 15 September 2026** + +[Download v0.1.0](https://github.com/masarray/arstack61850/releases/tag/v0.1.0) + +## Milestone + +`v0.1.0` closes the first public ARStack Sampled Values product milestone: a Windows engineering application supervising a deterministic ESP32-P4 publisher for the validated 4I+4V / 4000 fps profile. + +This milestone is deliberately narrower than the full ARStack roadmap. It is a usable public engineering release, not a protection-grade timing or conformance-certification claim. + +## Public package + +- Windows x64 installer — recommended for normal use +- Windows x64 portable package +- ESP32-P4 firmware image +- firmware manifest +- release SHA-256 ledger +- bundled firmware recovery/flash tooling inside ARStack Studio + +## Validated profile + +| Property | v0.1.0 value | +|---|---| +| Channels | 4 current + 4 voltage | +| Frame rate | 4000 frames/s | +| ASDU | 1 per frame | +| Sample payload | 64 bytes | +| `smpCnt` modulus | 4000 | +| `smpSynch` | 0 | +| Firmware protocol | ARStack protocol v1 | + +## Physical acceptance summary + +The accepted physical board run completed: + +- 10/10 Start/Stop cycles; +- live magnitude, phase, frequency, Quality and CT edits; +- Zero; +- uninterrupted 3600-second retained run; +- 4000 fps minimum and maximum throughout retained telemetry; +- zero missed sample slots; +- zero TX failures; +- zero health reconnects; +- zero automatic Start events. + +An independent capture spot-check contained 39,524 primary SV frames over approximately 9.881 seconds, an effective rate of approximately 3999.899 fps, zero observed `smpCnt` discontinuities, and ten 3999 -> 0 wraps. The capture matched the accepted P0 wire identity and retained `smpSynch=0`. + +## Release provenance + +| Item | Value | +|---|---| +| Stable tag | `v0.1.0` | +| Production merge | `9c7fc7300220db4643e5643081240b955cfe12df` | +| Accepted binary build head | `d9b5b6848415c7e6d1c52ec929e57c66b608058d` | +| Release build | ARStack Studio Release run `34918302946` — SUCCESS | +| Public publish workflow | Publish Public SMV Injector v0.1.0 run `34933705055` — SUCCESS | + +The `v0.1.0` tag points directly to the production merge SHA above. + +## Published SHA-256 + +```text +877a35dbbe110cc8ab740d3fcdc44a63f348405dc509da3164d9aaa92e9e2622 ARStack-Studio-0.1.0-win-x64-setup.exe +1487e90254ddc5cab0f7b917580be951311c1697bec6dc19d2e2720683f00f83 ARStack-Studio-0.1.0-win-x64-portable.zip +fae413d7b6f65b7d10ca65dc277fbf586d487f21209a29875036791088afa9c7 arstack-esp32p4-smv-0.1.0.bin +``` + +## Product boundary after this milestone + +The next SMV work may expand timing evidence, profiles, multi-stream support, replay/sequencing and interoperability. None of that changes the truth of this release: + +> v0.1.0 is the stable public 4I+4V / 4000 fps engineering-instrument baseline. + +IED Simulator / IEC 61850 Workbench development is a separate product track and should not be used to redefine the v0.1.0 SMV acceptance boundary. diff --git a/embedded/esp32p4_smv_injector/README.md b/embedded/esp32p4_smv_injector/README.md index da4bbc9b8..d0c883fc1 100644 --- a/embedded/esp32p4_smv_injector/README.md +++ b/embedded/esp32p4_smv_injector/README.md @@ -2,6 +2,8 @@ This target runs the ARStack61850 Sampled Values injector on the current ESP32-P4 Ethernet development board using the internal EMAC and onboard RMII PHY. +> **Public product milestone:** the validated 4I+4V / 4000 fps path is released as stable [`v0.1.0`](https://github.com/masarray/arstack61850/releases/tag/v0.1.0). The broader runtime experiments documented below remain engineering follow-on work and do not expand the v0.1.0 claim boundary. + The firmware has progressed beyond the original fixed 4000 fps bring-up. The current runtime accepts a bounded immutable SCL-compiled publisher profile from the host GUI, arms that profile while STOPPED, and publishes deterministic Sampled Values while live signal values remain mutable. See: @@ -11,20 +13,17 @@ See: ## Current hardware result -The current ESP32-P4 path has been proven on real hardware: +The released P0 baseline has been proven on real ESP32-P4 hardware: -- ESP32-P4 rev 1.3 boots and drives the onboard RMII PHY; -- raw Layer-2 TX reaches an independent host capture path; -- IEC 61850 Sampled Values are decoded from the generated `0x88BA` traffic; -- the development 4000 fps profile has sustained stable device telemetry with zero TX failures and zero missed timer notifications in retained runs; -- the SCL-driven runtime has physically transitioned to a real engineering-file-derived 4800 fps profile; -- the 4800 fps retained run reported approximately 4800 samples/s, zero canonical TX failures and zero missed slots; -- the active profile exposed SCL-derived `svID`, APPID, VLAN/PCP intent, configuration revision, publisher rate and counter modulus in the GUI; -- three-phase current/voltage waveforms remained observable through the diagnostic capture path; -- profile identity/layout is immutable while RUNNING, while magnitude, phase, frequency, quality and channel enable state remain live controls. +- 10/10 Start/Stop cycles passed; +- the 4I+4V reference profile retained 4000 fps for an uninterrupted 3600-second run; +- retained telemetry reported zero missed slots, zero TX failures, zero health reconnects and zero automatic starts; +- an independent SV capture spot-check confirmed one ASDU, 64-byte sample data, continuous `smpCnt` including 3999 -> 0 wraps, and truthful `smpSynch=0`; +- live magnitude, phase, frequency, Quality and CT edits were exercised without turning the desktop application into the realtime sample clock. -This proves the injector workflow for the supported profile boundary. It does not by itself prove formal IEC conformance or trusted on-wire visibility of every canonical multicast/VLAN field. +The repository also contains broader engineering experiments, including SCL-driven alternate rates such as 4800 fps. Those experiments are not part of the stable v0.1.0 public product boundary unless a later versioned release explicitly promotes them. +This is product-level engineering evidence for the bounded v0.1.0 profile, not IEC 61850 conformance certification or a protection-grade synchronization claim. ## Runtime profile model The embedded runtime currently accepts a bounded `RuntimePublisherProfile` containing: