Repository navigation
Fix capture journal moving-head starvation - #930
Merged
Merged
Conversation
coneilen
force-pushed
the
coneilen-fix-c8r-journal-durability
branch
from
October 26, 2026 10:37
fc5f70a to
860f07a
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Colin Neilens <coneilen@microsoft.com>
coneilen
force-pushed
the
coneilen-fix-c8r-journal-durability
branch
from
October 26, 2026 12:00
860f07a to
07da081
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
Prevent the capture supervisor's bounded live journal read from starving while the worker keeps publishing newer numbered snapshots. The preserved C8R run did not hit a rename or sharing failure: one transaction verified sequences 209, 215, 219, 225, and 230, then exhausted its one-second budget while chasing sequence 236, which poisoned later final stdout binding and kernel-cleanup proof.
Changes
Test plan
RED: pwsh -NoProfile -File Tools\windows\Tests\UiCaptureDriver.Tests.ps1 -JournalMovingHeadContractOnly -ScratchRoot C:\Users\coneilen.copilot\session-state\ea4b497e-21af-44e5-b5d2-e3c9f8bd55b7\files\c8r-journal-red-236 -> JournalUnavailable sequence=236 after 1629 ms; 1 executed, 0 passed, 1 failed
GREEN: pwsh -NoProfile -File Tools\windows\Tests\UiCaptureDriver.Tests.ps1 -JournalMovingHeadContractOnly -ScratchRoot C:\g931f -> final rebased head 07da081, 1 executed, 1 passed, 0 failed
REGRESSION: pwsh -NoProfile -File Tools\windows\Tests\UiCaptureDriver.Tests.ps1 -ScratchRoot C:\g931r -PrebuiltFixtureManifest C:\g931p\fixtures.json -PrebuiltFixtureManifestSha256 308EE71413C409B1897DF25511796424B9C4D5D01D319833B80EA00DCCDC5ADB -> final rebased head 07da081, 182 executed, 182 passed, 0 failed, 0 skipped
Additional checks:
TEMP=C:\g931v; TMP=C:\g931v; pwsh -NoProfile -File Tools\windows\Tests\ValidationRunner.Tests.ps1-> PASS; UiScenario 166/166 and UiCaptureDriver 182/182.TEMP=C:\g931h; TMP=C:\g931h; pwsh -NoProfile -File Tools\windows\Tests\Hardening.Tests.ps1 -SkipTrayLive-> repeated-runs PASS 3/3.git diff --check origin/main...HEAD-> passed.git ls-files --eol -- Tools/windows/UiCaptureDriver.psm1 Tools/windows/Tests/UiCaptureDriver.Tests.ps1 Tools/windows/UI-CAPTURE-SCENARIOS.md-> LF in index and worktree.pwsh -NoProfile -File Tools\tdd\Test-TddEvidence.ps1 -BodyPath C:\Users\coneilen\.copilot\session-state\ea4b497e-21af-44e5-b5d2-e3c9f8bd55b7\files\pr-body.md-> passed.Exact-head and rerun provenance
The original head
fc5f70a6ef019128b8f54c789e7f995f4fd00113completed all required current-head checks successfully before rebase. It was rebased ontoec3b53e08ac51f94f93c89b5f458917366152e14as860f07ac2723cc55b412acffe1a6e96f03280f29, then rebased again after #931 onto currentorigin/mainf3336f93ab74014cc02d25ff769c1c2e1bd92dcdas final head07da08183e494574ce4e3f4aeb5cba39a2e49463. Every pre/post binary patch SHA256 is identically67418F95CD9E5072E6C63A4F151F9B764419D42DA23F805DECAC776818ACBB4B.Two exact-head ValidationRunner attempts passed UiScenario 166/166 and then refused fixture preparation because the short-lived existing
vswhere.exeprocess exited before its initial native image attestation (ProcessImageAttestationUnavailable, kernel exit and EOF left UNPROVEN). No success was inferred from those attempts. A third unchanged exact-head run completed normally and passed both 166/166 and 182/182.Preserved hosted failures and bounded retries
On intermediate exact head
860f07ac, Windows workflow run40308907250attempt 1 failed only its integration job121524923340:uia-live-gate.ps1:2158exhaustedTreeWalker.GetFirstChildretries against a stale element after its parent UI closed. The same log provesUIA_PROCESS_TREE_CLEANUP=verified,UIA_PROVIDER_PROCESS_CLEANUP=verified, andWINDOWS_SHELL_DEFAULT_PROFILE_UNCHANGED=verified. Preserved failed-job log SHA256:B1FFEA8D4C361D9854F39093C9EEE2E4433FF61735DFB58255AC77B8A02FFC62.Windows port run
40308907191attempt 1 failed Swift job121524907108only because the ValidationRunner step reached its 15-minute hosted timeout after already proving UiScenario 166/166. Preserved failed-job log SHA256:9E8A6F0944B437FAB54ECF5C80185DD0E28DA4E66D9B4BBE79CC78D65F37AC15.One bounded failed-job retry was issued per completed workflow without an empty commit or source change. Attempt 2 passed completely: Windows integration job
121535057017, Windows summary job121540688106, Swift job121535060554, and spikes summary job121547391461all succeeded on unchanged860f07ac.Final exact-head CI on
07da08183e494574ce4e3f4aeb5cba39a2e49463is fully green. Windows shell run40319306334, Windows port run40319305788, deterministic hardening run40319305538, DCO run40319305760, and live body validation run40319352470all completed successfully; path-gated jobs skipped as designed. The PR reportsmergeStateStatus=CLEAN.The earlier pre-rebase full run using the long session artifact path produced 179/182 because two existing seed-path cases correctly rejected a 278-character zmx lease path above the 240-character contract; the report-gate case then failed dependently. Its short-path rerun passed 182/182. No C8R capture, GUI launch, image capture, or lease consumption occurred.
Checklist
git commit -s) per the DCOmake test)make check)