Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Caution Review failedThe pull request is closed. No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Review of #8727: the default Windows Part A hook always answered absent, so the update-handover cases where the service manager stops the proxy itself took the API POST path on Windows and still passed. The hook now ends the child and answers stopped when managerCascades is set, and those three cases assert that no stop request was sent. With the old hook they fail under OCX_TEST_WIN_STOP=1; both files pass 151/0 on Linux and simulated Windows.
|
✅ Deterministic PR hygiene checks passed. |
|
Closing as superseded by #8716 (merged as d0f197d), which fixes the same root cause in |
Summary
windows 5/14 of dev batch run 43413601225 failed six cases of
tests/service/stop-deferred-teardown.test.ts"parent CLI shared teardown completion": "PID-identified hub client keeps the 404 to signal path", "R6 connectAfterBoundary / connectDuringRestore preserves hub writes (receipt true/false)" and "R6 follow-up receipt pendingAfterGrok". In each,report.unexpectedIoheld threeexecFileSynccalls.This is an older Windows test-assumption bug from #8573 (
d1f36eda24, the checked Windows stop on every stop path); #8416 does not explain it. The fixture fakes the proxy as PID 4242 and mocksnode:child_process. On a real Windows host, ordinary cases let the real Part A runwindowsStopChildPid()→verifyPidIdentity(4242). The native read finds no such process, so the lookup falls back to one WMIC and two PowerShell probes, the three unexpected calls. The earlier batch's Windows logs show no run of this file, so no earlier Windows pass is established.On Windows,
tests/fixtures/parent-stop-runner.tsnow answers Part A and Part B with the existingsetWindowsServiceStopHooksForTestshooks for ordinary cases. Part A answers "stopped" and ends the child whenmanagerCascadesis set (a manager stopping the proxy itself), otherwise "absent"; Part B answers "freed". This way so the host's process table and service manager never see the fake PID. Cases that already install their own Windows hooks keep them.Where the product's Windows rule differs, the tests assert that rule. On Windows a stop must record a deferred-teardown receipt (
windowsStopRequiresReceipt), andclaimTeardowninsrc/cli/index.tsrefuses before any POST when it cannot. So the receipt-false cases expect no POST, kill or restoration, exit 1, andok: false. POSIX expectations are unchanged.OCX_TEST_WIN_STOP=1drives the same Windows wiring on Linux. Two simulated-Windows cases use it so the isolation and the receipt rule run on every runner. The PID-identified 404 case still exercises the documentedtaskkillfallback after a failed graceful stop.Verification
execFileSynccalls. After:OCX_TEST_WIN_STOP=1 bun test tests/service/stop-deferred-teardown.test.tsgives 120 pass, 0 fail.tests/update/update-teardown-handover.test.tsandtests/service/stop-deferred-teardown.test.tsgive 151 pass, 0 fail both normally and withOCX_TEST_WIN_STOP=1. The three manager-cascade cases now assert no stop request was sent; with the old always-absenthook they fail under the simulation.bun run test:changed: 120 pass, 0 fail.bun run typecheck: exit 0.Checklist