[PR #2781] [MERGED] fix(javascript): recover child-process options without args #5388

Closed
opened 2026-10-31 01:06:15 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2781
Author: @naimur-reza
Created: 10/13/2026
Status: ✅ Merged
Merged: 10/13/2026
Merged by: @morluto

Base: main ← Head: fix/child-process-options


📝 Commits (3)

  • 7b02d88 docs: celebrate 180,000 GitHub stars 🎉
  • 0e8c21a fix(javascript): recover child-process options without args
  • 050aff9 fix(javascript): preserve execFile callback overload options

📊 Changes

3 files changed (+107 additions, -5 deletions)

View changed files

📝 README.md (+1 -1)
➕ src/domain/javascript/childProcessOptionsRegression.test.ts (+97 -0)
📝 src/domain/javascript/javascriptSemanticChildProcesses.ts (+9 -4)

📄 Description

Summary

Fix child-process options detection when the optional args array is omitted in spawn(), execFile(), and fork() calls.

Problem

The JavaScript semantic analyzer assumes child-process options are always passed as the third argument for these methods. However, Node.js also supports passing options directly as the second argument.

This causes the analyzer to miss explicitly supplied environment and stdio settings.

Changes

  • Update spawnOptions() to recognize options passed as the second argument.
  • Preserve existing handling of explicit args arrays.
  • Add three regression tests covering omitted args, explicit args arrays, and omitted options.

Validation

  • Focused regression tests: 3 passed
  • TypeScript typecheck
  • ESLint
  • git diff --check

Scope

Changes are limited to JavaScript semantic child-process analysis and its regression tests. No schema or execution-authority changes are intended.

Related to #2571.

Note: I noticed another contributor is preparing a producer-level fix with broader CLI/MCP coverage. This PR offers a smaller domain-level implementation for review and may overlap with that work.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/2781 **Author:** [@naimur-reza](https://github.com/naimur-reza) **Created:** 10/13/2026 **Status:** ✅ Merged **Merged:** 10/13/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/child-process-options` --- ### 📝 Commits (3) - [`7b02d88`](https://github.com/morluto/rea/commit/7b02d88391a4c55f7de6d051bea8ba927f00885b) docs: celebrate 180,000 GitHub stars 🎉 - [`0e8c21a`](https://github.com/morluto/rea/commit/0e8c21aa712fe773461384747e1bbbce6839759c) fix(javascript): recover child-process options without args - [`050aff9`](https://github.com/morluto/rea/commit/050aff92bb81fd94b9d34f401e472103ec7d7bdd) fix(javascript): preserve execFile callback overload options ### 📊 Changes **3 files changed** (+107 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -1) ➕ `src/domain/javascript/childProcessOptionsRegression.test.ts` (+97 -0) 📝 `src/domain/javascript/javascriptSemanticChildProcesses.ts` (+9 -4) </details> ### 📄 Description ## Summary Fix child-process options detection when the optional args array is omitted in `spawn()`, `execFile()`, and `fork()` calls. ## Problem The JavaScript semantic analyzer assumes child-process options are always passed as the third argument for these methods. However, Node.js also supports passing options directly as the second argument. This causes the analyzer to miss explicitly supplied environment and stdio settings. ## Changes - Update `spawnOptions()` to recognize options passed as the second argument. - Preserve existing handling of explicit args arrays. - Add three regression tests covering omitted args, explicit args arrays, and omitted options. ## Validation - [x] Focused regression tests: 3 passed - [x] TypeScript typecheck - [x] ESLint - [x] `git diff --check` ## Scope Changes are limited to JavaScript semantic child-process analysis and its regression tests. No schema or execution-authority changes are intended. ## Related issue Related to #2571. Note: I noticed another contributor is preparing a producer-level fix with broader CLI/MCP coverage. This PR offers a smaller domain-level implementation for review and may overlap with that work. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:06:15 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#5388
No description provided.