mirror of
https://github.com/morluto/rea.git
synced 2026-11-16 19:53:50 +00:00
fix(process): classify GDB, Apktool and Java-probe launch failures through the shared launch owner (#11631)
* fix(process): classify GDB, Apktool and Java-probe launch failures through the shared launch owner GDB session start, the Apktool version probe and the Jadx and Ghidra Java probes read a launcher's error with launcherFailureOf and report host capacity (EAGAIN, ENOMEM, EMFILE, ENFILE) and E2BIG through the shared classifyLaunchFailure, keeping their own unavailable reports for refusals. Only a launcher-raised errno counts as a launch failure, and a GDB launch failure no longer retries the MI2 dialect. The refusal-only classifyLaunchFailure helper is removed. Refs #11614 * fix(process): name the environment as the E2BIG repair for fixed-argument launches GDB, the Apktool version probe and the Jadx and Ghidra Java probes launch fixed arguments, so selecting less input cannot shrink an oversized launch. The shared launch report takes fixedArguments and then tells the caller to shrink the environment REA runs with. Launch tests check structured facts and guidance delivery instead of whole sentences. * fix(process): report which launch input an E2BIG refusal leaves to shrink as a structured fact
This commit is contained in:
1 parent
0035d8edb3
commit
e5cf021ca6
13 files changed
+371
-56
No files matched your search
@@ -18,7 +18,7 @@ import {
|
||||
withVerifierFixture,
|
||||
} from "./lib/verifier-fixture.mjs";
|
||||
import { createVerifierCommands } from "./lib/verify-commands.mjs";
|
||||
import { classifyLaunchFailure } from "../dist/process/launchFailure.js";
|
||||
import { launcherFailureOf } from "../dist/process/launchFailure.js";
|
||||
|
||||
// Compile every regular expression and schema the packaged server advertises,
|
||||
// in every schema profile, with the engines and validators clients and
|
||||
@@ -80,11 +80,13 @@ const runHelper = async (
|
||||
}));
|
||||
}
|
||||
} catch (error) {
|
||||
const refusal = classifyLaunchFailure(error);
|
||||
if (refusal !== undefined)
|
||||
// Only a launch refusal means the engine is not installed; a host
|
||||
// capacity failure is a broken check.
|
||||
const launch = launcherFailureOf(error);
|
||||
if (launch?.kind === "missing" || launch?.kind === "not_executable")
|
||||
return engines.map((engine) => ({
|
||||
...engine,
|
||||
unavailable: `${command} could not start (${refusal.code})`,
|
||||
unavailable: `${command} could not start (${launch.code})`,
|
||||
}));
|
||||
// A helper that started but failed is a broken check, not a missing
|
||||
// engine, so it fails even when engines are optional.
|
||||
|
||||
Reference in new issue
Block a user