Skip to content

Windows evidence runs dispatched from stale refs used a pre-#4876 ci.yml and reproduced its batch-serialization bug #4901

Description

@lidge-jun

Client or integration

Other

Area

Platform (Windows / macOS / Linux)

Summary

Two Windows test shards failed on two different files during a period of heavy Actions queue contention, and both failures are the same defect: an in-test deadline that has to cover a Windows cold first child process start is sized for an idle runner.

Neither failure is a defect in the code under test. A lane=all dispatch of dev at 6d19a07369 (run 35215552842) passed all nine Windows shards with zero failures or cancellations.

The two failures blamed different tests, which is the pattern tests/helpers/test-budget.ts opens by warning about: "a run of windows-latest failures kept blaming a different test each time. The blame moved; the cause did not."

Failure 1 — run 35211904734, windows 3/9, tests/codex-integration/codex-write-lock.test.ts, two real processes contend for one lock > one OS user and one home take ONE lock case 1 (15.5s) and case 2 (17.2s); case 0 passed.

The stack resolves to waitFor at line 340 called from line 459, which is await waitFor(holdMarker). So the holder child did not publish its hold marker within INTERNAL_DEADLINE_MS (15s). The contention assertion was never reached, and holdMs (20s) was never approached. The 15.5s and 17.2s case durations line up with the 15s deadline plus overhead.

Failure 2 — run 35210400258, windows 7/9, tests/codex-integration/native-main-owner-lifetime.test.ts, a successor scrubs a hard-killed production auth write before recovery or main admission (46.7s), reported as child event timeout; events=[] stderr=.

The stack resolves to ChildHarness.waitFor at line 215. The failing wait is the first one in the test, await owner.waitFor(event => event.event === "listening"), bounded by OWNER_EVENT_WAIT_MS = watchdogMs(10_000). An empty events array means the child never emitted listening at all.

Why this is one defect. Both waits bound the cold start of a file's first spawned child on Windows, and both are sized below the range this repository has already measured for exactly that. COLD_SPAWN_BUDGET_MS documents a first child publishing its port at 50.7s while the next spawn in the same file was ready in 1.76s, with surviving readiness waits spanning 2.0s to 19.7s. codex-write-lock.test.ts states in its own comment that "a spawned holder child boots in 8-19 s on a loaded windows-latest shard" while bounding that wait at 15s. The documented range is wider than the deadline.

A second, independent defect makes both failures unreadable. Neither wait observes the child process. waitFor in the lock test polls a file size and throws timed out waiting for <path> with no other information; ChildHarness.waitFor prints buffered events and stderr but never inspects child.exited or child.exitCode. A child that died and a child that is merely slow produce the identical message, so the two cannot be distinguished from CI output alone. That is why events=[] stderr= is not conclusive on its own.

Reproduction

  1. Push enough branches to saturate the Actions queue so Windows shards run under contention.
  2. Observe run 35211904734 job windows 3/9 and run 35210400258 job windows 7/9.
  3. Compare against run 35215552842, a lane=all dispatch of dev at 6d19a07369 on an idle queue, where all nine Windows shards pass.

The two pull requests carrying those branches have no file-level overlap with either failing test, and both failing assertions are child-process readiness waits rather than assertions about the changed code.

Version

6d19a07

Operating system

Windows (hosted windows-latest shards). Both failures are Windows-only; the Linux and macOS shards of the same runs were unaffected.

Provider and model

Not applicable — test harness defect.

Logs or error output

# run 35211904734, windows 3/9
Test failure in shard 3/9 batch 9/25 (exit 1); not retrying assertion/test failures.
tests\codex-integration\codex-write-lock.test.ts:340
      at waitFor (D:\a\opencodex\opencodex\tests\codex-integration\codex-write-lock.test.ts:340:15)
      at async <anonymous> (D:\a\opencodex\opencodex\tests\codex-integration\codex-write-lock.test.ts:459:13)

# run 35210400258, windows 7/9
Test failure in shard 7/9 batch 9/25 (exit 1); not retrying assertion/test failures.
tests\codex-integration\native-main-owner-lifetime.test.ts:215
      at waitFor (D:\a\opencodex\opencodex\tests\codex-integration\native-main-owner-lifetime.test.ts:215:19)
child event timeout; events=[] stderr=

Screenshots and supporting files

Baseline for comparison: run 35215552842 (lane=all dispatch, dev at 6d19a07369), nine of nine Windows shards successful.

Redacted configuration

{}

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingplatformOS/service/tray/ACL (Windows-heavy, not Windows-only)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions