Repository navigation
fix(windows): query the named task within the stop deadline - #8974
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
✅ Deterministic PR hygiene checks passed. |
|
Maintainer integration into
|
Resolve against lidge-jun#8931 and lidge-jun#8974: keep dev's framed baseline snapshot, partial output, stop-before cutoff and mutation evidence, and apply this branch's native engine-identity proof and missing-owner fallback on top. The engine-proof verdict still has to match the helper verdict, and the fixture helper gains the dev clock and approval stubs plus both scenario sets.
|
Additional real-world reproduction on Windows 11 Pro x64 (10.0.26100), OpenCodex Desktop 2.100.7:
This looks consistent with the issue addressed here. The |
Summary
When the Windows Desktop updater drains the proxy, the shipped registration probe can spend its two-second deadline listing every scheduled task after a named query misses. A machine with no OpenCodex task can consequently report unreadable service registration.
Query the fixed root task using the trusted
schtasks.exe /query /tn \opencodex-proxy /fo CSV /nh /hresult. On x64 the live runner pins the spawned child with a read-only Windows process handle, reads its full exit code after completion, and releases the handle. An exact matching CSV row proves presence. The full0x80070002from the named lookup with a consistent process result proves absence. Bun 1.4.4 exposes only the low byte through its ordinary child exit status, so the value2alone supplies no such proof. Other HRESULTs and late answers leave the registration unknown. The exact COM lookup remains available within the original deadline where the full native result cannot be captured.Verification
e632b73c, the three focused Windows stop suites passed all 65 tests (409 assertions). I combined fix(service): enforce Windows stop evidence and deadline boundaries #8931 (02ef13eb), this PR (e632b73c) and fix(windows): recognize Korean disabled and queued task states #8976 (37d9f429) locally. All six merge orders produced tree8de47af512ebed48dd62e286ce4cedb4d036e535without conflict. Five Windows suites on that tree passed 141 tests (681 assertions). Three additional integration checks passed: the named task probe and state parser handled Korean queued/disabled values without a PowerShell fallback, and a spent pre-dispatch budget prevented a Scheduler query from starting. Both the standalone and combined trees passed typecheck, structure and diff checks. The Desktop installation described below was tested on the earlier revision.2, native exit code2147942402, and returned absent after 112 ms. Under concurrent validation, a late answer was rejected at the original deadline./HRESULTquery returned0x80070002there in 66 ms.94500b43. The ordinary tray Install update action at 10:35:40 handed off to Windows Installer at 10:35:57. At 10:38:06 the official v2.100.6 MSI completed with exit code 0 (MsiInstaller events 1033, 11707 and 1042). The accepted MSI matched the official SHA-256. The old shell and sidecar exited. The official v2.100.6 shell relaunched automatically, started its own v2.100.6 listener, and returned HTTP 200 from/healthz. The guest returned HTTP 503 from/readyzbefore and after the update. This run verifies the normal updater handoff, installation, and runtime restart. It leaves the independent readiness condition unresolved. The stock control succeeded under a different initial state.bun --no-env-file --no-install scripts/test.ts --no-env-file --no-install --isolate --parallel=1 tests/windows/windows-checked-stop-live.test.ts tests/windows/windows-process-evidence.test.ts tests/windows/windows-service-stop-wiring.test.tspassed all 65 tests, 409 assertions. A native child-process test distinguishes two 32-bit HRESULTs that both end in02. The PowerShell fixture covers a missing task, denied access, inaccessible service/folder, and invalid output.bun run typecheckpassed for 2,681 files.bun run structure:checkandgit diff --checkpassed. Local validation used the affected Windows suites on a shared workstation. Broader suite coverage is left to CI.Checklist
Summary by CodeRabbit