fix(release-verify): stop requiring a single present mode across the crosscheck window - #424
Merged
Merged
Conversation
Exoridus
marked this pull request as ready for review
September 24, 2026 08:25
added 4 commits
September 24, 2026 16:50
…crosscheck window PresentMon legitimately observes DWM interleaving composed and independent-flip presents for the same process across an 8-second capture (measured: 1127 vs. 157 presents, scattered throughout) -- that is real desktop composition behavior, not measurement noise. The product's present.mode is the mode of the single most recently decoded present at snapshot time, not an aggregate. Judge the crosscheck by the same semantics: PresentMon must have observed the product's reported mode at all, and its chronologically last present for that process must agree with it. Mixing alone no longer produces INFRA_ERROR; an unclassified mode still does. Bumps diagnostics.present-crosscheck to revision 2.
…mode-flip parity, not per-event QPC identity
…mode-flip parity, not per-event QPC identity
…esent-crosscheck, keep counts as evidence only
Exoridus
force-pushed
the
fix/present-crosscheck-mixed-mode-oracle
branch
from
September 24, 2026 15:06
23fd446 to
d5ea27a
Compare
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.
Summary
diagnostics.present-crosscheckrequired every PresentMon-observed present for the attributed process to share one classified mode across the whole 8-second capture (modes.len() == 1). Real hardware measurement falsified that: DWM legitimately interleavesComposed: FlipandHardware Composed: Independent Flipfor the same process, scattered across the entire window (1127 vs. 157 presents observed in one run).PresentStartTimeQPC tick out toenvironment.snapshot.present.presentQpc, match it exactly against PresentMon's independently-captured QPC for the same present) and also abandoned after real hardware testing: two independent ETW consumers of the same present event do not report bit-identical timestamps (confirmed against both PresentMon's--v2_metricsCPUStartQPCand--v1_metricsQPCTime, deltas from single-digit ticks up to several thousand, never exactly 0). Exact per-event identity across two independently-built PresentMon consumers is not achievable on this hardware; that work was reverted before this PR (nopresentQpcAPI surface remains).modeFlipCountto also have grown (no magnitude requirement).diagnostics.present-crosscheckto scenario revision 2 (unreleased; not yet merged, so not a 3rd revision).Known follow-up (not fixed in this PR)
Under busy-desktop conditions, the product's own present-diagnostics undercounted PresentMon's independently-attributed presents for the same PID by ~20-28%, worsening (not improving) with a longer capture window -- ruling out boundary skew. A quiet-desktop rerun recovered to ~94% agreement. This is consistent with the product's ETW consumer (
PresentMonTraceConsumer's system-widemAllPresentscircular buffer,PresentData/PresentMonTraceConsumer.cpp) losing in-progress presents under system-wide present traffic and never surfacing that loss (mLostPresentEventsis decoded by the vendored library but never read byPresentMonTraceBackend::Drain()). This is a genuine product diagnostics-accuracy question independent of this PR's oracle design and needs its own investigation (how much loss under realistic load, whetherpresentCount/modeFlipCountshould be marked partial/unreliable when it occurs, whether PID filtering can move earlier in the consumer pipeline, whether this deserves its own release scenario rather than a tolerance in the independent crosscheck). Tracked separately, not addressed here.Test plan
cargo testintools/exo-verify(present-crosscheck: 11 tests covering summary parsing/transition counting, stable-window and mixed-window judging, unmatched mode, no-growth, and that present-count magnitude is not numerically gated)cargo fmt --check,cargo clippy --all-targets -- -D warningspwsh scripts/verify.ps1 -Full(pre-push hook), passed0.10.0release candidate, elevated, production control endpoint (diagnostics.present-crosscheckonly): quiet desktop PASS (product present delta 2058 vs. PresentMon 2189, ~94%; product mode-flip delta 783 vs. PresentMon transitions 908, ~86%; mode set{composed, independentFlip}; product's reported modecomposedobserved externally). Busy-desktop runs (two, 8s and 24s) diverged further from PresentMon's counts, motivating the "Known follow-up" above and confirming counts must not be gated numerically.origin/next(eeab35da, fix(release): record what holds the old tree when an update swap fails #423) so the diff is scoped totools/exo-verify/src/scenarios/present.rsonly.