P0.1: restore immediate FAT evidence priority without UI starvation - #163
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
PR #150 intentionally raised FAT evidence dispatch from
BackgroundtoDataBindso a FALSE→TRUE edge is evaluated and its ON evidence/timestamp is visible before a later FALSE edge. P0 #159 later moved the dispatcher back toBackgroundto avoid UI starvation under a large pending-snapshot queue. The P0 bounded drain (64 snapshots / 4 ms) solved the unbounded-drain problem, but the dispatcher change accidentally regressed #150's immediate edge priority.Fix
Keep both improvements instead of choosing one:
DispatcherPriority.DataBind, preserving immediate TRUE-edge processing;IoTestSessionControllerreschedules another bounded chunk from inside the active drain, the wrapper detects that active drain and posts the continuation atDispatcherPriority.Background;64 snapshots / 4 msbounded drain remains unchanged;This makes the priority policy burst-aware: first evidence edge is urgent; backlog continuation yields to normal render/input work.
Regression guard
Update the P0 regression contract so it now locks the combined invariant instead of incorrectly requiring
Backgroundonly:DataBindrequired for the first FAT evidence dispatch;Backgroundrequired for continuation dispatch while the drain callback is active;Integration safety
Branch is based on current
main6980a2899edad4249ae2e8542d9a9e7f61e6af82, so PR #162 first-run SCL/IP/Excel launcher restoration is already included. Only two files are changed:MainWindow.IoTesting.cstests/ARSAS.Tests/IoTestFatP0RegressionTests.csNo IEC 61850 engine, Clock Sync/SNTP, multi-IED FAT, smart binding, timestamp formatting/evidence precision, clean-FAT semantics, or release metadata is modified.
Do not merge until focused IO FAT checks plus full Windows build/test/package pass on the exact head.