[codex] Fallback when Windows gateway task exits early#76245
Conversation
|
Codex review: stale review; fresh review needed. Summary Next step Review history (2 earlier review cycles) |
|
The Windows failure mode remains plausible, but this stale patch should not land as-is. Current Best fix: recreate on current |
de98ca4 to
7be3c98
Compare
7be3c98 to
f758cb2
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f758cb2e6e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| ### Fixes | ||
|
|
||
| - **Windows Scheduled Task recovery:** keep clean early exits inside the existing bounded launch poll, falling back only when neither the task process nor Gateway listener becomes observable. (#76245) |
There was a problem hiding this comment.
Remove the manual changelog entry
Root AGENTS.md says CHANGELOG.md is release-only and that release generation owns changelog edits for normal fixes. Adding this Unreleased entry here can leave stale or duplicated release notes when the generated changelog is produced; keep the release-note context in the PR body/squash/direct commit instead and leave CHANGELOG.md untouched.
Useful? React with 👍 / 👎.
9c35d5a to
08f8a80
Compare
08f8a80 to
a0826e6
Compare
a0826e6 to
85c029b
Compare
|
Landed as 33f7c17. The rewrite consolidates clean Task Scheduler exits into the existing bounded 15-second observation loop: process/listener evidence wins, while direct fallback occurs only after timeout without evidence. Blacksmith proof passed 61 focused daemon tests; fresh autoreview was clean; exact-head CI run 28745161192 completed successfully, including native Windows |
* fix(windows): bound clean scheduler exits before fallback * test(windows): cover scheduled task startup fallback * test(windows): assert startup fallback is not running
Summary
Adds a Windows scheduled-task fallback for the failure shape from Brad's workshop log:
schtasks /Runis accepted, but the task quickly reportsLast Run Result=0/ stopped and no gateway listener appears.Previously the fallback only handled the "accepted but never starts" state (
0x41303). This extends it to the early clean-exit/no-listener case by briefly polling for launch evidence, then launching the gateway script directly via the existing Startup-style detached fallback.Validation
pnpm exec vitest run src/daemon/schtasks.startup-fallback.test.ts src/daemon/schtasks.test.tspnpm exec oxlint src/daemon/schtasks.ts src/daemon/schtasks.startup-fallback.test.ts