[codex] Fallback when Windows gateway task exits early#76245
[codex] Fallback when Windows gateway task exits early#76245
Conversation
|
Codex review: found issues before merge. Summary Reproducibility: yes. for the unit-level failure shape: the PR models Next step before merge Security Review findings
Review detailsBest possible solution: Land the narrow fallback after adding a changelog entry and maintainer review confirms the short early-exit polling window is acceptable. Do we have a high-confidence way to reproduce the issue? Yes for the unit-level failure shape: the PR models Is this the best way to solve the issue? Yes for the code direction: it reuses the existing launch-evidence checks and Startup-style detached fallback instead of adding a new Windows service path. It is not merge-ready until the required changelog entry and maintainer review are handled. Full review comments:
Overall correctness: patch is correct What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 10448a0ad14c. |
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