Skip to content

Flaky: auth.test.ts "releases native login pipes when the cross-platform fallback fires" #252

Description

@rohanpoudel2

Summary

tests-ts/auth.test.ts — "releases native login pipes when the cross-platform fallback fires" failed once during a full-suite run and passed on every rerun afterwards, both in isolation and in the full suite. Filing it because an intermittent failure in the suite is worth a look before it lands in CI, not because I can reproduce it on demand.

Environment

  • @openai/codex-security 0.1.5, on a branch based on main at ea19f24
  • macOS 15 (Darwin 25.5.0), Bun 1.3.14, Node.js 24.11.1
  • bun test --timeout 30000 ./tests-ts

Observed

One failure in one full-suite run. Immediately rerunning the file alone passed, and three subsequent full-suite runs passed. I did not capture the assertion output before the rerun overwrote it, which is a gap in this report.

Why it is plausibly real rather than machine noise

The test name describes releasing OS pipes when a fallback path fires, which is the shape of thing that tends to be sensitive to process/descriptor timing rather than to logic. Bun runs test files in one process, so descriptor pressure or ordering from a neighbouring file is a candidate. Two suite features make that worth checking specifically:

  • other tests manipulate process.umask and restore it in finally, so they share mutable process state
  • other tests spawn subprocesses and pack tarballs, so descriptor counts vary between runs

Suggested direction

Run the file under repetition and under load to see whether it is order-dependent or descriptor-dependent, e.g. a loop of full-suite runs, and separately the file alone with an artificially lowered descriptor limit. If it is a genuine race in the fallback's cleanup, the fix belongs in the code under test rather than the assertion. If it turns out to be a test-only ordering assumption, an explicit wait on the release rather than a timing-dependent assertion would settle it.

Happy to dig into it if a maintainer confirms it is worth chasing — I did not want to change a passing test on the strength of a single unreproduced failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions