Skip to content

Handle completed Task Scheduler snapshot entries - #57

Merged
BunsDev merged 2 commits into
mainfrom
fix/windows-scheduler-snapshot-race
Sep 1, 2026
Merged

Handle completed Task Scheduler snapshot entries#57
BunsDev merged 2 commits into
mainfrom
fix/windows-scheduler-snapshot-race

Conversation

@BunsDev

@BunsDev BunsDev commented Sep 1, 2026

Copy link
Copy Markdown
Member

Summary

  • tolerate only SCHED_E_TASK_NOT_RUNNING when an IRunningTask disappears between snapshot enumeration and property access
  • keep all other Task Scheduler cleanup failures fail-closed
  • keep the standalone and workflow-embedded Windows supervisor sources byte-identical
  • repin immutable Phase 1 harness authority to the durable implementation commit

Evidence

The failure was observed in Chat #52 CI run 33465746231: IRunningTask.Path returned 0x8004130B after the task completed. The refreshed #52 head with this fix passed all CI jobs in run 33468977724, including Windows supervisor behavior.

Validation

  • 89 heavy authority tests passed, 1 skipped
  • 132 heavy real-authority harness tests passed
  • 93 workflow/specification tests passed, 19 skipped
  • TypeScript, Biome, C# compilation, and diff checks passed
  • independent pre-merge review found no significant issues

Copilot AI lite review requested due to automatic review settings September 1, 2026 04:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens the Windows supervisor’s Task Scheduler cleanup by explicitly tolerating the SCHED_E_TASK_NOT_RUNNING (0x8004130B) race when a running task completes between snapshot enumeration and COM property access, while keeping other cleanup failures fail-closed. It also repins the Phase 1 harness authority to a durable implementation commit and updates the lock/docs/workflow artifacts to match the new immutable bytes.

Changes:

  • Add a targeted exception filter (IsTaskNotRunningException) to ignore SCHED_E_TASK_NOT_RUNNING during running-task enumeration/stop logic.
  • Keep the workflow-embedded Windows supervisor source in sync with scripts/windows-job-supervisor.cs, and extend workflow conformance assertions for the new handling.
  • Repin Phase 1 harness authority revision/tree and update the lockfile + documentation digests accordingly.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
scripts/windows-job-supervisor.cs Adds SCHED_E_TASK_NOT_RUNNING handling to tolerate completed Task Scheduler entries during cleanup.
.github/workflows/client-v1-conformance.yml Mirrors the supervisor change in the workflow-embedded source to preserve byte-identical embedding.
src/client-v1-conformance-workflow.test.ts Asserts the workflow-embedded supervisor includes the new exception-filter handling.
phase1-conformance.lock.json Repins harness authority revision/tree and updates blob/sha256 entries for updated immutable artifacts.
src/phase1-conformance-lock.test.ts Updates expected pinned harness revision/tree to match the updated lockfile.
docs/phase1-conformance.md Updates documented byte counts and SHA-256 values to match the new pinned workflow/supervisor bytes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

BunsDev and others added 2 commits September 1, 2026 01:45
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rebased onto main after the protected bootstrap fix (#58) landed, so the
previous repin pinned a commit that no longer exists on this branch.

Repins harness and harnessAuthority to b49cebc, the rebased fix commit,
and refreshes the two blobs that commit changes:
client-v1-conformance.yml and windows-job-supervisor.cs.

Verified: the pinned tree equals `git rev-parse b49cebc^{tree}` and every
one of the 25 harnessAuthority blobs resolves to its locked value at that
revision.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@BunsDev
BunsDev force-pushed the fix/windows-scheduler-snapshot-race branch from 7d01660 to d75929e Compare September 1, 2026 06:47
@BunsDev BunsDev self-assigned this Sep 1, 2026
@BunsDev
BunsDev merged commit 77ba6ae into main Sep 1, 2026
10 of 19 checks passed
@BunsDev
BunsDev deleted the fix/windows-scheduler-snapshot-race branch September 1, 2026 07:08
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.

2 participants