Add live IO FAT sessions and durable evidence journal - #112
Conversation
There was a problem hiding this comment.
💡 Codex Review
arsas/Services/IoTesting/IoTestTransitionEvaluator.cs
Lines 279 to 280 in 69a0a3a
When the production quality decoder emits values such as Good / OldData, this substring check classifies them as Accepted because they contain good. Consequently, a stale baseline can arm testing and stale ON/OFF observations can produce PASS even though OldData means transition continuity is not trustworthy; inspect the complete IEC 61850 quality flags and downgrade at least stale/inconsistent detail flags to Review or Rejected.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| return recordCount == 0 | ||
| ? new IoTestJournalVerificationResult(false, 0, previousHash, "Evidence journal contains no records.") |
There was a problem hiding this comment.
Require a terminal seal before declaring a journal valid
If one or more complete lines are removed from the end of a journal, the remaining prefix still has valid sequences and hashes, so this return path reports it as verified. This can certify a journal that has lost OFF evidence or its session_completed/session_stopped record; verification needs an expected terminal seal, record count, or externally anchored final hash rather than accepting every nonempty valid prefix.
Useful? React with 👍 / 👎.
| return; | ||
| } | ||
|
|
||
| Session.Stop("Workspace closed by operator; evidence journal sealed."); |
There was a problem hiding this comment.
Keep the workspace open when sealing evidence fails
When the operator closes an active session and the final append or integrity verification fails, Stop returns a failure and moves the controller to Evidence Fault, but this result is ignored and the window still closes. The controller is then disposed by the caller, so the operator never sees the failure and cannot respond to an unsealed journal; cancel closing and display the failed action result in this scenario.
Useful? React with 👍 / 👎.
Purpose
Turn the imported IO List Testing workspace into a real read-only FAT execution workflow per IED, while preserving the required OFF → ON → OFF evidence order and keeping protocol-engineering distractions outside the dedicated FAT window.
FAT session lifecycle
Scope preflight
Session start is rejected when:
This prevents partial hidden test scope and prevents one physical edge from producing multiple PASS results.
False-PASS protection
Durable evidence
Every session writes an append-only JSON Lines journal under the user-local ARSAS evidence directory. Each record includes:
Each line is wrapped in a journal sequence and SHA-256 hash chain. Every append is flushed to disk. Sealed journals are verified on stop or completion. A journal write or verification failure moves the session to EVIDENCE FAULT instead of permitting unrecorded PASS results.
UI
The dedicated maximized workspace now provides:
Safety boundary
Regression coverage
Automated validation at head
69a0a3a9255cd65266c8ae17190bb33fc9b57739The Windows installer sources and workflow were not changed by this tranche, so installer validation was not claimed or forced through a no-op modification.