Skip to content

test: remove stdout-drain and fixture-replacement races - #132

Merged
abruption merged 1 commit into
mainfrom
test/ci-fixture-races
Oct 14, 2026
Merged

abruption merged 1 commit into
mainfrom
test/ci-fixture-races

Conversation

@abruption

@abruption abruption commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

CLI contract tests now wait for child close, so stdout/stderr pipes have drained before JSON parsing. The coordinated replacement fixture prepares a sibling file and atomically renames it over the original, keeping the path present while changing its inode; the separate unlink case is unchanged.

This addresses two existing harness races exposed by documentation PRs: #124's malformed-thread-ID test parsed incomplete stdout in run 38350388686, and #125's replacement test observed the fixture's temporary absent path in run 38350521889.

Closes #131

Type

  • feat
  • fix
  • docs
  • chore / refactor / test / perf / ci

Safety impact

Only the CLI test helper and synthetic writer fixture change. Real advisory locks, existing inode/retry assertions, separate absence coverage, production probing, and production retry budgets are preserved.

Checklist

  • npm run check passes
  • npm run lint passes
  • npm test passes
  • npm run smoke:package passes when packaging changed
  • Commits follow Conventional Commits
  • Documentation is updated when behavior or output changed (no product behavior changes)
  • No tokens, private paths, or unredacted process data are in the diff

Notes

Local validation on macOS arm64, Node 24.16.0: npm ci, type checking, lint, all 223 tests, package smoke, and git diff --check passed. The affected CLI parsing and coordinated unlink/replace tests also passed 20 consecutive focused runs. Full platform CI remains required; local results do not establish the outcome of reruns on the original macOS x64 runners.

once(child, "close") retains rejection on child startup errors. The replacement file is created exclusively in the isolated synthetic fixture directory before an atomic same-directory rename, while the native guard is held. No assertions were weakened and no tests disabled.

Current validation

At 9117a7bdac21defdbaaaae2a735734517240743b, all 33 PR checks pass, including the supported macOS/Linux matrix. Current-head Codex Code/Security reviews completed without inline findings. The original documentation PR jobs also passed on one rerun; their first failures remain documented above and in #131.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T05:28:52.318252Z 9117a7b PR opened
🔒 Security Review ✅ Completed 2026-10-13T05:29:34.576126Z 9117a7b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@abruption
abruption merged commit 9bca850 into main Oct 14, 2026
33 checks passed
@abruption
abruption deleted the test/ci-fixture-races branch October 14, 2026 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: remove stdout-drain and fixture-replacement races

1 participant