Skip to content

Fix real-zmx normal lifecycle preflight - #933

Merged
coneilen merged 1 commit into
mainfrom
coneilen-fix-c8r-zmx-lifecycle
Oct 26, 2026
Merged

coneilen merged 1 commit into
mainfrom
coneilen-fix-c8r-zmx-lifecycle

Conversation

@coneilen

Copy link
Copy Markdown
Collaborator

Summary

Fix the C8R real-zmx normal-target preflight race where an owned short-lived process exited after worker journal publication but before the supervisor could retain its handle. The supervisor now defers only that exact typed/absent-metadata state to the worker's final kernel-exit and EOF/file-closure proof.

Changes

  • Classify the exact initial handle-adoption race without treating missing evidence as success.
  • Keep foreign, live, stale/reused, and partially classified process identities fail-closed.
  • Add a focused three-case real-zmx lifecycle entry point and real final-binding negatives for missing, foreign, stale, and partial records.
  • Document that deferred journal generations still require the complete numbered final journal and cleanup binding.

Test plan

RED: pwsh Tools\windows\Tests\UiCaptureDriver.Tests.ps1 -ScratchRoot C:\x9 -RequireRealSeed -RealSeedContractOnly -> 3 executed, 2 passed; normal failed because the journal adoption decision helper was missing
GREEN: pwsh Tools\windows\Tests\UiCaptureDriver.Tests.ps1 -ScratchRoot C:\m7 -RequireRealSeed -RealSeedContractOnly -> 3 executed, 3 passed, 0 failed
REGRESSION: pwsh Tools\windows\Tests\UiCaptureDriver.Tests.ps1 -ScratchRoot C:\a6 -RequireRealSeed -> 185 executed, 185 passed, 0 failed, 0 skipped

  • pwsh -NoProfile -File Tools\windows\Tests\ValidationRunner.Tests.ps1 -> PASS; UiScenario 166/166 and UiCaptureDriver 182/182 with zero skips.
  • pwsh -NoProfile -File Tools\windows\validate.ps1 -Task hardening -> PASS; deterministic repeated runs 3/3.
  • PowerShell parser checks for both changed scripts -> PASS.
  • git diff --check and git ls-files --eol for all changed files -> PASS; LF retained.
  • pwsh -NoProfile -File Tools\tdd\Tests\TddEvidence.Tests.ps1 -> PASS.
  • No C8R capture was launched and no capture lease was requested or consumed.

Checklist

  • I have read the Contributing Guidelines
  • I have signed off my commits (git commit -s) per the DCO
  • Tests pass locally (make test)
  • Code follows the existing style (make check)
  • I added the test/contract before the implementation and observed the intended RED failure

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
@coneilen
coneilen merged commit 1219d22 into main Oct 26, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant