Skip to content

Normalize action journal deadlines - #949

Merged
coneilen merged 1 commit into
mainfrom
coneilen-complete-bounded-parity-actions
Oct 29, 2026
Merged

coneilen merged 1 commit into
mainfrom
coneilen-complete-bounded-parity-actions

Conversation

@coneilen

Copy link
Copy Markdown
Collaborator

Summary

Normalize action-journal deadlines at the shared state boundary so the bounded action runner can pass the actual UTC DateTime returned by Get-CapLeaseWindow without dereferencing a nonexistent property.

Changes

  • accept explicitly UTC DateTime and DateTimeOffset values in New-CapJournalState
  • normalize accepted offsets to the same UTC instant
  • reject null, Local/Unspecified DateTime, foreign types, and already-expired deadlines before publication
  • pass the lease expiry value directly from the action runner

Test plan

RED: pwsh -NoProfile -File Tools\windows\Tests\UiCaptureDriver.Tests.ps1 -JournalContractOnly -ScratchRoot D:\gcr\deadline-red-49690c92 -PrebuiltFixtureManifest D:\gcr\deadline-red-fixture-6f57302b\fixtures.json -PrebuiltFixtureManifestSha256 E79D3C78A15F461359F1B12A6B3E6D1458C1FC5CD0BFC42AC53FAD86159FF1DB -> 9/10 passed; DateTimeOffset could not bind to DeadlineUtc
GREEN: pwsh -NoProfile -File Tools\windows\Tests\UiCaptureDriver.Tests.ps1 -JournalContractOnly -ScratchRoot D:\gcr\deadline-green2-73c5005e -PrebuiltFixtureManifest D:\gcr\deadline-green2-fixture-6596ab56\fixtures.json -PrebuiltFixtureManifestSha256 4EE7569C6A7515E56DCED7342206A59350627351CB22D2D5223FB9687F43FD42 -> 10/10 passed with UTC and fail-closed deadline cases
REGRESSION: pwsh -NoProfile -File Tools\windows\Tests\UiCaptureDriver.Tests.ps1 -RequireRealSeed -RealSeedZmxPath C:\gca-providers\zmx\zig-out\bin\zmx.exe -RealSeedZmxSha256 447B8E94FE5A72D0B7D0F8C614BBEFDE597DFB864FD38278DB53AE98A921EC0B -ScratchRoot D:\gcr\deadline-real185-5aeae8a9 -PrebuiltFixtureManifest D:\gcr\deadline-green2-fixture-6596ab56\fixtures.json -PrebuiltFixtureManifestSha256 4EE7569C6A7515E56DCED7342206A59350627351CB22D2D5223FB9687F43FD42 -> 185/185 passed with zero failures and zero skips

  • focused matched-action contracts -> 8/8 passed
  • full UiCaptureDriver contracts -> 182/182 passed
  • pwsh -NoProfile -File Tools\windows\Tests\ValidationRunner.Tests.ps1 -> PASS; nested UiCaptureDriver 182/182
  • pwsh -NoProfile -File Tools\windows\Tests\Hardening.Tests.ps1 -> repeated deterministic hardening 3/3 passed
  • PowerShell parser -> 3/3 changed scripts passed
  • git diff --check and git ls-files --eol -> passed; all touched files are LF

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

Accept UTC DateTime and DateTimeOffset deadlines at the shared journal boundary while rejecting null, non-UTC, and expired values before publication.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
@coneilen
coneilen merged commit 21d0d00 into main Oct 29, 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