fix: wait for child process completion before parent exits#526
fix: wait for child process completion before parent exits#526Brooooooklyn merged 7 commits intomainfrom
Conversation
|
... Fixed in 3600008. The test was invoking the TypeScript source file directly instead of using the built CLI binary from |
|
@claude[agent] still failed: |
… status Co-authored-by: Brooooooklyn <[email protected]> Agent-Logs-Url: https://github.com/oxc-project/oxc-node/sessions/270771b4-6f08-4d20-a3b1-778ef37c3fc8
... Fixed in 5de025e. The Promise now resolves with the child's exit code instead of |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5de025e105
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const result = spawnSync(process.execPath, [CLI_PATH, FIXTURE_PATH, outputPath], { | ||
| encoding: "utf8", | ||
| env: { | ||
| ...process.env, | ||
| NODE_OPTIONS: undefined, | ||
| }, | ||
| }); |
There was a problem hiding this comment.
Run CLI with isolated stdio in completion regression test
spawnSync is invoked with default stdio (pipe), but the CLI under test spawns its child with stdio: "inherit"; that grandchild inherits the same pipe FDs, so this spawnSync call can block until the grandchild exits even if the CLI process exits too early. In that scenario the existsSync(outputPath) assertion still passes, so the test does not actually catch the regression it is meant to guard against.
Useful? React with 👍 / 👎.
|
@claude[agent] from reviewer comments: |
… stdio Agent-Logs-Url: https://github.com/oxc-project/oxc-node/sessions/1c349475-f508-4df8-8808-db66ff6037ab Co-authored-by: Brooooooklyn <[email protected]>
Fixed in 21f6d75. Added |
oxnodeparent process can exit before child process finishes #493