[GH-ISSUE #2942] [Bug] Application CLI acceptance passes full Evidence through argv and fails ENAMETOOLONG on Windows #1037

Closed
opened 2026-10-15 18:30:33 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @N0zoM1z0 on GitHub (Oct 13, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/2942

A real Windows acceptance run fails before the semantic trace command starts because an entire application Evidence document is serialized into a process argument. This exceeds the Windows process command-line limit even for a tiny controlled application.

Pinned main d4f0c5e664; the affected file remains unchanged on current main ebaaa79ca. Native Windows11 x64, Node24.18.0, actual public compiled CLI, one Vitest5.0.3 worker, two logical CPUs. The original 70-file acceptance lane was externally stopped after1200s and is incomplete; its failure lines alone were not used to classify semantic bugs.

Isolated reproduction:

vitest run --project acceptance tests/acceptance/applications/applicationWorkflowCli.test.ts --maxWorkers=1 --testNamePattern="traces each ordinary rest argument" --reporter=verbose

The fixture writes function collect(first, ...rest) { return rest; } collect('first', 'second', 'third');, successfully analyzes it, then runCli at1593 passes JSON.stringify({application, query}) directly into execFile at the trace call at876. Node rejects spawn with ENAMETOOLONG (errno-4064). This is not a trace timeout or demonstrated incorrect semantic result; the trace process never starts. The single case fails after14.36s, before its20s timeout. Complete isolated lane47.49s,859.2MiB peak nativeJobcommit,20.25s sampledCPU,424.6MiB sampled familyworkingSet, zero owned processes. No heavy lane overlapped this diagnostic.

The CLI already accepts file-backed JSON; this same test file uses it in other cases. Fix the test request transport at a named owning boundary, preserve exact complete Evidence and provenance in an owned temporary file, and keep dedicated small inline-input parity/malformed-input tests. Do not skip Windows, truncate Evidence, shrink semantic fixtures to fit argv, add a platform-specific magic size threshold, or raise timeouts to hide this error.

Inspect adjacent application CLI suites and their duplicated ad-hoc execFile wrappers. Existing tests/support/cli/cliFixture.ts supplies owned child cleanup, actionable normalized results, supported Windows environment and a worker-scoped Node compile cache; reuse its established facts rather than inventing another launcher/cache. If adopting the cache, measure equivalent completed cold and warm public workflows (including full transport and retained Evidence costs), keeping correctness and parser/provenance assertions unchanged.

Raw isolated JSON report/stdout/stderr and resource receipts are retained locally in /tmp/rea-windows-e2e-20261013/results/acceptance-rest-first. No complete application Evidence was dumped into agent context or published. This issue concerns Windows acceptance transport/coverage; further failures require independent attribution.

Originally created by @N0zoM1z0 on GitHub (Oct 13, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/2942 A real Windows acceptance run fails before the semantic trace command starts because an entire application Evidence document is serialized into a process argument. This exceeds the Windows process command-line limit even for a tiny controlled application. Pinned main d4f0c5e664e26fe7ed1566dcc4b85ea9b57d52da; the affected file remains unchanged on current main ebaaa79ca. Native Windows11 x64, Node24.18.0, actual public compiled CLI, one Vitest5.0.3 worker, two logical CPUs. The original 70-file acceptance lane was externally stopped after1200s and is incomplete; its failure lines alone were not used to classify semantic bugs. Isolated reproduction: `vitest run --project acceptance tests/acceptance/applications/applicationWorkflowCli.test.ts --maxWorkers=1 --testNamePattern="traces each ordinary rest argument" --reporter=verbose` The fixture writes `function collect(first, ...rest) { return rest; } collect('first', 'second', 'third');`, successfully analyzes it, then `runCli` at1593 passes `JSON.stringify({application, query})` directly into `execFile` at the trace call at876. Node rejects spawn with `ENAMETOOLONG` (errno-4064). This is not a trace timeout or demonstrated incorrect semantic result; the trace process never starts. The single case fails after14.36s, before its20s timeout. Complete isolated lane47.49s,859.2MiB peak nativeJobcommit,20.25s sampledCPU,424.6MiB sampled familyworkingSet, zero owned processes. No heavy lane overlapped this diagnostic. The CLI already accepts file-backed JSON; this same test file uses it in other cases. Fix the test request transport at a named owning boundary, preserve exact complete Evidence and provenance in an owned temporary file, and keep dedicated small inline-input parity/malformed-input tests. Do not skip Windows, truncate Evidence, shrink semantic fixtures to fit argv, add a platform-specific magic size threshold, or raise timeouts to hide this error. Inspect adjacent application CLI suites and their duplicated ad-hoc `execFile` wrappers. Existing `tests/support/cli/cliFixture.ts` supplies owned child cleanup, actionable normalized results, supported Windows environment and a worker-scoped Node compile cache; reuse its established facts rather than inventing another launcher/cache. If adopting the cache, measure equivalent completed cold and warm public workflows (including full transport and retained Evidence costs), keeping correctness and parser/provenance assertions unchanged. Raw isolated JSON report/stdout/stderr and resource receipts are retained locally in `/tmp/rea-windows-e2e-20261013/results/acceptance-rest-first`. No complete application Evidence was dumped into agent context or published. This issue concerns Windows acceptance transport/coverage; further failures require independent attribution.
bsakaguchi 2026-10-15 18:30:33 +00:00
Author
Owner

@morluto commented on GitHub (Oct 14, 2026):

Resolved on main by 4d4631ac9.

Large Evidence requests are written to a file and passed by path instead of through argv. The public workflow passed on macOS; the Windows argv boundary itself was not rerun here.

Rechecked on main b8510ee00 in the current focused run: 20 test files passed, 225 tests passed and one platform-dependent test skipped. Relevant regression coverage: tests/acceptance/applications/applicationWorkflowCli.test.ts.

<!-- gh-comment-id:6174992790 --> @morluto commented on GitHub (Oct 14, 2026): Resolved on main by 4d4631ac9. Large Evidence requests are written to a file and passed by path instead of through argv. The public workflow passed on macOS; the Windows argv boundary itself was not rerun here. Rechecked on main b8510ee00 in the current focused run: 20 test files passed, 225 tests passed and one platform-dependent test skipped. Relevant regression coverage: tests/acceptance/applications/applicationWorkflowCli.test.ts.
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#1037
No description provided.