From 51e6dca6a53083f81787fe2c8200e7f8fe180f3d Mon Sep 17 00:00:00 2001 From: JavaZeroo <71128095+JavaZeroo@users.noreply.github.com> Date: Sat, 31 Oct 2026 19:40:43 +0800 Subject: [PATCH] diag(shell): append the parsed dump verdict to the probe failure refs #73 The raised message now ends with the same drained/rejected/child verdict the summariser computes, so reading a failure no longer depends on manual counting. --- experiments/shell/run.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/experiments/shell/run.py b/experiments/shell/run.py index 90ac222f..70fe82b6 100644 --- a/experiments/shell/run.py +++ b/experiments/shell/run.py @@ -17,6 +17,7 @@ ROOT = Path(__file__).resolve().parents[2] sys.path.insert(0, str(ROOT)) from experiments.build_paths import binary +from experiments.shell import summarize_failure from experiments.conpty.run import OwnedJob from experiments.shell.history_checks import validate_history, validate_native_scroll from experiments.shell.paste_checks import validate_paste_workflow @@ -504,7 +505,15 @@ def execute(exe, mode, out, timeout=40, settings_source=None, *, resources=False if not record["desktop_gone"]: raise ValueError("owned desktop remained") if mode != "watchdog" and (record["timed_out"] or record["exit_code"]): - raise ValueError("shell probe failed: " + record["stderr"].strip()) + # Read the dump back with the shared parser so the raised message always + # carries the same verdict instead of a raw multi-line stderr (#73). + failures = summarize_failure.parse(record["stderr"]) + summary = "" + if failures: + verdicts = summarize_failure.describe(failures[0]) + if verdicts: + summary = " | " + "; ".join(verdicts) + raise ValueError("shell probe failed: " + record["stderr"].strip() + summary) result = json.loads(record["stdout"]) if mode == "watchdog": if not record["timed_out"] or result != {"watchdog_ready": True} or record["job_at_timeout"]["active"] < 2: