Handle completed Task Scheduler snapshot entries - #57
Merged
Conversation
Contributor
There was a problem hiding this comment.
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 ignoreSCHED_E_TASK_NOT_RUNNINGduring 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.
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
force-pushed
the
fix/windows-scheduler-snapshot-race
branch
from
September 1, 2026 06:47
7d01660 to
d75929e
Compare
This was referenced Sep 1, 2026
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
SCHED_E_TASK_NOT_RUNNINGwhen anIRunningTaskdisappears between snapshot enumeration and property accessEvidence
The failure was observed in Chat #52 CI run
33465746231:IRunningTask.Pathreturned0x8004130Bafter the task completed. The refreshed #52 head with this fix passed all CI jobs in run33468977724, including Windows supervisor behavior.Validation