Skip to content

Client transaction test fixture has no child timeout or failure cleanup #4003

Description

@luvs01

Client or integration

Other

Area

Other

Summary

The client connection transaction fixture in tests/clients/client-connect.test.ts launches its Bun child with spawnSync without a timeout. A child that prints valid final JSON but remains alive can keep the test worker blocked; fixture cleanup is only returned after the synchronous call and JSON parsing succeed.

The fixture should enforce an internal child deadline, reject unsuccessful child completion before interpreting output, and remove both temporary homes when child execution or output parsing fails.

Reproduction

  1. Use dev commit 402be7c1f88283eb8465c3aec8437ccecd2542ec with the project-pinned Bun 1.4.0.
  2. Add a test-only script/deadline override to runTransactionScenario, leaving its existing spawnSync behavior unchanged. The injected child records its PID and the two fixture homes, prints {"ok":true}, and keeps a five-second timer alive. Request a two-second internal deadline.
  3. The baseline returns successfully after the five-second timer instead of reporting a timeout. The regression fails because no process error was raised. A child without that finite test fuse would have no deadline inside this fixture.
  4. With a bounded synchronous call, require timeout failure before a natural-exit marker is written, absence of the exact child PID, and removal of both homes. Also check valid output followed by nonzero exit and malformed output.

The mock uses temporary directories and local child processes only. It does not contact a provider or change production configuration. This identifies a fixture safety gap; it does not establish which test caused the earlier macOS CI cancellation.

Version

402be7c; Bun 1.4.0 (34cbb9a40)

Operating system

Microsoft Windows 11 Pro, version 10.0.26200 (build 26200)

Provider and model

Not provider-specific; local test fixture only.

Logs or error output

Expected constructor: ClientStateProbeError
Received value: undefined
(fail) transaction fixture stops a child retained after valid output [5090.21ms]
0 pass / 1 fail / 2 assertions

Screenshots and supporting files

The regression and bounded fixture change will be linked in a focused pull request.

Redacted configuration

No production configuration is required. The existing fixture supplies isolated OPENCODEX_HOME and CODEX_HOME directories and mocked network responses.

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 workinglanded-via-maintainerOriginal PR closed after landing via a maintainer merge train

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions