Skip to content

Make Windows validation admission deterministic - #1003

Merged
coneilen merged 6 commits into
mainfrom
coneilen-admission-determinism
Nov 11, 2026
Merged

coneilen merged 6 commits into
mainfrom
coneilen-admission-determinism

Conversation

@coneilen

Copy link
Copy Markdown
Collaborator

Summary

Make Windows validation admission and capture deterministic before expensive Windows qualification starts.

Changes

  • Capture exact repository, tool, provider, binding, manifest, environment, and output-contract identities.
  • Refuse stale roots and ambiguous environment state while preserving raw evidence.
  • Enforce strict UTF-8 no-BOM child capture across supervisor and direct capture entry points.
  • Reuse line-ending-safe semantic source reading without changing raw-byte assertions.
  • Add focused admission, isolation, ownership, and stream-codec contracts.

Test plan

RED: pwsh -NoProfile -File Tools\windows\Tests\CandidateAdmission.Tests.ps1 -> 0 passed, 5 failed because admission and source helpers were absent
GREEN: pwsh -NoProfile -File Tools\windows\Tests\CandidateAdmission.Tests.ps1 -> focused admission tests passed 50/50
REGRESSION: pwsh -NoProfile -File Tools\windows\Invoke-ValidationRunnerContract.ps1 -> complete true, 695 required, 695 passed, 2354 executed, 0 errors

  • Follow-up stream encoding contract: native harness safety passed 16/16.
  • Raw UTF-8, BOM, UTF-16, OEM, invalid-byte, and supervisor-admission controls passed in the compiled ownership suites.
  • Live pinned-provider shell smoke was not run in this worktree because provider/tool roots were unavailable; CI owns the exact pinned provider path.

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

coneilen and others added 6 commits November 11, 2026 11:55
Capture exact repository, provider, tool, binding, manifest, and environment identities before Windows shell validation. Enforce stale-root and environment admission, strict no-BOM child output, and semantic source line-ending normalization without changing raw evidence.

RED: pwsh -NoProfile -File Tools\windows\Tests\CandidateAdmission.Tests.ps1 -> 0 passed, 5 failed because admission and source helpers were absent.

GREEN: focused Pester admission and isolation run -> 50 passed, 0 failed with positive execution.

REGRESSION: pwsh -NoProfile -File Tools\windows\Invoke-ValidationRunnerContract.ps1 -> complete true, 695 required, 695 passed, 2354 executed, 0 errors.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Reject UTF-16, BOM-prefixed, and OEM capture configurations in both OwnedByteStreamCapture and OwnedChildSupervisor. Bind the native cmd harness to UTF-8 and exercise LF text, invalid encodings, supervisor admission, and raw-byte preservation.

RED: Build-CompiledValidationRunner plus ValidationRunner.exe --suite ownership -> ownership.managed.stream-encoding-contract failed before the enforcement fix.

GREEN: focused ownership encoding tests -> stream-encoding-contract, raw-codec-bom, and bytes-utf8-bom passed; native harness safety 16/16 passed.

REGRESSION: pwsh -NoProfile -File Tools\windows\Invoke-ValidationRunnerContract.ps1 -> complete true, 695 required, 695 passed, 2354 executed, 0 errors.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Normalize nested manifest, binding, and source collections into typed scalar lists before hashing. Emit one record per path and reject newline-concatenated path values. Cover the three-manifest CI shape directly.

RED: pwsh -NoProfile -File Tools\windows\Tests\CandidateAdmission.Tests.ps1 -> 5 passed, 1 failed because Get-WindowsShellCandidateManifestPaths was absent.

GREEN: CandidateAdmission.Tests.ps1 -> 6 passed, 0 failed; merged isolation preflight -> 51 passed, 0 failed.

REGRESSION: Invoke-ValidationRunnerContract.ps1 -> complete true, 695 required, 695 passed, 2354 executed, 0 errors; exact CI shell unit commands -> shards 3/3 PASS.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Use a pointer-only expected-modal route with retained process, direct owner, class, title, visibility and foreground checks. Return typed completion without Enter or selection fallback; preserve ordinary popup ownership and independent gate modal assertions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
(cherry picked from commit 5beca8de64c692eebd9b25b2c2d277901e47c8ca)
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
@coneilen
coneilen merged commit 37d5268 into main Nov 11, 2026
26 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