rea/tests/boundary/process
Cassie_Fox 97aff28201
fix(electron): reject non-executable paths and contain launch rejections (#2705)
* fix(electron): reject non-executable paths and contain launch rejections

An executable_path that runs but never prints the inspector line made
Playwright's electron.launch() leave three waits unawaited. They rejected
unhandled and Node ended the CLI or the MCP server (#2269).

Check the resolved executable_path is a regular file, and on non-Windows
hosts that it passes X_OK, before any launch. Wrap only the launch call
in a scoped unhandledRejection listener that absorbs rejections whose
stack is in playwright-core/lib and re-throws anything else.

Tested on Linux with Node 22.23.1, 24.18.0 and 26.11.1.

Refs #2269

🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊

* fix(electron): absorb only this launch's orphaned rejections

The listener around the launch dropped every rejection with a
playwright-core stack, so an unrelated Playwright failure during the
launch window would vanish. Hold those rejections instead. When the
launch settles, drop only the ones whose message is part of the launch's
own error (the orphans of a failed launch). Raise every other one again
through the unhandledRejection path, so the process still fails. A launch
that succeeds raises all of them. Rejections without a Playwright stack
still fail at once.

One setImmediate turn before the decision lets rejections queued by the
settling tick arrive first. It is a single turn, not a timer. A shared
set of absorbed errors stops overlapping launches from raising each
other's orphans. The listener is removed on every path.

Add child-process tests that drive the built provider through its launch
seam, since Vitest's worker has its own unhandledRejection listener.

🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊

* test(electron): distinguish launch success from capture ownership

* test(electron): assert cleanup ownership failures around overlapping launches

* fix(comparison): recheck historical calls-only changes (#2223)

* fix(comparison): preserve incomplete function call evidence

Keep missing, unknown, partial and unresolved call relationships unknown in function comparisons and reconstruction claims. Aggregate IDA caller and callee coverage without overwriting uncertainty.

Validate with 144 focused tests, typecheck/lint, docs checks and test discovery. Real providers were not verified; the full headless IDA session suite requires unavailable Windows native controls.

* fix(comparison): recheck historical calls-only changes

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>

* fix(android): make DEX descriptor pattern portable

* fix(ci): isolate Linux Hopper process fixture inventory

* fix(browser): avoid replaying observed launch rejections

* style: format comparison and IDA sources

* test(electron): allow cold macOS ownership setup

* test(electron): allow cold macOS setup in the early-exit path test

The test that runs an executable which exits at once builds the Swift
ownership helper twice on macOS: in the CLI process, and again in the
MCP server process on its first tool call that prepares. A cold Swift
cache can spend up to 120 seconds on a build. The test had only the
30 second default.

Give the test 180 seconds, as e1579ec31 did for
electronLaunchRejections.test.ts and 65a809a0d did for
webSourceLocationCli.test.ts. cli.run has no deadline of its own, so
it needs no timeoutMs.

🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊

* test(ci): isolate report fixtures and declare PowerPC Java bounds

---------

Co-authored-by: Claude Opus 5.5 <opus@fox.invalid>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
Co-authored-by: Lucien <164857476+dakjdakd@users.noreply.github.com>
2026-10-14 07:30:14 +08:00
..
ProcessEvidence.host.test.ts refactor: remove forwarding exports and redundant aliases 2026-10-09 22:46:09 +08:00
ProcessEvidence.test.ts refactor(captures)!: require canonical producer metadata 2026-10-09 23:35:19 +08:00
adbDirectoryListing.test.ts fix(adb): preserve directory identities and share byte capture 2026-10-12 13:06:51 +08:00
androidAnalysisMcp.test.ts test(android): allow provider readiness under load 2026-10-10 03:52:35 +08:00
androidSearchEvidenceBudget.test.ts fix(android): bound inline search Evidence with retained inventory provenance (#1890) 2026-10-12 01:07:22 +08:00
applicationWorkflowVerifier.test.ts test: classify application scenarios by their actual boundaries 2026-10-09 02:58:03 +08:00
binarySessionCleanupRetry.test.ts test: strengthen archive and resource cleanup assertions 2026-10-12 04:53:27 +08:00
browserScenarioProbeLifecycle.test.ts fix(mcp): keep shared optional providers open across discarded probes (#2205) 2026-10-12 06:56:45 -07:00
cliEnvironmentSeam.test.ts refactor: use canonical implementations and types directly 2026-10-09 23:35:19 +08:00
darwinProcessRunTokenReader.test.ts feat(pcap): add bounded capture summaries through CLI and MCP 2026-10-13 04:53:03 +00:00
directAnalysisSignals.test.ts fix(cli): complete cleanup after relayed interrupts (#1202) 2026-10-09 12:45:23 +08:00
electronLaunchRejections.test.ts fix(electron): reject non-executable paths and contain launch rejections (#2705) 2026-10-14 07:30:14 +08:00
filesystemSnapshotFifoRace.test.ts refactor: prune obsolete provider and verification code 2026-10-12 08:59:14 +08:00
jadxIntegration.test.ts feat(android): expose exact DEX descriptors and direct invoke sites (#2439) 2026-10-13 22:02:47 +08:00
javascriptRuntimeReconciliationAmbiguity.test.ts fix(ci): share runtime fixtures and allow modest duplication headroom 2026-10-11 06:53:20 +08:00
javascriptSourceModes.test.ts fix(javascript): parse explicit CommonJS wrapper syntax (#2475) 2026-10-13 14:51:23 +08:00
ownedCommand.test.ts fix(reverse): reconcile cleanup ownership and mutation diagnostics (#2799) 2026-10-14 04:47:34 +08:00
ownedDebuggerSession.test.ts fix(reverse): reconcile cleanup ownership and mutation diagnostics (#2799) 2026-10-14 04:47:34 +08:00
packagePackIsolation.test.ts refactor: prune obsolete provider and verification code 2026-10-12 08:59:14 +08:00
processCaptureCancellationAdapters.test.ts test(process): report cleanup details on cancellation failures 2026-10-10 03:52:35 +08:00
processCaptureCapability.test.ts fix(process): preserve partial evidence and verify detached cleanup (#1011) 2026-10-08 04:46:46 +08:00
processCaptureCapability.ts refactor(process): separate capture implementation from analyst workflows (#988) 2026-10-08 00:46:21 +08:00
processCaptureLifecycle.test.ts feat(ida): resolve containing procedures and report the admitted program as the document (#2374) 2026-10-13 20:56:20 +08:00
processCaptureNormalization.test.ts fix(process): resolve POSIX backslash basenames through PATH (#2471) 2026-10-13 20:51:44 +08:00
processCaptureProgress.test.ts test(process): prepare SDK validation before cancellation timing 2026-10-10 18:54:57 +08:00
processCaptureTerminal.test.ts refactor: remove forwarding exports and redundant aliases 2026-10-09 22:46:09 +08:00
processCli.test.ts test(process): use owned CLI and workspace fixtures 2026-10-10 01:45:01 +08:00
processFilesystemCoverageAdapters.test.ts feat(process): bound a finalization interval before forced capture timeout 2026-10-11 09:55:43 +08:00
processHostIdentity.test.ts fix(process): preserve partial evidence and verify detached cleanup (#1011) 2026-10-08 04:46:46 +08:00
processPreparation.test.ts refactor(captures)!: require canonical producer metadata 2026-10-09 23:35:19 +08:00
processSessionMcp.test.ts fix(process)!: bound terminal buffers before capture 2026-10-11 03:19:29 +08:00
processSettlementDeadline.test.ts fix(process): report single empty settlement observation as unverifiable (#2232) 2026-10-13 00:15:12 +08:00
processTruncationAdapters.test.ts perf(tests): remove timed output and synchronize browser fixtures 2026-10-11 13:20:16 +08:00
providerProcess.test.ts fix(reverse): reconcile cleanup ownership and mutation diagnostics (#2799) 2026-10-14 04:47:34 +08:00
providerProcessOutput.test.ts fix(reverse): reconcile cleanup ownership and mutation diagnostics (#2799) 2026-10-14 04:47:34 +08:00
runtimeBundle.test.ts fix(cli): preserve failure semantics across full-output formats 2026-10-13 03:33:27 +08:00
scanTodos.test.ts test: classify filesystem and process workflows by boundary 2026-10-12 04:44:13 +08:00
selectedExecutableCancellation.test.ts feat(browser): inspect historical web network captures (#992) 2026-10-08 07:53:41 +08:00
sourceMapUncHosts.test.ts fix(javascript): share source-map resolution and preserve path uncertainty 2026-10-13 13:48:24 +08:00