mirror of
https://github.com/stablyai/orca.git
synced 2026-10-30 16:47:34 +00:00
Extract subprocess execution and process contracts into @orca/process-host with explicit public entry points, independent checks, and one Node 18 compatible CommonJS runtime. Migrate application consumers and integrate package builds, dependency selection, import enforcement, and runtime resource staging. Preserve daemon startup ownership and profile isolation, and qualify development rebuild recovery and concurrent output publication. Remove unnecessary aliases, test forwarding exports, and a duplicate output scan. Validation: full typechecks, changed-code quality, package and artifact checks, native Windows builds/types plus 306 runtime tests, and independent native reviews. Matched full E2E controls on original main and unchanged reviewed head both pass all 17 applicable tests (nine skips). Earlier intermittent E2E failures are documented in the PR; no assertions were weakened. The final combined-tree audit preserves both branches with no import-boundary violations.
12 lines
543 B
JavaScript
12 lines
543 B
JavaScript
/** Why a failed child failed, for CI logs where an empty stderr alone says nothing. */
|
|
export function describeProcessFailure(result) {
|
|
const detail = [
|
|
`code=${result.code ?? 'none'}`,
|
|
`signal=${result.signal ?? 'none'}`,
|
|
...(result.timedOut ? ['timed out'] : []),
|
|
...(result.outputTruncated ? ['output truncated'] : [])
|
|
].join(' ')
|
|
const stream = (name, text) => (text?.trim() ? `\n${name}:\n${text.trim().slice(-4000)}` : '')
|
|
return `${detail}${stream('stdout', result.stdout)}${stream('stderr', result.stderr)}`
|
|
}
|