The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
ci: fix PLW1509, PLW1510, PLW2101 linter errors
Maciej Lisiewski0006a5e229ae
diff --git a/agent/anthropic_adapter.py b/agent/anthropic_adapter.pyindex 1f58f7e3c1c..7c949fa5f3e 100644--- a/agent/anthropic_adapter.py+++ b/agent/anthropic_adapter.py@@ -288,6 +288,7 @@ def _detect_claude_code_version() -> str:result = subprocess.run([cmd, "--version"],stdin=subprocess.DEVNULL, capture_output=True, text=True, encoding='utf-8', errors='replace', timeout=5,+ check=False,)if result.returncode == 0 and result.stdout.strip():version = result.stdout.strip().split()[0] # "2.1.74 (Claude Code)" or "2.1.74"diff --git a/agent/anthropic_credentials.py b/agent/anthropic_credentials.pyindex e3ba2f9c09a..5f7b5cc9c24 100644--- a/agent/anthropic_credentials.py+++ b/agent/anthropic_credentials.py@@ -265,6 +265,7 @@ def _find_claude_code_keychain_item() -> Optional[tuple[str, dict[str, Any]]]:result = subprocess.run(["security", "find-generic-password", "-s", _CLAUDE_CODE_KEYCHAIN_SERVICE, "-g"],capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=5, stdin=subprocess.DEVNULL,+ check=False,)except (OSError, subprocess.TimeoutExpired):return None@@ -294,6 +295,7 @@ def _read_claude_code_keychain_payload() -> Optional[dict[str, Any]]:result = subprocess.run(["security", "find-generic-password", "-s", _CLAUDE_CODE_KEYCHAIN_SERVICE, "-w"],capture_output=True, text=True, encoding='utf-8', errors='replace', timeout=5, stdin=subprocess.DEVNULL,+ check=False,)except (OSError, subprocess.TimeoutExpired):logger.debug("Keychain: security command not available or timed out")@@ -597,6 +599,7 @@ def _mirror_claude_code_credentials_to_keychain(account, _merge_keychain_credential_payload(existing, access_token, refresh_token, expires_at_ms))result = subprocess.run(argv, input=line, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=10,+ check=False,)except Exception as e: # the file commit already succeeded; a Keychain hiccup must not fail the rotationlogger.debug("Keychain mirror skipped (%s)", e)@@ -717,7 +720,7 @@ def run_oauth_setup_token() -> Optional[str]:raise FileNotFoundError("The 'claude' CLI is not installed. Install it with: npm install -g @anthropic-ai/claude-code")# Interactive: stdio inherited so the user can complete the OAuth prompt. noqa: subprocess-stdintry:- subprocess.run([claude_path, "setup-token"])+ subprocess.run([claude_path, "setup-token"], check=False)except (KeyboardInterrupt, EOFError):return Nonecreds = read_claude_code_credentials()diff --git a/agent/command_token_source.py b/agent/command_token_source.pyindex fdcf2e7f343..604eac0c1d2 100644--- a/agent/command_token_source.py+++ b/agent/command_token_source.py@@ -53,6 +53,7 @@ def _mint(command: str, label: str) -> tuple[str, Optional[float]]:completed = subprocess.run(command, stdin=subprocess.DEVNULL, shell=True, capture_output=True, text=True, errors="replace", timeout=_MINT_TIMEOUT_SECONDS,env=served_profile_child_env(inherit_credentials=True),+ check=False,)except subprocess.TimeoutExpired as exc:raise CommandTokenError(diff --git a/agent/copilot_acp_client.py b/agent/copilot_acp_client.pyindex 4ad491d1c12..ff2c65c67ca 100644--- a/agent/copilot_acp_client.py+++ b/agent/copilot_acp_client.py@@ -98,6 +98,7 @@ def _acp_supported(command: str, args: list[str]) -> bool | None:capture_output=True, text=True, encoding="utf-8",errors="replace", timeout=5,stdin=subprocess.DEVNULL,+ check=False,)except (FileNotFoundError, subprocess.TimeoutExpired, OSError):return Nonediff --git a/agent/proxy_sources/iron_proxy.py b/agent/proxy_sources/iron_proxy.pyindex aa45bc90e91..4f137f20c8e 100644--- a/agent/proxy_sources/iron_proxy.py+++ b/agent/proxy_sources/iron_proxy.py@@ -218,7 +218,7 @@ def allowlisted_env() -> dict[str, str]:def _run(argv: list[str], *, timeout: int, text: bool = False, **kwargs) -> subprocess.CompletedProcess:if text:kwargs.update(text=True, encoding="utf-8", errors="replace")- return subprocess.run(argv, capture_output=True, timeout=timeout, stdin=subprocess.DEVNULL, **kwargs)+ return subprocess.run(argv, capture_output=True, timeout=timeout, stdin=subprocess.DEVNULL, **kwargs) # noqa: PLW1510 -- forwarding wrapper: callers pass subprocess kwargs via **kwargs (check may arrive through it); an explicit check=False would raise TypeErrordef iron_proxy_version(binary: Path) -> str:diff --git a/agent/secret_sources/base.py b/agent/secret_sources/base.pyindex eba98b6eeb7..998afc21668 100644--- a/agent/secret_sources/base.py+++ b/agent/secret_sources/base.py@@ -227,6 +227,7 @@ def run_cli(argv: Sequence[str], *, env: dict[str, str], timeout: float, label:return subprocess.run(list(argv), env=env, capture_output=True, text=True, encoding="utf-8", errors="replace",timeout=timeout, stdin=stdin,+ check=False,)except subprocess.TimeoutExpired as exc:raise RuntimeError(timeout_message) from excdiff --git a/agent/trace_upload.py b/agent/trace_upload.pyindex d517caa5920..fbf51a5fdc3 100644--- a/agent/trace_upload.py+++ b/agent/trace_upload.py@@ -114,7 +114,7 @@ def _git_branch(cwd: str) -> str:import subprocessr = subprocess.run(["git", "rev-parse", "--abbrev-ref", "HEAD"],capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=3, cwd=cwd,- stdin=subprocess.DEVNULL)+ stdin=subprocess.DEVNULL, check=False)except Exception:return ""return r.stdout.strip() if r.returncode == 0 else ""diff --git a/agent/transports/codex_app_server.py b/agent/transports/codex_app_server.pyindex a64cec40d2a..36bbf78864f 100644--- a/agent/transports/codex_app_server.py+++ b/agent/transports/codex_app_server.py@@ -364,6 +364,7 @@ def check_codex_binary(proc = subprocess.run([codex_bin, "--version"], capture_output=True, text=True, encoding='utf-8', errors='replace',timeout=10, stdin=subprocess.DEVNULL,+ check=False,)except FileNotFoundError:return False, f"codex CLI not found at {codex_bin!r}. Install with: npm i -g @openai/codex"diff --git a/agent/vault_backends/base.py b/agent/vault_backends/base.pyindex 6795a2ba754..6e7c1f5bab1 100644--- a/agent/vault_backends/base.py+++ b/agent/vault_backends/base.py@@ -65,7 +65,7 @@ def run_with_stdin_secret(argv: Sequence[str], *, env: dict[str, str], secret: stry:return subprocess.run(list(argv), env=env, input=secret + "\n", capture_output=True, text=True,- encoding="utf-8", errors="replace", timeout=timeout)+ encoding="utf-8", errors="replace", timeout=timeout, check=False)except subprocess.TimeoutExpired as exc:raise RuntimeError(f"{label} unlock timed out after {timeout:.0f}s") from excexcept OSError as exc:@@ -81,7 +81,7 @@ def run_with_secret_env(argv: Sequence[str], *, env: dict[str, str], secret_env:try:return subprocess.run(list(argv), env=child_env, stdin=subprocess.DEVNULL, capture_output=True, text=True,- encoding="utf-8", errors="replace", timeout=timeout)+ encoding="utf-8", errors="replace", timeout=timeout, check=False)except subprocess.TimeoutExpired as exc:raise RuntimeError(f"{label} unlock timed out after {timeout:.0f}s") from excexcept OSError as exc:diff --git a/agent/verify/runner.py b/agent/verify/runner.pyindex d08549bbd2c..1941a452066 100644--- a/agent/verify/runner.py+++ b/agent/verify/runner.py@@ -96,7 +96,7 @@ def _run_phase_command() -> PhaseResult:started = time.monotonic()try:- proc = subprocess.run(command, cwd=str(root), timeout=timeout, **_SUBPROCESS_KW)+ proc = subprocess.run(command, cwd=str(root), timeout=timeout, **_SUBPROCESS_KW, check=False)output, exit_code, timed_out = proc.stdout or "", proc.returncode, Falseexcept subprocess.TimeoutExpired as exc:raw = exc.output@@ -198,6 +198,7 @@ def _compose_live_state_reason(root: Path) -> str | None:result = subprocess.run(["docker", "compose", "ps", "--status", "running", "--format", "{{.Name}}"],cwd=root, capture_output=True, text=True, timeout=15, stdin=subprocess.DEVNULL,+ check=False,)except FileNotFoundError:return Nonediff --git a/apps/desktop/electron/native/hud-modifier-x11.test.py b/apps/desktop/electron/native/hud-modifier-x11.test.pyindex cbe61fc826d..05b53003d89 100644--- a/apps/desktop/electron/native/hud-modifier-x11.test.py+++ b/apps/desktop/electron/native/hud-modifier-x11.test.py@@ -98,7 +98,7 @@ def main(binary):assert child.wait(timeout=5) == 0assert child.stderr.read() == b""# Even DISPLAY pointing at X11 must not claim global access on Wayland.- denied = subprocess.run([binary, "--check"], env={**env, "WAYLAND_DISPLAY": "wayland-test"}, capture_output=True, timeout=5)+ denied = subprocess.run([binary, "--check"], env={**env, "WAYLAND_DISPLAY": "wayland-test"}, capture_output=True, timeout=5, check=False)assert json.loads(denied.stdout) == {"type": "error", "code": "unavailable"}print("isolated XI2: summon, key/modifier/mouse/wheel/drag cancellation, duration, EOF, and Wayland checks passed")finally:diff --git a/batch_runner.py b/batch_runner.pyindex 47bbfae64e9..0ab87f7d179 100644--- a/batch_runner.py+++ b/batch_runner.py@@ -194,6 +194,7 @@ def _prepare_container_image(probe = _sp.run(["docker", "image", "inspect", container_image],capture_output=True, timeout=10,+ check=False,)if probe.returncode != 0:if config.get("verbose"):@@ -201,6 +202,7 @@ def _prepare_container_image(pull = _sp.run(["docker", "pull", container_image],capture_output=True, text=True, encoding='utf-8', errors='replace', timeout=600,+ check=False,)if pull.returncode != 0:return _failure_result(diff --git a/cli.py b/cli.pyindex 3c720665737..375f42661d3 100644--- a/cli.py+++ b/cli.py@@ -1258,7 +1258,8 @@ class HermesCLI(CLIInitMixin, CLITuiRuntimeMixin, CLIProcessNotificationsMixin,result = subprocess.run(exec_cmd, shell=True, capture_output=True, text=True, encoding="utf-8", errors="replace",timeout=30, env=build_subprocess_env(),- creationflags=windows_hide_flags(), # no console flash on Windows (#56747)+ creationflags=windows_hide_flags(), # no console flash on Windows (#56747),+ check=False,)# See #56747.output = result.stdout.strip() or result.stderr.strip()diff --git a/cron/scheduler.py b/cron/scheduler.pyindex eb2abf1cd07..1a3bdb1ee21 100644--- a/cron/scheduler.py+++ b/cron/scheduler.py@@ -4072,7 +4072,7 @@ def _worktree_maintenance_repos() -> list[str]:probe = subprocess.run(["git", "rev-parse", "--show-toplevel"],capture_output=True, text=True, encoding="utf-8",- errors="replace", timeout=5, cwd=workdir)+ errors="replace", timeout=5, cwd=workdir, check=False)if probe.returncode == 0 and probe.stdout.strip():repos.add(probe.stdout.strip())except Exception:diff --git a/evals/browser_use/orchestrate.py b/evals/browser_use/orchestrate.pyindex efb3ebcb807..08e4d7f55e5 100644--- a/evals/browser_use/orchestrate.py+++ b/evals/browser_use/orchestrate.py@@ -56,9 +56,10 @@ def reset_browser_state():subprocess.run(["taskkill", "/F", "/IM", "agent-browser.exe", "/T"],capture_output=True,+ check=False,)else:- subprocess.run(["pkill", "-f", "agent-browser"], capture_output=True)+ subprocess.run(["pkill", "-f", "agent-browser"], capture_output=True, check=False)code = "cdp('Network.clearBrowserCookies')\nprint('cleared')\n"try:subprocess.run(@@ -68,6 +69,7 @@ def reset_browser_state():capture_output=True,timeout=120,env=ENV,+ check=False,)except Exception:pass@@ -93,6 +95,7 @@ for arm, task, model, rep in cells:text=True,timeout=args.run_timeout,env={**ENV, "BUBENCH_TASKS": args.tasks},+ check=False,)rec = Nonefor line in (proc.stdout or "").splitlines():diff --git a/evals/browser_use/orchestrate_cloud.py b/evals/browser_use/orchestrate_cloud.pyindex 41d90bd4802..80ae831edb0 100644--- a/evals/browser_use/orchestrate_cloud.py+++ b/evals/browser_use/orchestrate_cloud.py@@ -137,7 +137,7 @@ for task, model, rep in cells:f.write(json.dumps(rec) + "\n")continueenv = {**ENV_BASE, **extra_env, "BUBENCH_TASKS": args.tasks}- subprocess.run(["pkill", "-f", "browser_harness"], capture_output=True)+ subprocess.run(["pkill", "-f", "browser_harness"], capture_output=True, check=False)try:proc = subprocess.run([PY, os.path.join(ROOT, "single_run.py"), "pr", task, model, str(rep)],@@ -145,6 +145,7 @@ for task, model, rep in cells:text=True,timeout=args.run_timeout,env=env,+ check=False,)rec = Nonefor line in (proc.stdout or "").splitlines():diff --git a/evals/codebase_navigability/runtime_bench.py b/evals/codebase_navigability/runtime_bench.pyindex 279005762e5..5cd91623e35 100644--- a/evals/codebase_navigability/runtime_bench.py+++ b/evals/codebase_navigability/runtime_bench.py@@ -18,11 +18,11 @@ for k in list(ENV):def run(argv, code=None, timeout=300):t0 = time.perf_counter()- r = subprocess.run([PY, *argv] if code is None else [PY, "-c", code], cwd=TREE, env=ENV, capture_output=True, text=True, timeout=timeout, stdin=subprocess.DEVNULL)+ r = subprocess.run([PY, *argv] if code is None else [PY, "-c", code], cwd=TREE, env=ENV, capture_output=True, text=True, timeout=timeout, stdin=subprocess.DEVNULL, check=False)return time.perf_counter() - t0, rdef warm_pyc():- subprocess.run([PY, "-m", "compileall", "-q", "-j", "16", TREE], cwd=TREE, env=ENV, capture_output=True)+ subprocess.run([PY, "-m", "compileall", "-q", "-j", "16", TREE], cwd=TREE, env=ENV, capture_output=True, check=False)def med(xs): return round(statistics.median(xs), 4)@@ -59,7 +59,7 @@ for tgt in IMPORT_TARGETS:rows = []for _ in range(REPS):_, r = run([], code=None) if False else (None, None)- r = subprocess.run([PY, "-c", probe, tgt], cwd=TREE, env=ENV, capture_output=True, text=True, timeout=300)+ r = subprocess.run([PY, "-c", probe, tgt], cwd=TREE, env=ENV, capture_output=True, text=True, timeout=300, check=False)try: rows.append(json.loads([l for l in (r.stdout + "\n" + r.stderr).splitlines() if l.lstrip().startswith("{") and "\"dt\"" in l][-1].strip()))except Exception: rows.append({"dt": None, "mods": None, "rss_kb": None, "err": (r.stderr or r.stdout)[-300:]})ok = [x for x in rows if x["dt"] is not None and not x["err"]]diff --git a/evals/codebase_navigability/static_metrics.py b/evals/codebase_navigability/static_metrics.pyindex 5b11ebb9355..567cd08b606 100644--- a/evals/codebase_navigability/static_metrics.py+++ b/evals/codebase_navigability/static_metrics.py@@ -133,8 +133,8 @@ def radon(files):# radon can't take a list file; run per-directory roots insteadroots = sorted({os.path.relpath(f, TREE).split(os.sep)[0] if os.sep in os.path.relpath(f, TREE) else os.path.relpath(f, TREE) for f in files})roots = [r for r in roots if r != "tests"]- cc = subprocess.run([R, "cc", "-j", "-s", "-e", "tests/*,tests/**", *roots], cwd=TREE, capture_output=True, text=True).stdout- mi = subprocess.run([R, "mi", "-j", "-e", "tests/*,tests/**", *roots], cwd=TREE, capture_output=True, text=True).stdout+ cc = subprocess.run([R, "cc", "-j", "-s", "-e", "tests/*,tests/**", *roots], cwd=TREE, capture_output=True, text=True, check=False).stdout+ mi = subprocess.run([R, "mi", "-j", "-e", "tests/*,tests/**", *roots], cwd=TREE, capture_output=True, text=True, check=False).stdouttry:ccj = json.loads(cc); blocks = [b for v in ccj.values() if isinstance(v, list) for b in v if isinstance(b, dict) and "complexity" in b]cs = sorted(b["complexity"] for b in blocks)diff --git a/evals/compaction/scripts/codex_arm.py b/evals/compaction/scripts/codex_arm.pyindex c46389b6af2..fd3764e7bc8 100644--- a/evals/compaction/scripts/codex_arm.py+++ b/evals/compaction/scripts/codex_arm.py@@ -116,6 +116,7 @@ def codex(args: list, prompt: str, timeout: int = 3600) -> str:proc = subprocess.run(["codex", "exec", *args, "--skip-git-repo-check", prompt],cwd=str(WORKDIR), capture_output=True, text=True, timeout=timeout,+ check=False,)return proc.stdout + proc.stderrdiff --git a/evals/core_tool_deferral/orchestrator.py b/evals/core_tool_deferral/orchestrator.pyindex a5b76fbff4a..283991b5541 100644--- a/evals/core_tool_deferral/orchestrator.py+++ b/evals/core_tool_deferral/orchestrator.py@@ -60,7 +60,7 @@ def run_cell(cell):t0 = time.time()try:p = subprocess.run(cmd, capture_output=True, text=True, timeout=timeout + 60,- env=os.environ.copy())+ env=os.environ.copy(), check=False)if p.returncode == 3:return (cell, "INFRA_ABORT", p.stderr[-500:])if p.returncode != 0 and not os.path.exists(out):diff --git a/evals/desktop_bug_campaign/linux_launcher_probe.py b/evals/desktop_bug_campaign/linux_launcher_probe.pyindex 792d6a267f9..200bcc4f209 100644--- a/evals/desktop_bug_campaign/linux_launcher_probe.py+++ b/evals/desktop_bug_campaign/linux_launcher_probe.py@@ -12,7 +12,7 @@ import venvdef run(argv, env, cwd):result = subprocess.run(argv, env=env, cwd=cwd, stdin=subprocess.DEVNULL,- capture_output=True, text=True, timeout=60)+ capture_output=True, text=True, timeout=60, check=False)return {"argv": argv, "returncode": result.returncode,"stdout": result.stdout, "stderr": result.stderr}diff --git a/evals/fanout_resource_bench.py b/evals/fanout_resource_bench.pyindex fac2bc928f1..75ad8be1c7d 100644--- a/evals/fanout_resource_bench.py+++ b/evals/fanout_resource_bench.py@@ -104,8 +104,8 @@ def _count_live(cls_name: str) -> int:def _snap(pid: int, db_path: str) -> dict:st = open(f"/proc/{pid}/status", encoding="utf-8").read()g = lambda k: int(st.split(k + ":")[1].split()[0])- tcp = subprocess.run(f"ss -tanp 2>/dev/null | grep -c 'pid={pid},'", shell=True, capture_output=True, text=True).stdout.strip()- kids = subprocess.run(["ps", "-o", "args=", "--ppid", str(pid)], capture_output=True, text=True).stdout+ tcp = subprocess.run(f"ss -tanp 2>/dev/null | grep -c 'pid={pid},'", shell=True, capture_output=True, text=True, check=False).stdout.strip()+ kids = subprocess.run(["ps", "-o", "args=", "--ppid", str(pid)], capture_output=True, text=True, check=False).stdoutreturn {"threads": g("Threads"), "rss_mb": g("VmRSS") // 1024, "fds": len(os.listdir(f"/proc/{pid}/fd")),"tcp": int(tcp or 0), "pyright": kids.count("pyright"), "kernels": kids.count("hermes_kernel_runner"),diff --git a/evals/gateway_failure_ownership/probe.py b/evals/gateway_failure_ownership/probe.pyindex f99edc348b3..1e6eda11e85 100644--- a/evals/gateway_failure_ownership/probe.py+++ b/evals/gateway_failure_ownership/probe.py@@ -164,6 +164,7 @@ class ControlledAgent(AIAgent):[sys.executable, str(Path(__file__).with_name("foreign_writer.py")),str(ROOT), str(HOME / "state.db"), sid],capture_output=True, text=True, stdin=subprocess.DEVNULL, timeout=20,+ check=False,)assert result.returncode == 0, result.stderrfaults.append("foreign-writer-committed")diff --git a/evals/kanban_scope_probe.py b/evals/kanban_scope_probe.pyindex b36c48a4573..6fe32972d77 100644--- a/evals/kanban_scope_probe.py+++ b/evals/kanban_scope_probe.py@@ -11,7 +11,7 @@ repo = Path(sys.argv[1]).resolve()if len(sys.argv) == 2:with tempfile.TemporaryDirectory(prefix="kanban-transport-") as home:env = {"HOME": home, "HERMES_HOME": home + "/hermes", "PATH": os.environ["PATH"], "PYTHONDONTWRITEBYTECODE": "1"}- p = subprocess.run([sys.executable, __file__, str(repo), "isolated"], cwd=home, env=env, stdin=subprocess.DEVNULL)+ p = subprocess.run([sys.executable, __file__, str(repo), "isolated"], cwd=home, env=env, stdin=subprocess.DEVNULL, check=False)sys.exit(p.returncode)sys.path.insert(0, str(repo))from hermes_cli import kanban_db as kbdiff --git a/evals/key_cmd_picker_live.py b/evals/key_cmd_picker_live.pyindex 5829329bb00..18a76c1e57f 100644--- a/evals/key_cmd_picker_live.py+++ b/evals/key_cmd_picker_live.py@@ -152,7 +152,7 @@ def main():code = ("import runpy; ns=runpy.run_path(" + repr(str(Path(__file__).resolve()))+ "); ns['rows_worker']()")proc = subprocess.run([sys.executable, "-c", code], cwd=repo, env=env,- stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=45)+ stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=45, check=False)transcript = proc.stdout + proc.stderrif proc.returncode:raise RuntimeError(transcript)diff --git a/evals/mcp_device_flow.py b/evals/mcp_device_flow.pyindex a3e259dea77..c443985363c 100644--- a/evals/mcp_device_flow.py+++ b/evals/mcp_device_flow.py@@ -150,7 +150,7 @@ from hermes_cli.main import mainmain()''', "mcp", *command]result = subprocess.run(argv,- cwd=repo, env=env, stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=40)+ cwd=repo, env=env, stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=40, check=False)token_path = home / "mcp-tokens" / "fixture.json"refresh_output = Noneif token_path.exists() and not previous:@@ -158,7 +158,7 @@ main()tokens["expires_at"] = time.time() - 60token_path.write_text(json.dumps(tokens))refreshed = subprocess.run([sys.executable, "-m", "hermes_cli.main", "mcp", "test", "fixture"],- cwd=repo, env=env, stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=30)+ cwd=repo, env=env, stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=30, check=False)refresh_output = refreshed.stdout + refreshed.stderrreturn {"mode": mode, "returncode": result.returncode, "output": result.stdout + result.stderr,"token_persisted": token_path.exists(), "refresh_output": refresh_output, "wire": wire,diff --git a/evals/native_compaction/ab_checkpoint_preflight.py b/evals/native_compaction/ab_checkpoint_preflight.pyindex 2624c7b98a7..edb5f095d60 100644--- a/evals/native_compaction/ab_checkpoint_preflight.py+++ b/evals/native_compaction/ab_checkpoint_preflight.py@@ -245,7 +245,7 @@ def main() -> int:(tmp / "home").mkdir(parents=True)import subprocess- head = subprocess.run(["git", "rev-parse", "HEAD"], cwd=ROOT, capture_output=True, text=True, encoding="utf-8", errors="replace").stdout.strip()+ head = subprocess.run(["git", "rev-parse", "HEAD"], cwd=ROOT, capture_output=True, text=True, encoding="utf-8", errors="replace", check=False).stdout.strip()wire = _FakeResponses()try:result = {diff --git a/evals/postmortem/forensics/rework.py b/evals/postmortem/forensics/rework.pyindex 612fb8acb82..93516178512 100644--- a/evals/postmortem/forensics/rework.py+++ b/evals/postmortem/forensics/rework.py@@ -21,7 +21,7 @@ from pathlib import Pathdef _git(repo: str, *args: str) -> str:- return subprocess.run(["git", "-C", repo, *args], capture_output=True, text=True, encoding="utf-8", errors="replace").stdout+ return subprocess.run(["git", "-C", repo, *args], capture_output=True, text=True, encoding="utf-8", errors="replace", check=False).stdoutdef main(argv=None) -> int:@@ -42,7 +42,7 @@ def main(argv=None) -> int:surface_line = "(scripts/ci/check_public_surface.py not found; merge #103541 or pass a checkout that has it)"else:surface = subprocess.run([sys.executable, str(checker), "--base", a.base, "--head", a.open, "--json", str(out / "surface_at_open.json")],- cwd=a.repo, capture_output=True, text=True, encoding="utf-8", errors="replace")+ cwd=a.repo, capture_output=True, text=True, encoding="utf-8", errors="replace", check=False)surface_line = (surface.stdout.splitlines() or [f"(check_public_surface failed: {surface.stderr.strip()[:120]})"])[0]log = _git(a.repo, "log", "--no-merges", "--format=%H%x00%s", f"{a.open}..{a.head}")diff --git a/evals/postmortem/live_ab/cache_prefix_live.py b/evals/postmortem/live_ab/cache_prefix_live.pyindex cd64b8d530c..559614545fd 100644--- a/evals/postmortem/live_ab/cache_prefix_live.py+++ b/evals/postmortem/live_ab/cache_prefix_live.py@@ -40,7 +40,7 @@ t0 = time.time()r = ag.run_conversation(task)print("final:", (r.get("final_response") or "")[:80], "| wall", round(time.time() - t0, 1), "s")time.sleep(1)-log = subprocess.run(f"grep -h '\\[{sid}\\]' ~/.hermes/logs/agent.log | grep 'API call #'", shell=True, capture_output=True).stdout.decode("utf-8", "replace")+log = subprocess.run(f"grep -h '\\[{sid}\\]' ~/.hermes/logs/agent.log | grep 'API call #'", shell=True, capture_output=True, check=False).stdout.decode("utf-8", "replace")rows = re.findall(r"API call #(\d+): .*in=(\d+) out=(\d+) .*cache=(\d+)/(\d+) \((\d+)%\)", log)tot_in = tot_c = 0for n, i, o, c, ct, p in rows:diff --git a/evals/postmortem/live_ab/cache_prefix_wire.py b/evals/postmortem/live_ab/cache_prefix_wire.pyindex 9415efb3c1a..38434af4508 100644--- a/evals/postmortem/live_ab/cache_prefix_wire.py+++ b/evals/postmortem/live_ab/cache_prefix_wire.py@@ -57,7 +57,7 @@ task = (f"Work in {work} (create it). Before EACH tool call, think carefully for"5) read it back; then reply DONE.")ag.run_conversation(task)time.sleep(1)-log = subprocess.run(f"grep -h '\\[{sid}\\]' ~/.hermes/logs/agent.log | grep 'API call #'", shell=True, capture_output=True).stdout.decode("utf-8", "replace")+log = subprocess.run(f"grep -h '\\[{sid}\\]' ~/.hermes/logs/agent.log | grep 'API call #'", shell=True, capture_output=True, check=False).stdout.decode("utf-8", "replace")rows = re.findall(r"API call #(\d+): .*in=(\d+) out=(\d+) .*cache=(\d+)/(\d+) \((\d+)%\)", log)for r in rows: print(f" call {r[0]:>2} in={int(r[1]):>6} out={int(r[2]):>5} cached={int(r[3]):>6} ({r[5]}%) uncached={int(r[1])-int(r[3])}")print(f"ARM {arm}: captured {len(captured)} payloads")diff --git a/evals/postmortem/review_probes/scanner_bypass_probe.py b/evals/postmortem/review_probes/scanner_bypass_probe.pyindex aaa47a10416..34471bc85fa 100644--- a/evals/postmortem/review_probes/scanner_bypass_probe.py+++ b/evals/postmortem/review_probes/scanner_bypass_probe.py@@ -37,19 +37,19 @@ print(json.dumps({'pattern_guard':a.check_dangerous_command(cmd,'local',approval# execution and marker contents, never invoke a host shutdown binary.marker=home/'marker'prefix=r+'(){ printf executed > "$MARKER"; }; '-p=subprocess.run(['/bin/bash','--noprofile','--norc','-c',prefix+cmd],env={'PATH':'/usr/bin:/bin','HOME':str(home),'MARKER':str(marker)},capture_output=True,text=True, encoding='utf-8', errors='replace',timeout=5)+p=subprocess.run(['/bin/bash','--noprofile','--norc','-c',prefix+cmd],env={'PATH':'/usr/bin:/bin','HOME':str(home),'MARKER':str(marker)},capture_output=True,text=True, encoding='utf-8', errors='replace',timeout=5, check=False)assert marker.read_text(encoding='utf-8')=='executed'print(json.dumps({'case':'newline safe execution','exit':p.returncode,'marker':marker.read_text(encoding='utf-8'),'stdout':p.stdout,'stderr':p.stderr}))# Prove the benign backtick argument really is well-formed and matches input.f=home/'f';f.write_text('needle\n', encoding='utf-8')cmd='grep -e `printf needle` '+str(f)-p=subprocess.run(['/bin/bash','--noprofile','--norc','-c',cmd],env={'PATH':'/usr/bin:/bin','HOME':str(home)},capture_output=True,text=True, encoding='utf-8', errors='replace',timeout=5)+p=subprocess.run(['/bin/bash','--noprofile','--norc','-c',cmd],env={'PATH':'/usr/bin:/bin','HOME':str(home)},capture_output=True,text=True, encoding='utf-8', errors='replace',timeout=5, check=False)assert p.returncode==0 and p.stdout=='needle\n'print(json.dumps({'case':'backtick argument','command':cmd,'baseline':(b.detect_hardline_command(cmd) if b else None),'head':d.detect_hardline_command(cmd),'tokens':d._shell_tokens_with_spans(cmd,0),'exit':p.returncode,'stdout':p.stdout}))# Reporter's exact spelling, fixture makes the sed address meaningful.with tempfile.TemporaryDirectory() as tmp:Path(tmp,'f').write_text('X\ny\nz\nw\n', encoding='utf-8')cmd='sed -n "$(grep -n X f | cut -d: -f1),+3p" f'- p=subprocess.run(['/bin/bash','--noprofile','--norc','-c',cmd],cwd=tmp,env={'PATH':'/usr/bin:/bin','HOME':str(home)},capture_output=True,text=True, encoding='utf-8', errors='replace',timeout=5)+ p=subprocess.run(['/bin/bash','--noprofile','--norc','-c',cmd],cwd=tmp,env={'PATH':'/usr/bin:/bin','HOME':str(home)},capture_output=True,text=True, encoding='utf-8', errors='replace',timeout=5, check=False)assert p.returncode==0 and p.stdout=='X\ny\nz\nw\n'print(json.dumps({'case':'reported real fixture','baseline':(b.detect_hardline_command(cmd) if b else None),'head':d.detect_hardline_command(cmd),'exit':p.returncode,'stdout':p.stdout}))diff --git a/evals/postmortem/run.py b/evals/postmortem/run.pyindex 5d078e3ab01..75747119700 100644--- a/evals/postmortem/run.py+++ b/evals/postmortem/run.py@@ -48,7 +48,7 @@ def run_probe(script: str, args: list[str], repo: str, timeout: int = 240) -> tuenv["PYTHONPATH"] = repo + os.pathsep + env.get("PYTHONPATH", "")cmd = [sys.executable, str(HERE / script), *[a.format(repo=repo) for a in args]]try:- p = subprocess.run(cmd, cwd=repo, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=timeout, env=env)+ p = subprocess.run(cmd, cwd=repo, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=timeout, env=env, check=False)return p.returncode, (p.stdout + "\n" + p.stderr)except subprocess.TimeoutExpired:return 124, "TIMEOUT"diff --git a/evals/process_result_receipt_probe.py b/evals/process_result_receipt_probe.pyindex fd67f87a036..e260b6c48d4 100644--- a/evals/process_result_receipt_probe.py+++ b/evals/process_result_receipt_probe.py@@ -43,7 +43,7 @@ def run(code, *args, profile=None):child_env['HERMES_HOME'] = str(out / profile)result = subprocess.run([sys.executable, '-c', code, *args], cwd=repo,env=child_env, stdin=subprocess.DEVNULL,- capture_output=True, text=True, encoding='utf-8', timeout=45)+ capture_output=True, text=True, encoding='utf-8', timeout=45, check=False)if result.returncode:raise RuntimeError(result.stdout + result.stderr)return json.loads(result.stdout.splitlines()[-1])diff --git a/evals/session_search_schema/runner.py b/evals/session_search_schema/runner.pyindex 82d58dfce6c..871b77d3495 100644--- a/evals/session_search_schema/runner.py+++ b/evals/session_search_schema/runner.py@@ -62,6 +62,7 @@ def extract_arm(ref: str, workdir: Path, name: str) -> Path:out = subprocess.run(["git", "show", f"{ref}:tools/session_search_tool.py"],cwd=REPO_ROOT, capture_output=True, text=True,+ check=False,)if out.returncode != 0:raise SystemExit(f"git show {ref}: {out.stderr.strip()}")diff --git a/evals/token_accounting/ab_image_cost_calibration.py b/evals/token_accounting/ab_image_cost_calibration.pyindex f6f4195bfea..024550ba572 100644--- a/evals/token_accounting/ab_image_cost_calibration.py+++ b/evals/token_accounting/ab_image_cost_calibration.py@@ -157,7 +157,7 @@ def run(out_path: str) -> dict:tail = walk_history[cut:]tail_real = _count_images(tail) * IMAGE_REAL + len(tail) * TEXT_PER_TURN // 2result = {- "head": subprocess.run(["git", "rev-parse", "HEAD"], cwd=ROOT, capture_output=True, text=True, encoding="utf-8", errors="replace").stdout.strip(),+ "head": subprocess.run(["git", "rev-parse", "HEAD"], cwd=ROOT, capture_output=True, text=True, encoding="utf-8", errors="replace", check=False).stdout.strip(),"image_real_cost": IMAGE_REAL, "context_length": CONTEXT_LENGTH, "threshold": THRESHOLD,"learned_image_cost_after": learned_image_token_cost("vision-local-ab", wire.base_url),"provider_overflows": wire.overflows, "compress_calls": compress_calls, "per_turn": per_turn,diff --git a/evals/token_accounting/replay_gates.py b/evals/token_accounting/replay_gates.pyindex eb265675d97..a330b3f09eb 100644--- a/evals/token_accounting/replay_gates.py+++ b/evals/token_accounting/replay_gates.py@@ -276,7 +276,7 @@ def main() -> int:tmp = Path(tempfile.mkdtemp(prefix="ab-token-accounting-"))os.environ["HERMES_HOME"] = str(tmp / "home")(tmp / "home").mkdir(parents=True)- head = subprocess.run(["git", "rev-parse", "HEAD"], cwd=ROOT, capture_output=True, text=True, encoding="utf-8", errors="replace").stdout.strip()+ head = subprocess.run(["git", "rev-parse", "HEAD"], cwd=ROOT, capture_output=True, text=True, encoding="utf-8", errors="replace", check=False).stdout.strip()wire = _FakeChat()result: dict = {"checkout": str(ROOT), "head": head,"compressor_sha256": hashlib.sha256(diff --git a/evals/token_accounting/worktree_prompt_prefix.py b/evals/token_accounting/worktree_prompt_prefix.pyindex 8826e39e703..439516bb165 100644--- a/evals/token_accounting/worktree_prompt_prefix.py+++ b/evals/token_accounting/worktree_prompt_prefix.py@@ -84,6 +84,7 @@ if len(sys.argv) == 1:stderr=subprocess.STDOUT,stdin=subprocess.DEVNULL,timeout=150,+ check=False,)print(name, "exit", p.returncode, flush=True)if p.returncode:diff --git a/evals/toolperf_abeval/ab_eval.py b/evals/toolperf_abeval/ab_eval.pyindex f42b988c30b..cf985b1e934 100644--- a/evals/toolperf_abeval/ab_eval.py+++ b/evals/toolperf_abeval/ab_eval.py@@ -201,7 +201,7 @@ mode = "overwrite"[sys.executable, "-m", "hermes_cli.main", "chat", "--query", q,"--quiet", "--max-turns", "30", "--accept-hooks", "--model", model],cwd=work, env=env, capture_output=True, text=True,- encoding="utf-8", errors="replace", timeout=600)+ encoding="utf-8", errors="replace", timeout=600, check=False)out = (p.stdout or "").strip()rc = p.returncodeexcept subprocess.TimeoutExpired:diff --git a/evals/update_unit_client_budget.py b/evals/update_unit_client_budget.pyindex ec5cd1633b4..0011c3391f1 100644--- a/evals/update_unit_client_budget.py+++ b/evals/update_unit_client_budget.py@@ -31,7 +31,7 @@ if catchup:unit = f"hermes-serve-audit-089c35aa-{tag}"cmd = ["systemctl", "--user"]def run(args):- return subprocess.run(args, stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=65)+ return subprocess.run(args, stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=65, check=False)def pid():return run(cmd + ["show", unit, "--property=MainPID", "--value"]).stdout.strip()record: dict[str, object] = {"repo": repo, "tag": tag, "unit": unit, "home": str(home), "tier": "native disposable systemd service"}diff --git a/evals/webhook_auth/standard_webhooks_ab.py b/evals/webhook_auth/standard_webhooks_ab.pyindex aa73bf98ce1..38657ff954c 100644--- a/evals/webhook_auth/standard_webhooks_ab.py+++ b/evals/webhook_auth/standard_webhooks_ab.py@@ -29,7 +29,7 @@ import aiohttpdef _git_head() -> str:return subprocess.run(["git", "rev-parse", "--short", "HEAD"], capture_output=True, text=True,- stdin=subprocess.DEVNULL).stdout.strip()+ stdin=subprocess.DEVNULL, check=False).stdout.strip()def _sign(secret: str, msg_id: str, ts: str, body: bytes) -> str:diff --git a/gateway/platforms/base.py b/gateway/platforms/base.pyindex 913a2a90900..197f6dca702 100644--- a/gateway/platforms/base.py+++ b/gateway/platforms/base.py@@ -74,7 +74,7 @@ def transcode_to_ogg_opus(path: str, *, bitrate: str = "32k", timeout: int = 60,[ffmpeg, "-v", "error", "-y", "-i", str(path),"-acodec", "libopus", "-ac", "1", "-b:a", bitrate, "-vbr", "on","-application", "voip", "-compression_level", "10", "-f", "ogg", work_path],- capture_output=True, timeout=timeout, stdin=subprocess.DEVNULL)+ capture_output=True, timeout=timeout, stdin=subprocess.DEVNULL, check=False)if result.returncode == 0 and os.path.getsize(work_path) > 0:if in_place:os.replace(work_path, ogg_path)diff --git a/gateway/platforms/signal.py b/gateway/platforms/signal.pyindex 2430ae2814d..20673fbdc2d 100644--- a/gateway/platforms/signal.py+++ b/gateway/platforms/signal.py@@ -113,7 +113,7 @@ def _remux_aac_to_m4a(aac_data: bytes) -> Optional[tuple[bytes, str]]:dst_path = src_path[:-4] + ".m4a"try:proc = subprocess.run([ffmpeg, "-y", "-loglevel", "error", "-i", src_path, "-c:a", "copy", "-movflags",- "+faststart", dst_path], capture_output=True, timeout=10)+ "+faststart", dst_path], capture_output=True, timeout=10, check=False)if proc.returncode != 0:logger.warning("Signal: AAC→M4A remux failed (ffmpeg exit %d): %s",proc.returncode, proc.stderr.decode("utf-8", "replace")[:300])diff --git a/gateway/platforms/webhook_filters.py b/gateway/platforms/webhook_filters.pyindex 0af011a9a8d..e54a1fd840f 100644--- a/gateway/platforms/webhook_filters.py+++ b/gateway/platforms/webhook_filters.py@@ -193,6 +193,7 @@ class WebhookRouteProcessor:result = subprocess.run([interpreter, str(path)], input=json.dumps(payload), capture_output=True, text=True, encoding="utf-8", errors="replace",timeout=self.script_timeout_seconds, cwd=str(path.parent), env=build_subprocess_env(), **popen_kwargs,+ check=False,)except subprocess.TimeoutExpired:logger.warning("[webhook] script timed out: %s", path)diff --git a/gateway/shutdown_forensics.py b/gateway/shutdown_forensics.pyindex e5d742457b0..b62644b6273 100644--- a/gateway/shutdown_forensics.py+++ b/gateway/shutdown_forensics.py@@ -232,6 +232,7 @@ def _systemd_timeout_stop_us(unit_name: str) -> Optional[int]:result = subprocess.run(["systemctl", *flag, "show", unit_name, "--property=TimeoutStopUSec"],capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=2.0,+ check=False,)except (subprocess.TimeoutExpired, OSError):continuediff --git a/gateway/status.py b/gateway/status.pyindex f963b69f7e4..d05755882cc 100644--- a/gateway/status.py+++ b/gateway/status.py@@ -429,6 +429,7 @@ def terminate_pid(result = subprocess.run(["taskkill", "/PID", str(pid), "/T", "/F"], capture_output=True, text=True,encoding="utf-8", errors="replace", timeout=10, creationflags=windows_hide_flags(),+ check=False,)except FileNotFoundError:os.kill(pid, signal.SIGTERM)@@ -528,6 +529,7 @@ def _read_process_cmdline(pid: int) -> Optional[str]:result = subprocess.run(["ps", "-p", str(pid), "-o", "command="],capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=5,+ check=False,)if result.returncode == 0 and result.stdout.strip():return result.stdout.strip()diff --git a/hermes_cli/_early_recovery.py b/hermes_cli/_early_recovery.pyindex a698c52ba7b..53d498071c7 100644--- a/hermes_cli/_early_recovery.py+++ b/hermes_cli/_early_recovery.py@@ -336,7 +336,7 @@ def _is_git(path: str) -> bool:try:probe = subprocess.run([path, "--version"], capture_output=True, text=True, encoding="utf-8",errors="replace", timeout=30, stdin=subprocess.DEVNULL,- creationflags=getattr(subprocess, "CREATE_NO_WINDOW", 0))+ creationflags=getattr(subprocess, "CREATE_NO_WINDOW", 0), check=False)except (OSError, ValueError, subprocess.SubprocessError):return Falsereturn probe.returncode == 0 and probe.stdout.startswith("git version")@@ -753,7 +753,7 @@ def _held_open_lsof(path: Path, root: Path | None, any_git: bool) -> _Holder | btry:found = subprocess.run([lsof, "-F", "pc", "--", str(path)], capture_output=True, text=True, encoding="utf-8",errors="replace", timeout=20,- stdin=subprocess.DEVNULL)+ stdin=subprocess.DEVNULL, check=False)except (OSError, subprocess.SubprocessError):return Nonepids = [line[1:] for line in found.stdout.splitlines() if line.startswith("p")]@@ -769,7 +769,7 @@ def _lsof_cwds(lsof: str, pids: list[str]) -> dict[str, str] | None:"""Each pid's cwd from ``lsof -d cwd`` (macOS has no /proc); None when lsof cannot answer."""try:out = subprocess.run([lsof, "-a", "-d", "cwd", "-F", "pn", "-p", ",".join(pids)], capture_output=True,- text=True, encoding="utf-8", errors="replace", timeout=20, stdin=subprocess.DEVNULL)+ text=True, encoding="utf-8", errors="replace", timeout=20, stdin=subprocess.DEVNULL, check=False)except (OSError, subprocess.SubprocessError):return Noneif out.returncode not in (0, 1):@@ -813,7 +813,7 @@ def _ps_git_holder(lsof: str, git_dir: Path, root: Path, any_git: bool) -> _Holdtry:out = subprocess.run([ps_bin, "-A", *(f"-o{c}=" for c in columns)], capture_output=True,text=True, encoding="utf-8", errors="replace",- timeout=20, stdin=subprocess.DEVNULL)+ timeout=20, stdin=subprocess.DEVNULL, check=False)except (OSError, subprocess.SubprocessError):return Noneif out.returncode != 0:diff --git a/hermes_cli/_old_updater.py b/hermes_cli/_old_updater.pyindex a20b1d2cc48..c22dde335a9 100644--- a/hermes_cli/_old_updater.py+++ b/hermes_cli/_old_updater.py@@ -156,7 +156,7 @@ def _run_in_custody(argv: list, root: Path, **kwargs) -> int:# the rest of a committed update (sync + build), and it holds the checkout lock fd, so the# checkout stays locked for as long as it runs, even past this updater's death.# health: allow HX006 -- unbounded by design: the update's own supervised child- return subprocess.run(argv, **kwargs, **_checkout_custody(root)).returncode+ return subprocess.run(argv, **kwargs, **_checkout_custody(root)).returncode # noqa: PLW1510 -- forwarding wrapper: callers pass subprocess kwargs via **kwargs (check may arrive through it); an explicit check=False would raise TypeErrorproc = subprocess.Popen(argv, creationflags=lock.CREATE_SUSPENDED, **kwargs)try:refusal = bind(proc)diff --git a/hermes_cli/_secrets_common.py b/hermes_cli/_secrets_common.pyindex 19f16036908..a38e45de0d7 100644--- a/hermes_cli/_secrets_common.py+++ b/hermes_cli/_secrets_common.py@@ -95,7 +95,7 @@ def cli_version(binary: Path) -> str:"""Return the first line of ``<binary> --version`` or ``"version unknown"``."""try:res = subprocess.run([str(binary), "--version"], capture_output=True, text=True, encoding='utf-8',- errors='replace', timeout=5)+ errors='replace', timeout=5, check=False)if res.returncode == 0:return (res.stdout or res.stderr).strip().splitlines()[0]except (OSError, subprocess.TimeoutExpired):diff --git a/hermes_cli/_subprocess_compat.py b/hermes_cli/_subprocess_compat.pyindex 53455472e5d..8ec065c6380 100644--- a/hermes_cli/_subprocess_compat.py+++ b/hermes_cli/_subprocess_compat.py@@ -615,6 +615,7 @@ def posix_is_zombie(pid: int) -> bool:r = subprocess.run(["ps", "-o", "state=", "-p", str(pid)],capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=5,+ check=False,)return r.returncode == 0 and r.stdout.strip().startswith("Z")except Exception:diff --git a/hermes_cli/_update_takeover.py b/hermes_cli/_update_takeover.pyindex 82cfe730480..d73a9a137be 100644--- a/hermes_cli/_update_takeover.py+++ b/hermes_cli/_update_takeover.py@@ -88,7 +88,7 @@ def _head_sha(root: Path) -> str:try:head = subprocess.run([_git_executable(), "-C", str(root), "rev-parse", "HEAD"], capture_output=True,- text=True, encoding="utf-8", errors="replace", stdin=subprocess.DEVNULL, timeout=60)+ text=True, encoding="utf-8", errors="replace", stdin=subprocess.DEVNULL, timeout=60, check=False)if head.returncode == 0 and _SHA.fullmatch(head.stdout.strip()):return head.stdout.strip()except (OSError, subprocess.SubprocessError):@@ -139,6 +139,7 @@ def main() -> int:return subprocess.run([str(python), "-I", "-B", "-X", "utf8", str(root / "hermes_cli/update_serve_resume.py"),str(context), str(result)], cwd=root, env=activation_environment(root),+ check=False,).returncodefrom hermes_cli import update_receiptfrom hermes_cli.update_lock import UpdateLock, describe_holderdiff --git a/hermes_cli/browser_connect.py b/hermes_cli/browser_connect.pyindex 0f3c1ea201b..585cedbbf84 100644--- a/hermes_cli/browser_connect.py+++ b/hermes_cli/browser_connect.py@@ -285,7 +285,7 @@ def _detect_default_windows() -> str | None:def _run_stdout(argv: list[str]) -> str | None:try:return subprocess.run(argv, capture_output=True, text=True, encoding="utf-8",- errors="replace", timeout=5).stdout+ errors="replace", timeout=5, check=False).stdoutexcept Exception:return Nonediff --git a/hermes_cli/claw.py b/hermes_cli/claw.pyindex 785f67946ea..0815d7e5524 100644--- a/hermes_cli/claw.py+++ b/hermes_cli/claw.py@@ -146,7 +146,7 @@ def _detect_openclaw_processes() -> list[str]:def _posix_probe(cmd: list[str], timeout: int):try:return subprocess.run(cmd, capture_output=True, text=True, encoding='utf-8',- errors='replace', timeout=timeout)+ errors='replace', timeout=timeout, check=False)except (FileNotFoundError, subprocess.TimeoutExpired):return Nonediff --git a/hermes_cli/cli_commands_mixin.py b/hermes_cli/cli_commands_mixin.pyindex d84df091448..d90cd17b420 100644--- a/hermes_cli/cli_commands_mixin.py+++ b/hermes_cli/cli_commands_mixin.py@@ -1203,7 +1203,7 @@ class CLICommandsMixin(CLICommandsSessionToolsMixin):try:result = subprocess.run(["git", "worktree", "list"], capture_output=True, text=True, encoding="utf-8",- errors="replace", timeout=10, cwd=repo_root)+ errors="replace", timeout=10, cwd=repo_root, check=False)out = result.stdout.strip() if result.returncode == 0 else ""except Exception:out = ""diff --git a/hermes_cli/clipboard.py b/hermes_cli/clipboard.pyindex 131b4355898..df6d4cff521 100644--- a/hermes_cli/clipboard.py+++ b/hermes_cli/clipboard.py@@ -30,7 +30,7 @@ def _probe(argv: list, timeout: int, ok, *, missing: str | None = None) -> bool:"""Run a text-mode probe; True when it ran and ``ok(result)`` holds.A missing executable logs *missing* (when given); every other failure is silent."""try:- return bool(ok(subprocess.run(argv, timeout=timeout, **_TEXT)))+ return bool(ok(subprocess.run(argv, timeout=timeout, **_TEXT, check=False)))except FileNotFoundError:if missing:logger.debug(missing)@@ -110,7 +110,7 @@ def write_clipboard_text(text: str) -> bool:for argv, kw in _write_clipboard_commands(text.encode("utf-8")):try:if subprocess.run(argv, timeout=10, stdout=subprocess.DEVNULL,- stderr=subprocess.DEVNULL, **kw).returncode == 0:+ stderr=subprocess.DEVNULL, **kw, check=False).returncode == 0:return Trueexcept (OSError, subprocess.SubprocessError):continue@@ -122,7 +122,7 @@ def write_clipboard_text(text: str) -> bool:def _osascript(expr: str, timeout: int = 3) -> str:"""stdout of an osascript expression; "" on any failure."""try:- r = subprocess.run(["osascript", "-e", expr], timeout=timeout, **_TEXT)+ r = subprocess.run(["osascript", "-e", expr], timeout=timeout, **_TEXT, check=False)return r.stdout if r.returncode == 0 else ""except Exception as e:logger.debug("osascript probe failed: %s", e)@@ -163,7 +163,7 @@ def _macos_save_file_image(dest: Path) -> bool:def _macos_pngpaste(dest: Path) -> bool:"""pngpaste (brew install pngpaste) — fastest, cleanest."""try:- r = subprocess.run(["pngpaste", str(dest)], stdin=subprocess.DEVNULL, capture_output=True, timeout=3)+ r = subprocess.run(["pngpaste", str(dest)], stdin=subprocess.DEVNULL, capture_output=True, timeout=3, check=False)return r.returncode == 0 and _nonempty(dest)except FileNotFoundError:pass # pngpaste not installed@@ -188,7 +188,7 @@ on errorend try'''try:- r = subprocess.run(["osascript", "-e", script], timeout=5, **_TEXT)+ r = subprocess.run(["osascript", "-e", script], timeout=5, **_TEXT, check=False)return r.returncode == 0 and "fail" not in r.stdout and _nonempty(dest)except Exception as e:logger.debug("osascript clipboard extract failed: %s", e)@@ -255,7 +255,7 @@ def _ps_clipboard(exe: str, timeout: int, label: str, dest: Path | None = None)for check, extract in _PS_IMAGE_STRATEGIES:try:argv = [exe, *_PS_FLAGS, "-Command", check if dest is None else extract]- r = subprocess.run(argv, timeout=timeout, **_TEXT)+ r = subprocess.run(argv, timeout=timeout, **_TEXT, check=False)if dest is None:if r.returncode == 0 and "True" in r.stdout:return True@@ -327,7 +327,7 @@ def _wayland_has_image() -> bool:def _wayland_save(dest: Path) -> bool:try:- types_r = subprocess.run(_WL_LIST_TYPES, timeout=3, **_TEXT)+ types_r = subprocess.run(_WL_LIST_TYPES, timeout=3, **_TEXT, check=False)types = types_r.stdout.splitlines() if types_r.returncode == 0 else ()mime = next((m for m in _WAYLAND_MIME_PREFERENCE if m in types), None) # PNG preferredif not mime:@@ -361,7 +361,7 @@ def _convert_to_png(path: Path) -> bool:try:path.rename(tmp)r = subprocess.run(["convert", str(tmp), "png:" + str(path)], stdin=subprocess.DEVNULL, capture_output=True,- timeout=5)+ timeout=5, check=False)if r.returncode == 0 and _nonempty(path):tmp.unlink(missing_ok=True)return Truediff --git a/hermes_cli/commands_completion.py b/hermes_cli/commands_completion.pyindex dccf713b85a..9d28d4a8fc9 100644--- a/hermes_cli/commands_completion.py+++ b/hermes_cli/commands_completion.py@@ -383,7 +383,7 @@ class SlashCommandCompleter(Completer):try:proc = subprocess.run(cmd, capture_output=True, text=True, timeout=2,- cwd=cwd, encoding="utf-8", errors="replace")+ cwd=cwd, encoding="utf-8", errors="replace", check=False)except (subprocess.TimeoutExpired, OSError):continueif proc.returncode != 0 or not proc.stdout.strip():diff --git a/hermes_cli/config.py b/hermes_cli/config.pyindex 54b863b13c8..320011a689e 100644--- a/hermes_cli/config.py+++ b/hermes_cli/config.py@@ -3188,7 +3188,7 @@ def edit_config():returnprint(f"Opening {config_path} in {editor}...")- subprocess.run([editor, str(config_path)])+ subprocess.run([editor, str(config_path)], check=False)def _default_value_for_key(dotted_key: str):diff --git a/hermes_cli/copilot_auth.py b/hermes_cli/copilot_auth.pyindex b914a04a993..0a33da1218d 100644--- a/hermes_cli/copilot_auth.py+++ b/hermes_cli/copilot_auth.py@@ -139,7 +139,7 @@ def _probe_gh_cli_token() -> Optional[str]:try:result = subprocess.run(cmd, capture_output=True, text=True, encoding='utf-8',errors='replace', timeout=5, env=clean_env,- stdin=subprocess.DEVNULL, **_popen_kwargs)+ stdin=subprocess.DEVNULL, **_popen_kwargs, check=False)except (FileNotFoundError, subprocess.TimeoutExpired) as exc:logger.debug("gh CLI token lookup failed (%s): %s", gh_path, exc)continuediff --git a/hermes_cli/dashboard_procs.py b/hermes_cli/dashboard_procs.pyindex d1c89ad8bea..77a516f5423 100644--- a/hermes_cli/dashboard_procs.py+++ b/hermes_cli/dashboard_procs.py@@ -57,7 +57,7 @@ def _iter_process_table() -> list[tuple[int, str]]:_append_row(rows, line[len("ProcessId=") :], current_cmd)return rows# ps, not `pgrep -f "hermes.*dashboard"` (greedy regex; consistent with gateway pid scan).- result = subprocess.run(["ps", "-A", "-o", "pid=,command="], timeout=10, **_PS_RUN_KWARGS)+ result = subprocess.run(["ps", "-A", "-o", "pid=,command="], timeout=10, **_PS_RUN_KWARGS, check=False)if result.returncode == 0:for line in getattr(result, "stdout", "").split("\n"):parts = line.strip().split(None, 1)@@ -440,7 +440,7 @@ def _kill_pids_windows(pids: list[int], killed: list[int], failed: list[tuple[inresult = subprocess.run(["taskkill", "/PID", str(pid), "/F"], capture_output=True,stdin=subprocess.DEVNULL, text=True, encoding="utf-8",- errors="replace", timeout=10, creationflags=windows_hide_flags())+ errors="replace", timeout=10, creationflags=windows_hide_flags(), check=False)if result.returncode == 0:killed.append(pid)else:@@ -500,7 +500,7 @@ def _posix_descendants(roots: list[int]) -> dict[int, tuple[int, int | None]]:"""from gateway.status import get_process_start_timetry:- result = subprocess.run(["ps", "-A", "-o", "pid=,ppid=,tty="], timeout=10, **_PS_RUN_KWARGS)+ result = subprocess.run(["ps", "-A", "-o", "pid=,ppid=,tty="], timeout=10, **_PS_RUN_KWARGS, check=False)except (FileNotFoundError, subprocess.TimeoutExpired, OSError):return {}children: dict[int, list[tuple[int, str]]] = {}@@ -814,7 +814,7 @@ def _process_ppid(pid: int) -> int | None:try:if sys.platform == "win32":return None- result = subprocess.run(["ps", "-o", "ppid=", "-p", str(pid)], timeout=5, **_PS_RUN_KWARGS)+ result = subprocess.run(["ps", "-o", "ppid=", "-p", str(pid)], timeout=5, **_PS_RUN_KWARGS, check=False)if result.returncode != 0 or not result.stdout:return Nonereturn int(result.stdout.strip().split()[0])diff --git a/hermes_cli/doctor_platform.py b/hermes_cli/doctor_platform.pyindex bba9eb19efe..ea75918596e 100644--- a/hermes_cli/doctor_platform.py+++ b/hermes_cli/doctor_platform.py@@ -330,7 +330,7 @@ def _macos_desktop_dr(app: Path) -> str | None:"""Return the bundle's designated requirement string, or None on failure (a hanging codesign must never abort doctor)."""codesign = shutil.which("codesign")try:- proc = subprocess.run([codesign, "-d", "--requirements", "-", str(app)], capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=15) if codesign else None+ proc = subprocess.run([codesign, "-d", "--requirements", "-", str(app)], capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=15, check=False) if codesign else Noneexcept (FileNotFoundError, subprocess.TimeoutExpired):return Nonereturn None if proc is None or proc.returncode != 0 else (proc.stdout or "") + (proc.stderr or "")@@ -549,6 +549,7 @@ def _check_web_dashboard_import(should_fix: bool, f: Finding) -> None:timeout=120,cwd=str(PROJECT_ROOT),env=env,+ check=False,)except subprocess.TimeoutExpired:_fail_and_issue(diff --git a/hermes_cli/doctor_state.py b/hermes_cli/doctor_state.pyindex d18af0d1eb4..dda86bd9acc 100644--- a/hermes_cli/doctor_state.py+++ b/hermes_cli/doctor_state.py@@ -145,6 +145,7 @@ def check_legacy_desktop_checkout() -> None:return subprocess.run(["git", "-C", str(checkout), *args],capture_output=True, text=True, encoding="utf-8", timeout=10,+ check=False,)except (OSError, subprocess.SubprocessError):return None@@ -566,7 +567,7 @@ def _gh_authenticated() -> bool:if not _safe_which("gh"):return Falsetry:- result = subprocess.run(["gh", "auth", "status"], capture_output=True, timeout=10)+ result = subprocess.run(["gh", "auth", "status"], capture_output=True, timeout=10, check=False)return result.returncode == 0except (OSError, subprocess.TimeoutExpired):return Falsediff --git a/hermes_cli/doctor_tools.py b/hermes_cli/doctor_tools.pyindex 7227a06b1b8..7bb2a3ea24d 100644--- a/hermes_cli/doctor_tools.py+++ b/hermes_cli/doctor_tools.py@@ -77,7 +77,7 @@ def _doctor_tool(name: str) -> tuple[str | None, str]:def _run_ok(cmd: list[str], timeout: int, **kw) -> bool:"""True when *cmd* exits 0 within *timeout*; a timeout counts as failure."""try:- return subprocess.run(cmd, capture_output=True, timeout=timeout, **kw).returncode == 0+ return subprocess.run(cmd, capture_output=True, timeout=timeout, **kw).returncode == 0 # noqa: PLW1510 -- forwarding wrapper: callers pass subprocess kwargs via **kwargs (check may arrive through it); an explicit check=False would raise TypeErrorexcept subprocess.TimeoutExpired:return False@@ -431,7 +431,7 @@ def _audit_one(npm_bin: str, npm_dir, label: str, audit_extra: list[str], issues# Resolved absolute path so Windows can execute npm.cmd (CreateProcessW can't run bare .cmd names).audit_result = subprocess.run([npm_bin, "audit", "--json", *audit_extra], cwd=str(npm_dir),capture_output=True, text=True, encoding='utf-8', errors='replace', timeout=30,- env=with_hermes_node_path())+ env=with_hermes_node_path(), check=False)audit_data = json.loads(audit_result.stdout) if audit_result.stdout.strip() else {}counts = audit_data.get("metadata", {}).get("vulnerabilities", {})critical, high, moderate = (counts.get(k, 0) for k in ("critical", "high", "moderate"))diff --git a/hermes_cli/dump.py b/hermes_cli/dump.pyindex d0ea7f10c23..1ffff37fe80 100644--- a/hermes_cli/dump.py+++ b/hermes_cli/dump.py@@ -45,7 +45,7 @@ def _git_output(project_root: Path, *args: str) -> str:"""Stripped stdout of ``git <args>`` run in *project_root*, or '' on any failure."""try:result = subprocess.run(["git", *args], capture_output=True, text=True, encoding='utf-8', errors='replace',- timeout=5, cwd=str(project_root))+ timeout=5, cwd=str(project_root), check=False)return result.stdout.strip() if result.returncode == 0 else ""except Exception:return ""diff --git a/hermes_cli/gateway.py b/hermes_cli/gateway.pyindex 48db06e61fc..99be52478b5 100644--- a/hermes_cli/gateway.py+++ b/hermes_cli/gateway.py@@ -148,6 +148,7 @@ def _get_service_pids(all_profiles: bool = False) -> set:+ ["list-units", pattern, "--plain", "--no-legend", "--no-pager"],timeout=5,**_CAPTURE_TEXT,+ check=False,)for line in result.stdout.strip().splitlines():parts = line.split()@@ -159,6 +160,7 @@ def _get_service_pids(all_profiles: bool = False) -> set:scope_args + ["show", svc, "--property=MainPID", "--value"],timeout=5,**_CAPTURE_TEXT,+ check=False,)pid = int(show.stdout.strip())if pid > 0:@@ -189,7 +191,7 @@ def _get_service_pids(all_profiles: bool = False) -> set:# Prefix scan also catches ai.hermes.gateway* agents the label derivation can't map# (renamed profiles, other installs). Over-inclusion is safe: PIDs are only protected.try:- result = subprocess.run(["launchctl", "list"], timeout=5, **_CAPTURE_TEXT)+ result = subprocess.run(["launchctl", "list"], timeout=5, **_CAPTURE_TEXT, check=False)if result.returncode == 0:for line in result.stdout.strip().splitlines():parts = line.split()@@ -221,7 +223,7 @@ def _get_parent_pid(pid: int) -> int | None:if is_windows() or not shutil.which("ps"):return Nonetry:- result = subprocess.run(["ps", "-o", "ppid=", "-p", str(pid)], timeout=5, **_CAPTURE_TEXT)+ result = subprocess.run(["ps", "-o", "ppid=", "-p", str(pid)], timeout=5, **_CAPTURE_TEXT, check=False)except (FileNotFoundError, subprocess.TimeoutExpired):return Noneraw = result.stdout.strip()@@ -646,7 +648,7 @@ def _scan_gateway_pids(if not _found_via_proc:# ``-Aww`` not ``-A eww``: BSD/macOS ps rejects ``e``; ``-ww`` = unlimited width.- result = subprocess.run(["ps", "-Aww", "-o", "pid=,command="], timeout=10, **_CAPTURE_TEXT)+ result = subprocess.run(["ps", "-Aww", "-o", "pid=,command="], timeout=10, **_CAPTURE_TEXT, check=False)if result.returncode != 0:return []for line in result.stdout.split("\n"):@@ -1490,7 +1492,7 @@ def _launchd_print_service_pid(domain: str, label: str) -> tuple[bool, int | Nonlaunchctl call must be reported, not read as "unloaded")."""try:- result = subprocess.run(["launchctl", "print", f"{domain}/{label}"], timeout=5, **_CAPTURE_TEXT)+ result = subprocess.run(["launchctl", "print", f"{domain}/{label}"], timeout=5, **_CAPTURE_TEXT, check=False)except FileNotFoundError:return (False, None)if result.returncode != 0:@@ -1501,7 +1503,7 @@ def _launchd_print_service_pid(domain: str, label: str) -> tuple[bool, int | Nondef _launchd_service_registered(label: str, *, timeout: int = 5) -> bool:"""True when launchd knows ``label`` (``launchctl list`` exit 0). Domain-agnostic, so still true onmacOS 26+ hosts whose per-user domains reject management. FileNotFoundError/TimeoutExpired propagate."""- result = subprocess.run(["launchctl", "list", label], timeout=timeout, **_CAPTURE_TEXT)+ result = subprocess.run(["launchctl", "list", label], timeout=timeout, **_CAPTURE_TEXT, check=False)return result.returncode == 0@@ -2125,6 +2127,7 @@ def _windows_scheduled_task_state(task_name: str) -> str | None:[powershell, "-NoProfile", "-NonInteractive", "-Command", ps_cmd],capture_output=True, text=True, encoding="utf-8", errors="ignore", timeout=10,creationflags=windows_hide_flags(),+ check=False,)if result.returncode != 0:return None@@ -2533,7 +2536,7 @@ def _run_systemctl(args: list[str], *, system: bool = False, **kwargs) -> subpro"""Run systemctl; raise RuntimeError (not raw FileNotFoundError) if missing, for callers bypassing``supports_systemd_services()``."""try:- return subprocess.run(_systemctl_cmd(system) + args, **kwargs)+ return subprocess.run(_systemctl_cmd(system) + args, **kwargs) # noqa: PLW1510 -- forwarding wrapper: callers pass subprocess kwargs via **kwargs (check may arrive through it); an explicit check=False would raise TypeErrorexcept FileNotFoundError:from hermes_cli.gateway_command_errors import SystemctlUnavailableErrorraise SystemctlUnavailableError() from None@@ -3964,7 +3967,7 @@ def systemd_status(deep: bool = False, system: bool = False, full: bool = False)log_cmd = ["journalctl"] + ([] if system else ["--user"]) + ["-u", svc, "-n", "20", "--no-pager"]if full:log_cmd.append("-l")- subprocess.run(log_cmd, timeout=10)+ subprocess.run(log_cmd, timeout=10, check=False)# =============================================================================diff --git a/hermes_cli/gateway_launchd.py b/hermes_cli/gateway_launchd.pyindex 0ec7ecd9a27..0617ef2d56f 100644--- a/hermes_cli/gateway_launchd.py+++ b/hermes_cli/gateway_launchd.py@@ -49,7 +49,7 @@ def _probe_launchd_domain_for_label(label: str) -> str:# Not loaded anywhere: Aqua → gui/<uid>; anything else (Background, loginwindow) → user/<uid>,# the pre-probing default and the recommended domain on macOS 26+.try:- result = subprocess.run(["launchctl", "managername"], timeout=5, **_gw()._CAPTURE_TEXT)+ result = subprocess.run(["launchctl", "managername"], timeout=5, **_gw()._CAPTURE_TEXT, check=False)if "Aqua" in (result.stdout or ""):return gui_domainexcept launchctl_errors:@@ -902,7 +902,7 @@ def launchd_status(deep: bool = False):plist_path = _gw().get_launchd_plist_path()label = _gw().get_launchd_label()try:- result = subprocess.run(["launchctl", "list", label], timeout=10, **_gw()._CAPTURE_TEXT)+ result = subprocess.run(["launchctl", "list", label], timeout=10, **_gw()._CAPTURE_TEXT, check=False)service_listed = result.returncode == 0list_output = result.stdoutexcept subprocess.TimeoutExpired:@@ -960,4 +960,4 @@ def launchd_status(deep: bool = False):if log_file.exists():print()print("Recent logs:")- subprocess.run(["tail", "-20", str(log_file)], timeout=10)+ subprocess.run(["tail", "-20", str(log_file)], timeout=10, check=False)diff --git a/hermes_cli/gateway_windows.py b/hermes_cli/gateway_windows.pyindex 7c6f6bfd041..b3111dbfce7 100644--- a/hermes_cli/gateway_windows.py+++ b/hermes_cli/gateway_windows.py@@ -195,6 +195,7 @@ def _exec_schtasks(args: list[str]) -> tuple[int, str, str]:proc = subprocess.run([schtasks, *args], capture_output=True, text=False,timeout=_SCHTASKS_TIMEOUT_S, creationflags=windows_hide_flags(),+ check=False,)return (proc.returncode,diff --git a/hermes_cli/git_credentials.py b/hermes_cli/git_credentials.pyindex f968fb6371a..a04e2bc7422 100644--- a/hermes_cli/git_credentials.py+++ b/hermes_cli/git_credentials.py@@ -72,7 +72,7 @@ def _gh_cli_token() -> Optional[str]:env.pop(var, None)result = subprocess.run([gh, "auth", "token"], capture_output=True, text=True, encoding="utf-8", errors="replace",- timeout=10, stdin=subprocess.DEVNULL, env=env, creationflags=windows_hide_flags())+ timeout=10, stdin=subprocess.DEVNULL, env=env, creationflags=windows_hide_flags(), check=False)except (OSError, subprocess.TimeoutExpired) as exc:logger.debug("gh auth token lookup failed: %s", exc)return None@@ -102,7 +102,7 @@ def _credential_fill(origin: str) -> Optional[tuple[str, str]]:result = subprocess.run([git, "-c", "core.askPass=", "credential", "fill"], input=request, capture_output=True,text=True, encoding="utf-8", errors="replace", timeout=15, env=env,- creationflags=windows_hide_flags())+ creationflags=windows_hide_flags(), check=False)except (OSError, subprocess.TimeoutExpired) as exc:logger.debug("git credential fill failed for %s: %s", origin, exc)return None@@ -204,13 +204,13 @@ def run_git_with_credential_fallback(# Username", and the refusal below is never classified. Same drop _credential_fill does.env.pop("GIT_ASKPASS", None)env.pop("SSH_ASKPASS", None)- result = subprocess.run(argv, env=env, **run_kwargs)+ result = subprocess.run(argv, env=env, **run_kwargs) # noqa: PLW1510 -- forwarding wrapper: callers pass subprocess kwargs via **kwargs (check may arrive through it); an explicit check=False would raise TypeErrorif result.returncode == 0 or not url or not is_credential_required_error(result):return resultauth_env = with_git_auth(env, url)if auth_env == env:return result- result = subprocess.run(argv, env=auth_env, **run_kwargs)+ result = subprocess.run(argv, env=auth_env, **run_kwargs) # noqa: PLW1510 -- forwarding wrapper: callers pass subprocess kwargs via **kwargs (check may arrive through it); an explicit check=False would raise TypeErrorsent = _auth_headers(auth_env)rejected: list[str] = []# The first credential (typically GITHUB_TOKEN from .env) was refused too: it is stale or@@ -226,7 +226,7 @@ def run_git_with_credential_fallback(sent |= headerslogger.warning("%s rejected the credential from %s; retrying with %s",_https_origin(url), ", ".join(rejected) or "the stored credential", source)- result = subprocess.run(argv, env=candidate_env, **run_kwargs)+ result = subprocess.run(argv, env=candidate_env, **run_kwargs) # noqa: PLW1510 -- forwarding wrapper: callers pass subprocess kwargs via **kwargs (check may arrive through it); an explicit check=False would raise TypeErrorif result.returncode != 0 and is_credential_required_error(result):rejected.append(source)if result.returncode != 0 and "GITHUB_TOKEN/GH_TOKEN" in rejected and isinstance(result.stderr, str):diff --git a/hermes_cli/github_api.py b/hermes_cli/github_api.pyindex cd38ef6f84a..82edb8c9f24 100644--- a/hermes_cli/github_api.py+++ b/hermes_cli/github_api.py@@ -49,6 +49,7 @@ def _gh_cli_token() -> Optional[str]:result = subprocess.run(["gh", "auth", "token"], capture_output=True, text=True, encoding="utf-8", errors="replace",timeout=_GH_CLI_TIMEOUT_SECONDS, stdin=subprocess.DEVNULL, creationflags=windows_hide_flags(),+ check=False,)except (OSError, subprocess.SubprocessError) as exc:logger.debug("gh CLI token lookup unavailable: %s", exc)diff --git a/hermes_cli/gitlock.py b/hermes_cli/gitlock.pyindex 1997530c148..b147715d453 100644--- a/hermes_cli/gitlock.py+++ b/hermes_cli/gitlock.py@@ -52,7 +52,7 @@ def _git_proc_running() -> bool:argv = (["tasklist", "/FI", "IMAGENAME eq git.exe", "/FO", "CSV"]if os.name == "nt" else ["pgrep", "-x", "git"])proc = subprocess.run(argv, capture_output=True, text=True, encoding="utf-8", errors="replace",- timeout=10, creationflags=windows_hide_flags())+ timeout=10, creationflags=windows_hide_flags(), check=False)if os.name == "nt":return "git.exe" in proc.stdout.lower()return proc.returncode == 0@@ -761,7 +761,7 @@ def convert_treeless_checkout(repo_root: Path, **run_kwargs) -> bool:"--filter=blob:none", "origin"]fetch_kwargs = dict(cwd=str(repo_root), capture_output=True, text=True,encoding="utf-8", errors="replace", timeout=900, **run_kwargs)- subprocess.run([*refetch, "--tags"], check=False, **fetch_kwargs)+ subprocess.run([*refetch, "--tags"], **fetch_kwargs) # noqa: PLW1510 -- forwarding wrapper: callers pass subprocess kwargs via **run_kwargs; an explicit check=False would raise TypeErrorif not _history_trees_complete(repo_root, **run_kwargs):head = subprocess.run(["git", "rev-parse", "HEAD"], cwd=str(repo_root), check=True,capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=30,@@ -800,7 +800,7 @@ def convert_treeless_checkout_first(repo_root: Path) -> None:def _git_version(**run_kwargs) -> tuple:- out = subprocess.run(["git", "--version"], capture_output=True, text=True, encoding="utf-8",+ out = subprocess.run(["git", "--version"], capture_output=True, text=True, encoding="utf-8", # noqa: PLW1510 -- forwarding wrapper: **run_kwargs may carry checkerrors="replace", timeout=30, **run_kwargs).stdoutmatch = re.search(r"(\d+)\.(\d+)", out)return (int(match[1]), int(match[2])) if match else (0, 0)@@ -809,7 +809,7 @@ def _git_version(**run_kwargs) -> tuple:def _history_trees_complete(repo_root: Path, **run_kwargs) -> bool:"""Whether every tree in HEAD's history is local, checked without fetching (~3 s for this repo)."""env = dict(run_kwargs.pop("env", None) or noninteractive_git_env(), GIT_NO_LAZY_FETCH="1")- walk = subprocess.run(+ walk = subprocess.run( # noqa: PLW1510 -- forwarding wrapper: **run_kwargs may carry check["git", "rev-list", "--objects", "--filter=blob:none", "--missing=print", "HEAD"],cwd=str(repo_root), capture_output=True, text=True, encoding="utf-8", errors="replace",timeout=300, env=env, **run_kwargs,diff --git a/hermes_cli/goals.py b/hermes_cli/goals.pyindex a9e1341d414..c00618e36bf 100644--- a/hermes_cli/goals.py+++ b/hermes_cli/goals.py@@ -403,6 +403,7 @@ def run_gate(gate: GoalGate, *, cwd: Optional[str] = None) -> tuple[bool, int, sproc = subprocess.run(gate.command, shell=True, capture_output=True, text=True, encoding="utf-8", errors="replace",timeout=max(1, int(gate.timeout_seconds)), cwd=cwd or None,+ check=False,)combined = (proc.stdout or "") + (("\n" + proc.stderr) if proc.stderr else "")return proc.returncode == 0, proc.returncode, combined[-_GATE_OUTPUT_TAIL_CHARS:]diff --git a/hermes_cli/kanban_db_workspace.py b/hermes_cli/kanban_db_workspace.pyindex 6248cd4597d..bf5d878fc0c 100644--- a/hermes_cli/kanban_db_workspace.py+++ b/hermes_cli/kanban_db_workspace.py@@ -550,9 +550,10 @@ def _cleanup_worker_tmux(conn: sqlite3.Connection, task_id: str) -> None:out = subprocess.run(["tmux", "list-panes", "-t", session, "-F", "#{pane_dead}"],capture_output=True, text=True, encoding='utf-8', errors='replace', timeout=5,+ check=False,)if out.stdout.strip() == "1":- subprocess.run(["tmux", "kill-session", "-t", session], capture_output=True, timeout=5)+ subprocess.run(["tmux", "kill-session", "-t", session], capture_output=True, timeout=5, check=False)_kb._log.debug("Killed stale tmux session: %s", session)except Exception:pass # best-effort — never block completiondiff --git a/hermes_cli/local_runtime/devices.py b/hermes_cli/local_runtime/devices.pyindex 93bab78c8c3..19829287271 100644--- a/hermes_cli/local_runtime/devices.py+++ b/hermes_cli/local_runtime/devices.py@@ -29,7 +29,7 @@ def probe_devices(engine_dir: Path, backend: str) -> list[dict]:out = subprocess.run([sys.executable, "-I", str(Path(__file__).resolve()), str(engine_dir), backend],stdin=subprocess.DEVNULL, capture_output=True, text=True, encoding="utf-8",- errors="replace", timeout=20, creationflags=windows_hide_flags())+ errors="replace", timeout=20, creationflags=windows_hide_flags(), check=False)devices = json.loads(out.stdout) if out.returncode == 0 else []except (OSError, ValueError, subprocess.TimeoutExpired):return []diff --git a/hermes_cli/local_runtime/hardware.py b/hermes_cli/local_runtime/hardware.pyindex 7c7b5802541..b2976b1f576 100644--- a/hermes_cli/local_runtime/hardware.py+++ b/hermes_cli/local_runtime/hardware.py@@ -67,7 +67,8 @@ _DEVICE_LINE_RE = re.compile(r"CUDA\d+:.*\((\d+)\s*MiB,\s*\d+\s*MiB free\)\s*$")def _stdout(*argv: str) -> str:return subprocess.run(- list(argv), capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=5+ list(argv), capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=5,+ check=False,).stdout@@ -244,7 +245,7 @@ def _cached_nvidia_gpu_query(ttl_s: float = _GPU_QUERY_TTL_S) -> dict | None:[exe, "--query-gpu=memory.total,memory.free,name,pci.device_id,memory.used,utilization.gpu","--format=csv,noheader,nounits"],capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=10,- creationflags=windows_hide_flags())+ creationflags=windows_hide_flags(), check=False)if out.returncode != 0 or not out.stdout.strip():_gpu_query_cache = (now, None)return None@@ -325,7 +326,7 @@ def _engine_device_pool() -> tuple[int, bool | None] | None:return Noneexe = engine.binaryout = subprocess.run([str(exe), "--list-devices"], capture_output=True,- text=True, encoding="utf-8", errors="replace", timeout=30, cwd=str(exe.parent))+ text=True, encoding="utf-8", errors="replace", timeout=30, cwd=str(exe.parent), check=False)if out.returncode != 0:return Nonefor line in (out.stdout + out.stderr).splitlines():diff --git a/hermes_cli/macos_tcc_anchor.py b/hermes_cli/macos_tcc_anchor.pyindex 004d43dce62..b635b6bf68d 100644--- a/hermes_cli/macos_tcc_anchor.py+++ b/hermes_cli/macos_tcc_anchor.py@@ -259,6 +259,7 @@ def _passes_boot_gate(staged: Path, venv_dir: Path) -> bool:text=True, encoding="utf-8", errors="replace",timeout=30,env=env,+ check=False,)except OSError as exc:if exc.errno in (errno.ENOENT, errno.ENOEXEC):diff --git a/hermes_cli/main.py b/hermes_cli/main.pyindex 6b1f097d642..1c3d5827b0c 100644--- a/hermes_cli/main.py+++ b/hermes_cli/main.py@@ -1282,6 +1282,7 @@ def _resolve_workspace_key() -> Optional[str]:result = subprocess.run(["git", "rev-parse", "--show-toplevel"],capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=5,+ check=False,)if result.returncode == 0 and result.stdout.strip():return os.path.abspath(result.stdout.strip())diff --git a/hermes_cli/main_container.py b/hermes_cli/main_container.pyindex 805f4810365..9a55a1c6023 100644--- a/hermes_cli/main_container.py+++ b/hermes_cli/main_container.py@@ -15,7 +15,7 @@ def _probe_container(cmd: list, backend: str, via_sudo: bool = False):all other exceptions propagate naturally."""try:- return subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=15)+ return subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=15, check=False)except subprocess.TimeoutExpired:label = f"sudo {backend}" if via_sudo else backendprint(diff --git a/hermes_cli/main_dashboard.py b/hermes_cli/main_dashboard.pyindex 805f7b1ab29..4c28a906cf4 100644--- a/hermes_cli/main_dashboard.py+++ b/hermes_cli/main_dashboard.py@@ -87,7 +87,7 @@ _SYSTEMCTL_ERRORS = (FileNotFoundError, subprocess.TimeoutExpired, OSError)def _run_probe(cmd: list[str], *, timeout: int) -> subprocess.CompletedProcess:"""Captured, text-decoded ``subprocess.run`` for short local probes (systemctl, ps)."""return subprocess.run(- cmd, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=timeout)+ cmd, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=timeout, check=False)def _restart_managed_dashboard_service(reason: str, unit: str = _DASHBOARD_SYSTEMD_UNIT) -> bool:diff --git a/hermes_cli/main_desktop.py b/hermes_cli/main_desktop.pyindex db7973e09fa..2326a395b90 100644--- a/hermes_cli/main_desktop.py+++ b/hermes_cli/main_desktop.py@@ -607,7 +607,7 @@ def _desktop_macos_local_signing_identity() -> Optional[str]:def _codesign_verify(codesign: str, app: Path, **kwargs) -> subprocess.CompletedProcess:- return subprocess.run(+ return subprocess.run( # noqa: PLW1510 -- forwarding wrapper: callers pass subprocess kwargs via **kwargs (check may arrive through it); an explicit check=False would raise TypeError[codesign, "--verify", "--deep", "--strict", str(app)], capture_output=True, **kwargs)@@ -1288,7 +1288,7 @@ def _detect_linux_password_store() -> str | None:"org.freedesktop.DBus.Peer.Ping",],capture_output=True,- timeout=5)+ timeout=5, check=False)if result.returncode == 0:return "gnome-libsecret"return Nonediff --git a/hermes_cli/main_platform_setup.py b/hermes_cli/main_platform_setup.pyindex bb82d2e19ba..595f8030ac4 100644--- a/hermes_cli/main_platform_setup.py+++ b/hermes_cli/main_platform_setup.py@@ -114,7 +114,7 @@ def _whatsapp_install_bridge(bridge_dir) -> bool:result = subprocess.run([npm, "install", "--no-fund", "--no-audit", "--progress=false"],cwd=str(bridge_dir), stdout=subprocess.DEVNULL, stderr=subprocess.PIPE, text=True,- encoding="utf-8", errors="replace", env=env)+ encoding="utf-8", errors="replace", env=env, check=False)except (pm.InstallError, OSError) as exc:print(f" ✗ Bridge dependency preparation failed: {exc}")return False@@ -200,7 +200,7 @@ def cmd_whatsapp(args):with contextlib.suppress(KeyboardInterrupt):subprocess.run([node, str(bridge_script), "--pair-only", "--session", str(session_dir)],- cwd=str(bridge_dir), env=with_hermes_node_path())+ cwd=str(bridge_dir), env=with_hermes_node_path(), check=False)print()if not (session_dir / "creds.json").exists():diff --git a/hermes_cli/mcp_catalog.py b/hermes_cli/mcp_catalog.pyindex fa8c8484c4b..08b1d0542ab 100644--- a/hermes_cli/mcp_catalog.py+++ b/hermes_cli/mcp_catalog.py@@ -431,7 +431,7 @@ def _run_bootstrap(cwd: Path, commands: list[str]) -> None:"""Execute bootstrap commands in *cwd*. Raise CatalogError on first failure."""for cmd in commands:_say(f" $ {cmd}", Colors.DIM)- rc = subprocess.run(cmd, cwd=str(cwd), shell=True).returncode+ rc = subprocess.run(cmd, cwd=str(cwd), shell=True, check=False).returncodeif rc != 0:raise CatalogError(f"bootstrap step failed (exit {rc}): {cmd}", failure_class="bootstrap_failed")diff --git a/hermes_cli/onepassword_secrets_cli.py b/hermes_cli/onepassword_secrets_cli.pyindex 6d70bcd9414..c854258f4b8 100644--- a/hermes_cli/onepassword_secrets_cli.py+++ b/hermes_cli/onepassword_secrets_cli.py@@ -386,7 +386,8 @@ def _op_whoami(binary: Path, account: str, *, token_value: str = "") -> Optionaltry:res = subprocess.run(cmd, env=env, capture_output=True, text=True,- encoding="utf-8", errors="replace", timeout=10+ encoding="utf-8", errors="replace", timeout=10,+ check=False,)except (OSError, subprocess.TimeoutExpired):return Nonediff --git a/hermes_cli/plugin_validate.py b/hermes_cli/plugin_validate.pyindex eb6fc7b7b1a..e58af8ce855 100644--- a/hermes_cli/plugin_validate.py+++ b/hermes_cli/plugin_validate.py@@ -353,6 +353,7 @@ def _run_capability_probe(text=True, encoding="utf-8", errors="replace",timeout=_PROBE_TIMEOUT,env=env,+ check=False,)except subprocess.TimeoutExpired:return None, f"capability probe timed out after {_PROBE_TIMEOUT}s"diff --git a/hermes_cli/plugins_provenance.py b/hermes_cli/plugins_provenance.pyindex 350912068d5..c753fe00b0e 100644--- a/hermes_cli/plugins_provenance.py+++ b/hermes_cli/plugins_provenance.py@@ -71,6 +71,7 @@ def _git_origin_url(plugin_dir: Path) -> Optional[str]:capture_output=True,text=True, encoding="utf-8", errors="replace",timeout=10,+ check=False,)if proc.returncode == 0:url = (proc.stdout or "").strip()diff --git a/hermes_cli/plugins_updates.py b/hermes_cli/plugins_updates.pyindex aac8312bbf0..01fe0512c79 100644--- a/hermes_cli/plugins_updates.py+++ b/hermes_cli/plugins_updates.py@@ -395,6 +395,7 @@ def default_ls_remote(source: str) -> str:capture_output=True,text=True, encoding="utf-8", errors="replace",timeout=30,+ check=False,)if proc.returncode != 0:raise RuntimeError((proc.stderr or "ls-remote failed").strip()[:200])diff --git a/hermes_cli/profiles.py b/hermes_cli/profiles.pyindex f741c724574..270f4b0d5b5 100644--- a/hermes_cli/profiles.py+++ b/hermes_cli/profiles.py@@ -514,6 +514,7 @@ def check_alias_collision(name: str) -> Optional[str]:result = subprocess.run(["where" if sys.platform == "win32" else "which", canon],capture_output=True, text=True, encoding='utf-8', errors='replace', timeout=5,+ check=False,)if result.returncode == 0:existing_path = result.stdout.strip().splitlines()[0]@@ -1544,6 +1545,7 @@ def seed_profile_skills(profile_dir: Path, quiet: bool = False) -> Optional[dictenv={**os.environ, "HERMES_HOME": str(profile_dir)},cwd=str(project_root),capture_output=True, text=True, encoding='utf-8', errors='replace', timeout=60,+ check=False,)if result.returncode == 0 and result.stdout.strip():return json.loads(result.stdout.strip())diff --git a/hermes_cli/relaunch.py b/hermes_cli/relaunch.pyindex 1a3abd3159c..5130301a624 100644--- a/hermes_cli/relaunch.py+++ b/hermes_cli/relaunch.py@@ -124,7 +124,7 @@ def relaunch(if sys.platform == "win32":import subprocesstry:- result = subprocess.run(new_argv)+ result = subprocess.run(new_argv, check=False)sys.exit(result.returncode)except KeyboardInterrupt:sys.exit(130)diff --git a/hermes_cli/secrets_cli.py b/hermes_cli/secrets_cli.pyindex f757742ad17..d4be05aa7c0 100644--- a/hermes_cli/secrets_cli.py+++ b/hermes_cli/secrets_cli.py@@ -447,7 +447,7 @@ def _list_projects(try:res = subprocess.run([str(binary), "project", "list", "--output", "json"],- env=env, capture_output=True, text=True, encoding='utf-8', errors='replace', timeout=15)+ env=env, capture_output=True, text=True, encoding='utf-8', errors='replace', timeout=15, check=False)except (OSError, subprocess.TimeoutExpired) as exc:console.print(f" [red]Couldn't list projects: {exc}[/red]")return Nonediff --git a/hermes_cli/session_lost_and_found.py b/hermes_cli/session_lost_and_found.pyindex c280cb552b4..e6ffd766ae1 100644--- a/hermes_cli/session_lost_and_found.py+++ b/hermes_cli/session_lost_and_found.py@@ -103,7 +103,7 @@ class LostAndFoundError(RuntimeError):def _parse_sqlite3_cli_version(binary: str) -> Optional[tuple[int, int, int]]:"""Version of the sqlite3 CLI at *binary* via ``--version``, or None when it cannot run or be parsed."""try:- probe = subprocess.run([binary, "--version"], capture_output=True, timeout=30)+ probe = subprocess.run([binary, "--version"], capture_output=True, timeout=30, check=False)except (OSError, subprocess.SubprocessError):return Noneif probe.returncode != 0:@@ -172,7 +172,7 @@ def _cli_supports_recover(binary: str) -> bool:conn.commit()finally:conn.close()- probe = subprocess.run([binary, "-readonly", str(scratch), ".recover"], capture_output=True, timeout=30)+ probe = subprocess.run([binary, "-readonly", str(scratch), ".recover"], capture_output=True, timeout=30, check=False)return probe.returncode == 0 and b"sqlite_dbpage" not in probe.stderrexcept (OSError, subprocess.SubprocessError, sqlite3.Error):return Falsediff --git a/hermes_cli/setup_terminal.py b/hermes_cli/setup_terminal.pyindex c984cd6ef9f..92f4191de4c 100644--- a/hermes_cli/setup_terminal.py+++ b/hermes_cli/setup_terminal.py@@ -243,7 +243,7 @@ def _setup_backend_ssh(config: dict) -> None:import subprocessssh_cmd = ["ssh", "-o", "BatchMode=yes", "-o", "ConnectTimeout=5", *(["-i", ssh_key] if ssh_key else []),*(["-p", port] if port and port != "22" else []), f"{user}@{host}" if user else host, "echo ok"]- result = subprocess.run(ssh_cmd, timeout=10, **_RUN_KW)+ result = subprocess.run(ssh_cmd, timeout=10, **_RUN_KW, check=False)if result.returncode == 0:_setup.print_success(" SSH connection successful!")else:diff --git a/hermes_cli/source_check.py b/hermes_cli/source_check.pyindex 37ffacae49b..2660cb46090 100644--- a/hermes_cli/source_check.py+++ b/hermes_cli/source_check.py@@ -65,7 +65,7 @@ def _git_run(args: list[str], *, cwd: Optional[Path] = None, timeout: int = 5, ttry:return subprocess.run([git, *args], capture_output=True, timeout=timeout, cwd=str(cwd) if cwd is not None else None,- **(_GIT_TEXT_KW if text else {}), **kwargs)+ **(_GIT_TEXT_KW if text else {}), **kwargs, check=False)except Exception:return Nonediff --git a/hermes_cli/source_releases.py b/hermes_cli/source_releases.pyindex df260886851..1e821b87b06 100644--- a/hermes_cli/source_releases.py+++ b/hermes_cli/source_releases.py@@ -31,6 +31,7 @@ def source_repository(git_cmd=None, cwd=None) -> str:[*git_cmd, "config", "--get", "remote.origin.url"], cwd=cwd,capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=10,stdin=subprocess.DEVNULL, env=source_git_env(),+ check=False,)match = _GITHUB_ORIGIN.fullmatch(result.stdout.strip())if result.returncode == 0 and match:@@ -193,6 +194,7 @@ def _refuse_retirement_downgrade(request: dict, terminal: dict, git_cmd, cwd) ->[*git_cmd, "rev-list", "--ancestry-path", f"{request['commit']}..HEAD"], cwd=cwd,capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=10,stdin=subprocess.DEVNULL, env=source_git_env(),+ check=False,)# The target need not exist locally before the updater's fetch. When it# does, any descendants prove that this pinned build would roll us back.diff --git a/hermes_cli/tools_config_cua.py b/hermes_cli/tools_config_cua.pyindex 2f938a0fc00..10b00b2814e 100644--- a/hermes_cli/tools_config_cua.py+++ b/hermes_cli/tools_config_cua.py@@ -17,7 +17,7 @@ from hermes_cli.cli_output import (def _run_text(cmd: list, *, timeout, capture_output: bool = True,**kwargs) -> subprocess.CompletedProcess:"""Run a text subprocess with consistent decoding."""- return subprocess.run(cmd, capture_output=capture_output, text=True, encoding="utf-8",+ return subprocess.run(cmd, capture_output=capture_output, text=True, encoding="utf-8", # noqa: PLW1510 -- forwarding wrapper: callers pass subprocess kwargs via **kwargs (check may arrive through it); an explicit check=False would raise TypeErrorerrors="replace", timeout=timeout, **kwargs)@@ -180,7 +180,7 @@ def _cua_driver_autostart_registered_windows(binary: Optional[str] = None) -> botry:result = subprocess.run(["schtasks.exe", "/Query", "/TN", "cua-driver-serve", "/XML"],- capture_output=True, timeout=10, creationflags=_post_setup_no_window_flags())+ capture_output=True, timeout=10, creationflags=_post_setup_no_window_flags(), check=False)if result.returncode:return False# Parse bytes: schtasks' XML declaration carries the output encoding.diff --git a/hermes_cli/update_abort_recovery.py b/hermes_cli/update_abort_recovery.pyindex 58ac7a0ffc3..a1e0993adae 100644--- a/hermes_cli/update_abort_recovery.py+++ b/hermes_cli/update_abort_recovery.py@@ -125,7 +125,7 @@ def _run_fresh_recovery_process(else:kwargs["start_new_session"] = Truetry:- return subprocess.run(command, **kwargs)+ return subprocess.run(command, **kwargs, check=False)except (OSError, subprocess.TimeoutExpired) as exc:logger.warning("Fresh gateway restart recovery failed: %s", exc)return Nonediff --git a/hermes_cli/update_cmd_commit.py b/hermes_cli/update_cmd_commit.pyindex e7592a2c5ed..d8c5551f854 100644--- a/hermes_cli/update_cmd_commit.py+++ b/hermes_cli/update_cmd_commit.py@@ -425,7 +425,7 @@ def _run_python(argv: list[str], *, stdin: str = "", timeout: float = 60) -> strtry:done = subprocess.run(argv, input=stdin, capture_output=True, text=True, encoding="utf-8",- errors="replace", timeout=timeout, creationflags=windows_hide_flags())+ errors="replace", timeout=timeout, creationflags=windows_hide_flags(), check=False)except (OSError, subprocess.SubprocessError):return Nonereturn done.stdout if done.returncode == 0 else Nonediff --git a/hermes_cli/update_cmd_fleet.py b/hermes_cli/update_cmd_fleet.pyindex 52eb380cca6..776b7b91370 100644--- a/hermes_cli/update_cmd_fleet.py+++ b/hermes_cli/update_cmd_fleet.py@@ -691,7 +691,7 @@ def _run_pending_fleet_restart() -> bool:def _systemctl(cmd: list, *, timeout: float):"""Run a systemctl (or sudo systemctl) invocation, capturing utf-8 text with a timeout."""- return subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=timeout)+ return subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=timeout, check=False)def _systemctl_reset_and_restart(manage_cmd: list, svc_name: str, *, scope_cmd: list | None = None):@@ -917,7 +917,7 @@ def _restart_macos_launchd_gateways(_locate_launchd_gateway_service, _wait_for_launchd_service_pid,)if require_supervision:- listing = subprocess.run(["launchctl", "list"], capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=10)+ listing = subprocess.run(["launchctl", "list"], capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=10, check=False)if listing.returncode != 0:failed_or_stale_units.append("launchd (listing failed)")return@@ -1160,10 +1160,10 @@ def _sudo_noninteractive_ok(targeted_probe: list) -> bool:are about to elevate."""try:- if subprocess.run(["sudo", "-n", "true"], capture_output=True, timeout=5).returncode == 0:+ if subprocess.run(["sudo", "-n", "true"], capture_output=True, timeout=5, check=False).returncode == 0:return True# Blanket sudo refused — a targeted NOPASSWD sudoers entry may still work.- return subprocess.run(["sudo", "-n", *targeted_probe], capture_output=True, timeout=5).returncode == 0+ return subprocess.run(["sudo", "-n", *targeted_probe], capture_output=True, timeout=5, check=False).returncode == 0except (OSError, subprocess.TimeoutExpired):return Falsediff --git a/hermes_cli/update_cmd_maint.py b/hermes_cli/update_cmd_maint.pyindex 40fab12bbf8..29c00262f11 100644--- a/hermes_cli/update_cmd_maint.py+++ b/hermes_cli/update_cmd_maint.py@@ -584,6 +584,7 @@ def _ensure_fhs_path_guard() -> None:capture_output=True,text=True, encoding="utf-8", errors="replace",timeout=10,+ check=False,)except (FileNotFoundError, subprocess.TimeoutExpired):return # no bash or probe hung — don't block update on thisdiff --git a/hermes_cli/update_cmd_validation.py b/hermes_cli/update_cmd_validation.pyindex 665d10756c3..c95baf2ceda 100644--- a/hermes_cli/update_cmd_validation.py+++ b/hermes_cli/update_cmd_validation.py@@ -50,7 +50,7 @@ def _critical_module_import_failures(try:result = subprocess.run(runtime_command(Path(root), code=probe), cwd=str(root), capture_output=True, text=True,- encoding="utf-8", errors="replace", timeout=120)+ encoding="utf-8", errors="replace", timeout=120, check=False)except subprocess.TimeoutExpired:return _probe_failure("TimeoutExpired", "timed out before reporting import health")except (OSError, subprocess.SubprocessError):diff --git a/hermes_cli/update_custody.py b/hermes_cli/update_custody.pyindex b3cd5fb26af..a9b46461489 100644--- a/hermes_cli/update_custody.py+++ b/hermes_cli/update_custody.py@@ -259,7 +259,7 @@ def run(argv: Sequence[str], *, inherit_lock: bool = False, **kwargs) -> subprocparent-death signal for the rest); on Windows inside an update it is the same contract over:func:`popen`, so the child is job-bound before it runs."""if not (sys.platform == "win32" and _held() is not None):- return subprocess.run(list(argv), **_custody_kwargs(inherit_lock, kwargs))+ return subprocess.run(list(argv), **_custody_kwargs(inherit_lock, kwargs)) # noqa: PLW1510 -- forwarding wrapper: callers pass subprocess kwargs via **kwargs (check may arrive through it); an explicit check=False would raise TypeErrorinput, timeout = kwargs.pop("input", None), kwargs.pop("timeout", None)check = kwargs.pop("check", False)if input is not None:diff --git a/hermes_cli/update_lock.py b/hermes_cli/update_lock.pyindex 578b421654c..62d4a159e97 100644--- a/hermes_cli/update_lock.py+++ b/hermes_cli/update_lock.py@@ -208,6 +208,7 @@ def _stdlib_create_time(pid: int) -> float | None:["ps", "-o", "lstart=", "-p", str(pid)], capture_output=True, text=True,encoding="utf-8", errors="replace", timeout=5, stdin=subprocess.DEVNULL,env={"PATH": os.environ.get("PATH") or "/bin:/usr/bin", "LC_ALL": "C", "TZ": "UTC0"},+ check=False,).stdout.strip()if not out:return Nonediff --git a/hermes_cli/version_info.py b/hermes_cli/version_info.pyindex 75bf27e39ee..a4b3b33b9fe 100644--- a/hermes_cli/version_info.py+++ b/hermes_cli/version_info.py@@ -61,7 +61,8 @@ def _derived_version(def _run_git(repo_dir: Path, *args: str) -> str | None:try:result = subprocess.run(- ["git", *args], capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=3, cwd=str(repo_dir)+ ["git", *args], capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=3, cwd=str(repo_dir),+ check=False,)except (OSError, subprocess.SubprocessError):return None@@ -230,6 +231,7 @@ def _git_version_info(repo_dir: Path, *, include_untracked: bool = False) -> Vertext=True, encoding="utf-8", errors="replace",timeout=3,cwd=str(repo_dir),+ check=False,)dirty = dirty_result.returncode == 0 and bool((dirty_result.stdout or "").strip())except (OSError, subprocess.SubprocessError):diff --git a/hermes_cli/web_git.py b/hermes_cli/web_git.pyindex 650d1c24c78..04d82195cb8 100644--- a/hermes_cli/web_git.py+++ b/hermes_cli/web_git.py@@ -39,6 +39,7 @@ def _run(argv: list[str], cwd: str, timeout: int, env: dict) -> subprocess.Complreturn subprocess.run(argv, cwd=cwd, capture_output=True, text=True, encoding='utf-8',errors='replace', timeout=timeout, stdin=subprocess.DEVNULL, env=env,+ check=False,)except (OSError, subprocess.SubprocessError):return Nonediff --git a/hermes_cli/web_routers/files.py b/hermes_cli/web_routers/files.pyindex fa0abb9bffd..cf9b299b5c0 100644--- a/hermes_cli/web_routers/files.py+++ b/hermes_cli/web_routers/files.py@@ -253,7 +253,7 @@ def _fs_git_branch(cwd: str) -> str:"errors": "replace", "timeout": 2, "check": False}if sys.platform == "win32":run_kwargs["creationflags"] = windows_hide_flags()- result = subprocess.run(["git", "-C", cwd, "branch", "--show-current"], **run_kwargs)+ result = subprocess.run(["git", "-C", cwd, "branch", "--show-current"], **run_kwargs, check=False)return result.stdout.strip() if result.returncode == 0 else ""except Exception:return ""diff --git a/hermes_cli/web_routers/messaging.py b/hermes_cli/web_routers/messaging.pyindex 35f1736f625..00c4475baf0 100644--- a/hermes_cli/web_routers/messaging.py+++ b/hermes_cli/web_routers/messaging.py@@ -404,6 +404,7 @@ def _ensure_whatsapp_bridge_dependencies(bridge_dir: Path) -> None:[npm, "install", "--silent"], cwd=str(bridge_dir), capture_output=True, text=True,encoding="utf-8", errors="replace", timeout=env_int("WHATSAPP_NPM_INSTALL_TIMEOUT", 300),env=env, creationflags=windows_hide_flags(),+ check=False,)except subprocess.TimeoutExpired as exc:raise HTTPException(status_code=500, detail="Installing WhatsApp bridge dependencies timed out.") from excdiff --git a/hermes_cli/windows_ssh_runtime.py b/hermes_cli/windows_ssh_runtime.pyindex 6d21303a020..13f2a47900f 100644--- a/hermes_cli/windows_ssh_runtime.py+++ b/hermes_cli/windows_ssh_runtime.py@@ -366,7 +366,7 @@ def _resolve_direct_command(hermes_path: str) -> list[str]:No assumption about python.exe beside an external bin launcher is valid."""out = subprocess.run([hermes_path, "--print-runtime-command"], capture_output=True,- text=True, encoding="utf-8", errors="replace", timeout=30)+ text=True, encoding="utf-8", errors="replace", timeout=30, check=False)if out.returncode != 0:raise ValueError("could not resolve Hermes runtime; refresh this installation's launcher")try:@@ -420,8 +420,8 @@ def inspect_hermes(hermes_path: str) -> dict[str, Any]:path = os.path.abspath(hermes_path)if not os.path.isabs(hermes_path) or not os.path.isfile(path):raise ValueError("Hermes path is not an executable file")- version = subprocess.run([path, "--version"], capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=20)- help_result = subprocess.run([path, "serve", "--help"], capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=20)+ version = subprocess.run([path, "--version"], capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=20, check=False)+ help_result = subprocess.run([path, "serve", "--help"], capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=20, check=False)help_text = help_result.stdout + help_result.stderrreturn {"path": path,diff --git a/hermes_cli/worktree_gc.py b/hermes_cli/worktree_gc.pyindex 141cd032fc5..0ea4b6df90e 100644--- a/hermes_cli/worktree_gc.py+++ b/hermes_cli/worktree_gc.py@@ -53,7 +53,7 @@ class BranchRecord:def _run(cmd: list, timeout: int, cwd: Optional[str] = None,env: Optional[dict] = None) -> subprocess.CompletedProcess:return subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8", errors="replace",- timeout=timeout, cwd=cwd, env=env, stdin=subprocess.DEVNULL)+ timeout=timeout, cwd=cwd, env=env, stdin=subprocess.DEVNULL, check=False)@dataclassdiff --git a/hermes_cli/worktree_ops.py b/hermes_cli/worktree_ops.pyindex 2bf0588bc6a..15ea8e43b7a 100644--- a/hermes_cli/worktree_ops.py+++ b/hermes_cli/worktree_ops.py@@ -33,7 +33,7 @@ def _cprint(text: str) -> None:def _git(args, cwd, timeout: float = 10, **kwargs):"""Run ``git *args`` in *cwd* capturing UTF-8 text; raises like ``subprocess.run``."""- return subprocess.run(["git", *args], capture_output=True, text=True, encoding="utf-8",+ return subprocess.run(["git", *args], capture_output=True, text=True, encoding="utf-8", # noqa: PLW1510 -- forwarding wrapper: callers pass subprocess kwargs via **kwargs (check may arrive through it); an explicit check=False would raise TypeErrorerrors="replace", timeout=timeout, cwd=cwd, **kwargs)@@ -737,6 +737,7 @@ def _worktree_branch_pr_merged(result = subprocess.run(["gh", "pr", "list", "--head", branch, "--state", "merged", "--json", "number", "--limit", "1"],capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=timeout, cwd=worktree_path,+ check=False,)if result.returncode != 0:return Falsediff --git a/hermes_constants.py b/hermes_constants.pyindex ceef4a291ea..e491c1e8e23 100644--- a/hermes_constants.py+++ b/hermes_constants.py@@ -448,8 +448,9 @@ def _run_version_probe(argv: list[str], **kwargs):import subprocesstry:from hermes_cli._subprocess_compat import windows_hide_flags- return subprocess.run(- argv, capture_output=True, timeout=10, creationflags=windows_hide_flags(), **kwargs+ return subprocess.run( # noqa: PLW1510 -- forwarding wrapper: callers pass subprocess kwargs via **kwargs (check may arrive through it); an explicit check=False would raise TypeError+ argv, capture_output=True, timeout=10, creationflags=windows_hide_flags(), **kwargs,+)except (OSError, subprocess.TimeoutExpired, ValueError):return Nonediff --git a/optional-skills/software-development/ast-grep/scripts/ast_grep_helper.py b/optional-skills/software-development/ast-grep/scripts/ast_grep_helper.pyindex e57ccd26e1e..56ec1e1b326 100755--- a/optional-skills/software-development/ast-grep/scripts/ast_grep_helper.py+++ b/optional-skills/software-development/ast-grep/scripts/ast_grep_helper.py@@ -179,6 +179,7 @@ def which_binary() -> Optional[Path]:stdin=subprocess.DEVNULL, capture_output=True,text=True,timeout=5,+ check=False,)if out.returncode != 0 or "ast-grep" not in (out.stdout + out.stderr).lower():continue@@ -396,6 +397,7 @@ def run_sg(stdin=subprocess.DEVNULL, capture_output=capture,text=True,timeout=timeout,+ check=False,)except subprocess.TimeoutExpired:err(f"ast-grep call timed out after {timeout}s")@@ -606,7 +608,7 @@ def cmd_install(_args: argparse.Namespace) -> int:return 1trace(f"running installer: {' '.join(cmd)}")# health: allow HX006 -- the installer downloads a release; its duration depends on the network- return subprocess.run(cmd, stdin=subprocess.DEVNULL).returncode+ return subprocess.run(cmd, stdin=subprocess.DEVNULL, check=False).returncodedef cmd_validate(args: argparse.Namespace) -> int:diff --git a/plugins/memory/byterover/__init__.py b/plugins/memory/byterover/__init__.pyindex fd09cc25298..18bc35ca0d3 100644--- a/plugins/memory/byterover/__init__.py+++ b/plugins/memory/byterover/__init__.py@@ -114,6 +114,7 @@ def _run_brv(args: list[str], timeout: int = _QUERY_TIMEOUT, cwd: str | None = Nresult = subprocess.run([brv_path] + args, capture_output=True, text=True, encoding='utf-8', errors='replace',timeout=timeout, cwd=effective_cwd, env=env, stdin=subprocess.DEVNULL,+ check=False,)except subprocess.TimeoutExpired:return {"success": False, "error": f"brv timed out after {timeout}s"}diff --git a/plugins/platforms/discord/voice_mixer.py b/plugins/platforms/discord/voice_mixer.pyindex b1753bb879b..1f8ffe3d602 100644--- a/plugins/platforms/discord/voice_mixer.py+++ b/plugins/platforms/discord/voice_mixer.py@@ -184,6 +184,7 @@ def decode_to_pcm(path: str, *, timeout: float = 30.0) -> Optional[bytes]:[resolve_ffmpeg_executable(), "-y", "-loglevel", "error", "-i", path, "-f", "s16le","-ar", str(SAMPLE_RATE), "-ac", str(CHANNELS), "pipe:1"],capture_output=True, timeout=timeout, stdin=subprocess.DEVNULL,+ check=False,)except (subprocess.TimeoutExpired, FileNotFoundError, OSError) as e:logger.warning("decode_to_pcm failed for %s: %s", path, e)diff --git a/plugins/platforms/matrix/adapter.py b/plugins/platforms/matrix/adapter.pyindex 0f288ad1e12..57368d728a0 100644--- a/plugins/platforms/matrix/adapter.py+++ b/plugins/platforms/matrix/adapter.py@@ -87,7 +87,7 @@ _MATRIX_VOICE_WAVEFORM_BINS = 30def _run_media_tool(cmd: list, *, timeout: int, text: bool = False):"""Run ffmpeg/ffprobe with captured output and no stdin."""- return subprocess.run(cmd, capture_output=True, text=text, timeout=timeout, stdin=subprocess.DEVNULL)+ return subprocess.run(cmd, capture_output=True, text=text, timeout=timeout, stdin=subprocess.DEVNULL, check=False)def _matrix_voice_metadata_for_file(path: Path) -> dict[str, Any]:diff --git a/plugins/platforms/telegram/adapter.py b/plugins/platforms/telegram/adapter.pyindex ea4cf10f14a..cae83d97f3b 100644--- a/plugins/platforms/telegram/adapter.py+++ b/plugins/platforms/telegram/adapter.py@@ -248,7 +248,7 @@ def _probe_voice_duration_seconds(path: str) -> Optional[int]:if shutil.which("ffprobe"):proc = subprocess.run(["ffprobe", "-v", "error", "-show_entries", "format=duration", "-of", "default=noprint_wrappers=1:nokey=1", path],- stdin=subprocess.DEVNULL, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=5)+ stdin=subprocess.DEVNULL, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=5, check=False)if proc.returncode == 0:return _coerce_duration_seconds(proc.stdout.strip())except Exception:@@ -272,7 +272,7 @@ def _probe_video_geometry(path: str) -> dict[str, int]:["ffprobe", "-v", "error", "-select_streams", "v:0","-show_entries", "stream=width,height", "-show_entries", "format=duration","-of", "json", path],- stdin=subprocess.DEVNULL, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=20)+ stdin=subprocess.DEVNULL, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=20, check=False)if proc.returncode != 0:return {}blob = json.loads(proc.stdout or "{}")@@ -308,7 +308,7 @@ def _video_thumbnail_jpeg(path: str, duration: Optional[int]) -> Optional[str]:proc = subprocess.run(["ffmpeg", "-y", "-ss", str(seek), "-i", path, "-frames:v", "1","-vf", "scale=320:-2", "-q:v", "6", out],- stdin=subprocess.DEVNULL, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=30)+ stdin=subprocess.DEVNULL, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=30, check=False)if proc.returncode != 0 or not os.path.getsize(out):with contextlib.suppress(OSError):os.remove(out)diff --git a/plugins/platforms/whatsapp/adapter.py b/plugins/platforms/whatsapp/adapter.pyindex 75fbdd4d60a..0713d40598c 100644--- a/plugins/platforms/whatsapp/adapter.py+++ b/plugins/platforms/whatsapp/adapter.py@@ -39,11 +39,11 @@ def _listener_pids_on_port(port: int) -> list:"""PIDs *listening* on ``port`` (POSIX), never clients — a bare ``lsof -i :PORT`` once killed the user's browser."""pids: list = []with suppress(FileNotFoundError): # lsof not installed — fall through to ss- pids = _safe_ints(subprocess.run(["lsof", "-ti", f"tcp:{port}", "-sTCP:LISTEN"], timeout=5, **_RUN_TEXT).stdout.strip().splitlines())+ pids = _safe_ints(subprocess.run(["lsof", "-ti", f"tcp:{port}", "-sTCP:LISTEN"], timeout=5, **_RUN_TEXT, check=False).stdout.strip().splitlines())if pids:return pidswith suppress(FileNotFoundError):- pids.extend(int(m.group(1)) for m in re.finditer(r"pid=(\d+)", subprocess.run(["ss", "-ltnHp", f"sport = :{port}"], timeout=5, **_RUN_TEXT).stdout))+ pids.extend(int(m.group(1)) for m in re.finditer(r"pid=(\d+)", subprocess.run(["ss", "-ltnHp", f"sport = :{port}"], timeout=5, **_RUN_TEXT, check=False).stdout))return pids@@ -67,7 +67,7 @@ def _session_dir(extra) -> Path:def _windows_listener_pids(port: int) -> list:"""PIDs in LISTENING state on ``port`` via netstat (Windows)."""from hermes_cli._subprocess_compat import windows_hide_flags- result = subprocess.run(["netstat", "-ano", "-p", "TCP"], timeout=5, creationflags=windows_hide_flags(), **_RUN_TEXT)+ result = subprocess.run(["netstat", "-ano", "-p", "TCP"], timeout=5, creationflags=windows_hide_flags(), **_RUN_TEXT, check=False)rows = (line.split() for line in result.stdout.splitlines())return _safe_ints(p[4] for p in rows if len(p) >= 5 and p[3] == "LISTENING" and p[1].endswith(f":{port}"))@@ -106,7 +106,7 @@ def _kill_port_process(port: int) -> None:from hermes_cli._subprocess_compat import windows_hide_flags# Only SubprocessError is swallowed per-PID; an OSError (e.g. taskkill missing) aborts the scan.with suppress(subprocess.SubprocessError):- subprocess.run(["taskkill", "/PID", str(pid), "/F"], capture_output=True, stdin=subprocess.DEVNULL, timeout=5, creationflags=windows_hide_flags())+ subprocess.run(["taskkill", "/PID", str(pid), "/F"], capture_output=True, stdin=subprocess.DEVNULL, timeout=5, creationflags=windows_hide_flags(), check=False)else:with suppress(OSError): # ProcessLookupError/PermissionError are OSError subclassesos.kill(pid, signal.SIGTERM)@@ -190,6 +190,7 @@ def _terminate_bridge_process(proc, *, force: bool = False) -> None:result = subprocess.run(["taskkill", "/PID", str(proc.pid), "/T"] + (["/F"] if force else []),stdin=subprocess.DEVNULL, capture_output=True, text=True, encoding='utf-8', errors='replace', timeout=10,+ check=False,)except FileNotFoundError:return getattr(proc, action)()@@ -259,7 +260,7 @@ def check_whatsapp_requirements() -> bool:# Let connect prepare a missing runtime, but never install during discovery.return lazy_installs_allowed()try:- return subprocess.run([_node, "--version"], timeout=5, env=with_hermes_node_path(), **_RUN_TEXT).returncode == 0+ return subprocess.run([_node, "--version"], timeout=5, env=with_hermes_node_path(), **_RUN_TEXT, check=False).returncode == 0except Exception:return False@@ -434,7 +435,7 @@ class WhatsAppAdapter(WhatsAppBehaviorMixin, BasePlatformAdapter):raise pm.InstallError("npm", "ensured but no selected binary was recorded")_npm_bin = str(installed.binary)install_result = subprocess.run([_npm_bin, "install", "--silent"], cwd=str(bridge_dir), timeout=env_int("WHATSAPP_NPM_INSTALL_TIMEOUT", 300),- env=env, **_RUN_TEXT)+ env=env, **_RUN_TEXT, check=False)if install_result.returncode == 0:print(f"[{self.name}] Dependencies installed")with suppress(OSError): # Stamp is an optimization; install still succeededdiff --git a/pm/environment.py b/pm/environment.pyindex ea2f856517d..dd31668f0e1 100644--- a/pm/environment.py+++ b/pm/environment.py@@ -318,7 +318,7 @@ class PythonEnvironment:tail.close(result.returncode == 0)return resultreturn subprocess.run(command, cwd=native(cwd), env=env, capture_output=True,- text=True, encoding="utf-8", errors="replace", timeout=timeout)+ text=True, encoding="utf-8", errors="replace", timeout=timeout, check=False)except subprocess.TimeoutExpired as exc:from pm.index_config import TIMEOUT_HINTdiff --git a/pm/extras.py b/pm/extras.pyindex 73c482f025d..1e0a87acb33 100644--- a/pm/extras.py+++ b/pm/extras.py@@ -169,7 +169,7 @@ def _evaluate_in_runtime(marker: str, environment: dict[str, str]) -> bool:command = runtime_command(Path(__file__).with_name("_marker_eval.py"),[marker, json.dumps(environment)])result = subprocess.run(command, env=runtime_environment(), capture_output=True,- text=True, timeout=60)+ text=True, timeout=60, check=False)except Exception:return True # same fallback as a malformed marker: the resolver decidesif result.returncode != 0:diff --git a/pm/package.py b/pm/package.pyindex 5b4dbed2c6d..e0a3073d39e 100644--- a/pm/package.py+++ b/pm/package.py@@ -379,4 +379,4 @@ class Runner:def run(self, cmd, **kwargs) -> subprocess.CompletedProcess:kwargs.setdefault("env", self.env)- return subprocess.run(cmd, **kwargs)+ return subprocess.run(cmd, **kwargs) # noqa: PLW1510 -- forwarding wrapper: callers pass subprocess kwargs via **kwargs (check may arrive through it); an explicit check=False would raise TypeErrordiff --git a/pm/packages.py b/pm/packages.pyindex 18b1ffcbf24..81902c6f57b 100644--- a/pm/packages.py+++ b/pm/packages.py@@ -107,6 +107,7 @@ class BinaryPackage(Package):timeout=60,cwd=native(binary.parent) if self.probe_cwd else None,env=self._probe_env(),+ check=False,)except OSError as e:return f"could not exec {native(binary)} {' '.join(self.probe_args)}: {e}"@@ -660,6 +661,7 @@ class Npm(BinaryPackage):text=True,timeout=900,env=npm_env(Path(cache)),+ check=False,)if proc.returncode != 0:raise InstallError(@@ -742,6 +744,7 @@ class Git(BinaryPackage):stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL,timeout=600,+ check=False,)except subprocess.TimeoutExpired:raise InstallError(diff --git a/pm/recovery.py b/pm/recovery.pyindex f05e7d460ac..aa931b06180 100644--- a/pm/recovery.py+++ b/pm/recovery.py@@ -45,7 +45,7 @@ def validate_environment(python: Path | list[str], *, env: dict, cwd: Path) -> N)command = [str(python), "-I"] if isinstance(python, (str, Path)) else [*python]result = subprocess.run([*command, "-c", script], cwd=cwd, env=env,- capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=60)+ capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=60, check=False)if result.returncode:raise InstallError("venv", f"startup validation failed: {result.stderr.strip()[-1000:]}")diff --git a/pm/runtime.py b/pm/runtime.pyindex e1e5399221e..db3455efa0e 100644--- a/pm/runtime.py+++ b/pm/runtime.py@@ -103,6 +103,7 @@ def _validate(python: Path, env: dict[str, str]) -> str:[str(python), "-I", "-B", "-c","import packaging, tomli_w, truststore; from ruamel.yaml import YAML"],env=env, capture_output=True, text=True, timeout=30,+ check=False,)except (OSError, subprocess.TimeoutExpired) as exc:return str(exc)@@ -272,5 +273,5 @@ def runtime_command(script: Path, args: tuple[str, ...] | list[str] = (), *,def run_cli(argv: list[str]) -> int:result = subprocess.run(runtime_command(Path(__file__).with_name("launch.py"), argv),- env=runtime_environment())+ env=runtime_environment(), check=False)return result.returncodediff --git a/pm/runtime_stage.py b/pm/runtime_stage.pyindex e8157707703..1e256bd13c0 100644--- a/pm/runtime_stage.py+++ b/pm/runtime_stage.py@@ -45,6 +45,7 @@ def stage_runtime(uv: Path, python: Path, destination: Path, *,[str(environment.executable), "-I", "-B", "-c","import packaging, tomli_w, truststore; from ruamel.yaml import YAML"],env=env, capture_output=True, text=True, timeout=30,+ check=False,)if checked.returncode:raise InstallError("pm-runtime", f"dependency validation failed: {checked.stderr.strip()}")diff --git a/ruff.strict.toml b/ruff.strict.tomlindex 77d4e9f8e05..4213caa5613 100644--- a/ruff.strict.toml+++ b/ruff.strict.toml@@ -351,9 +351,9 @@ select = ["PLW1501","PLW1507",# "PLW1508",- # "PLW1509",- # "PLW1510",- # "PLW2101",+ "PLW1509",+ "PLW1510",+ "PLW2101","UP001","UP003","UP004",diff --git a/scripts/audit_pr_attribution.py b/scripts/audit_pr_attribution.pyindex f5faa8d4081..dabc4897c01 100644--- a/scripts/audit_pr_attribution.py+++ b/scripts/audit_pr_attribution.py@@ -49,6 +49,7 @@ def run(*args: str, check: bool = True) -> str:result = subprocess.run(list(args), capture_output=True, text=True, encoding="utf-8",errors="replace", cwd=str(REPO_ROOT),+ check=False,)if check and result.returncode != 0:raise RuntimeError(f"{' '.join(args)}: {result.stderr.strip()}")diff --git a/scripts/bundles/desktop_toolchain.py b/scripts/bundles/desktop_toolchain.pyindex c96555a7e01..98d08f62b5c 100644--- a/scripts/bundles/desktop_toolchain.py+++ b/scripts/bundles/desktop_toolchain.py@@ -82,6 +82,7 @@ def run_preparation(source: Path, work: Path, cache: Path, request_file: Path,str(source), str(cache), str(request_file.resolve()), str(Path(__file__).resolve()),str(worker or source / "scripts/bundles/desktop_prepare.py")],cwd=source, env=environment, stdin=subprocess.DEVNULL,+ check=False,).returncode@@ -166,7 +167,7 @@ def native_cache_path(cache: Path, env: Mapping[str, str]) -> Path:for command in commands:try:result = subprocess.run(command, env=dict(env), capture_output=True, text=True, encoding="utf-8",- errors="replace", timeout=30, stdin=subprocess.DEVNULL)+ errors="replace", timeout=30, stdin=subprocess.DEVNULL, check=False)output = result.stdout + result.stderr# cl /Bv reports its identity and exits 2 when no source is supplied.valid = result.returncode in ((0, 2) if command == ["cl", "/Bv"] else (0,)) and bool(output.strip())diff --git a/scripts/bundles/native.py b/scripts/bundles/native.pyindex 7a4cdc492f1..234022bcef2 100644--- a/scripts/bundles/native.py+++ b/scripts/bundles/native.py@@ -126,7 +126,7 @@ def stage_native(args) -> int:"--ref", args.ref or "HEAD", "--source", str(root)]for name, product in getattr(args, "frontends", {}).items():command += [f"--{name}", str(product)]- return subprocess.run(command, cwd=root, env=env).returncode+ return subprocess.run(command, cwd=root, env=env, check=False).returncodedef prune_staged_store(store_dir: Path, names: list[str]) -> None:diff --git a/scripts/check-case-collisions.py b/scripts/check-case-collisions.pyindex 0ef0becfb81..809f68f8c6e 100644--- a/scripts/check-case-collisions.py+++ b/scripts/check-case-collisions.py@@ -66,7 +66,7 @@ def main() -> int:print(f"::error::cannot enter {args.root}: {exc}")return 2- proc = subprocess.run(["git", "ls-files", "-z"], capture_output=True)+ proc = subprocess.run(["git", "ls-files", "-z"], capture_output=True, check=False)if proc.returncode != 0:msg = proc.stderr.decode("utf-8", errors="replace").strip()print(f"::error::git ls-files failed in {args.root}: {msg}")diff --git a/scripts/check_profile_scope_patterns.py b/scripts/check_profile_scope_patterns.pyindex fa5993ed9b4..fa16f99b3b9 100644--- a/scripts/check_profile_scope_patterns.py+++ b/scripts/check_profile_scope_patterns.py@@ -78,7 +78,7 @@ def scan_text(rel: str, text: str, patterns: list[dict], lines: set[int] | Nonedef _git(*args: str) -> str:- proc = subprocess.run(["git", *args], cwd=ROOT, capture_output=True, text=True, encoding="utf-8", errors="replace")+ proc = subprocess.run(["git", *args], cwd=ROOT, capture_output=True, text=True, encoding="utf-8", errors="replace", check=False)return proc.stdout@@ -108,7 +108,7 @@ def added_lines_vs_base(base: str, head: str | None) -> dict[str, set[int]]:def _read(rel: str, head: str | None) -> str | None:if head:cmd = ["git", "show", f"{head}:{rel}"]- r = subprocess.run(cmd, cwd=ROOT, capture_output=True, text=True, encoding="utf-8", errors="replace")+ r = subprocess.run(cmd, cwd=ROOT, capture_output=True, text=True, encoding="utf-8", errors="replace", check=False)return r.stdout if r.returncode == 0 else Nonepath = ROOT / relreturn path.read_text(encoding="utf-8-sig", errors="replace") if path.is_file() else Nonediff --git a/scripts/ci/check_lazy_deps_imports.py b/scripts/ci/check_lazy_deps_imports.pyindex 33f481f6628..210c131854d 100644--- a/scripts/ci/check_lazy_deps_imports.py+++ b/scripts/ci/check_lazy_deps_imports.py@@ -50,6 +50,7 @@ def _tracked_python_files(root: Path) -> list[str]:proc = subprocess.run(["git", "-C", str(root), "ls-files", "-z", "--", "*.py"],capture_output=True,+ check=False,)if proc.returncode != 0:sys.stderr.write(diff --git a/scripts/ci/check_public_surface.py b/scripts/ci/check_public_surface.pyindex 4c1c6fc4d37..f0a98bf9fbb 100644--- a/scripts/ci/check_public_surface.py+++ b/scripts/ci/check_public_surface.py@@ -36,7 +36,7 @@ _TEST_DEF_RE = re.compile(r"^\s*(?:async\s+)?def test_", re.MULTILINE)def _git(*args: str) -> str:- return subprocess.run(["git", *args], capture_output=True, text=True, encoding="utf-8", errors="replace").stdout+ return subprocess.run(["git", *args], capture_output=True, text=True, encoding="utf-8", errors="replace", check=False).stdoutdef _changed_py(base: str, head: str) -> list[str]:@@ -45,7 +45,7 @@ def _changed_py(base: str, head: str) -> list[str]:def _show(rev: str, path: str) -> str | None:- r = subprocess.run(["git", "show", f"{rev}:{path}"], capture_output=True, text=True, encoding="utf-8", errors="replace")+ r = subprocess.run(["git", "show", f"{rev}:{path}"], capture_output=True, text=True, encoding="utf-8", errors="replace", check=False)return r.stdout if r.returncode == 0 else None@@ -160,7 +160,7 @@ def main(argv: list[str] | None = None) -> int:ap.add_argument("--json", dest="json_out", help="also write the report as JSON")args = ap.parse_args(argv)for ref in (args.base, args.head):- if subprocess.run(["git", "rev-parse", "--verify", "--quiet", f"{ref}^{{commit}}"], capture_output=True).returncode != 0:+ if subprocess.run(["git", "rev-parse", "--verify", "--quiet", f"{ref}^{{commit}}"], capture_output=True, check=False).returncode != 0:print(f"public-surface: cannot resolve ref {ref!r} (fetch it first); refusing to report a clean diff", file=sys.stderr)return 2base = _git("merge-base", args.base, args.head).strip()diff --git a/scripts/ci/lockfile_diff.py b/scripts/ci/lockfile_diff.pyindex a118eb1e5dc..39a2d769651 100644--- a/scripts/ci/lockfile_diff.py+++ b/scripts/ci/lockfile_diff.py@@ -117,6 +117,7 @@ def _git_show(ref: str, path: str, repo_root: str) -> str | None:capture_output=True,text=True, encoding="utf-8", errors="replace",cwd=repo_root,+ check=False,)return proc.stdout if proc.returncode == 0 else Nonediff --git a/scripts/contributor_audit.py b/scripts/contributor_audit.pyindex 0d1c8de997c..31df3da2e5e 100644--- a/scripts/contributor_audit.py+++ b/scripts/contributor_audit.py@@ -105,6 +105,7 @@ def git(*args, cwd=None):capture_output=True,text=True, encoding='utf-8', errors='replace',cwd=cwd or str(REPO_ROOT),+ check=False,)if result.returncode != 0:print(f" [warn] git {' '.join(args)} failed: {result.stderr.strip()}", file=sys.stderr)@@ -130,6 +131,7 @@ def gh_pr_list():capture_output=True,text=True, encoding='utf-8', errors='replace',timeout=60,+ check=False,)if result.returncode != 0:print(f" [warn] gh pr list failed: {result.stderr.strip()}", file=sys.stderr)diff --git a/scripts/profile-tui.py b/scripts/profile-tui.pyindex cba761d89a2..88ff89d5380 100755--- a/scripts/profile-tui.py+++ b/scripts/profile-tui.py@@ -574,6 +574,7 @@ def loop_mode(args: argparse.Namespace) -> int:cwd=tui_dir,capture_output=True,text=True, encoding='utf-8', errors='replace',+ check=False,)if result.returncode != 0:print("✗ build failed:")diff --git a/scripts/release.py b/scripts/release.pyindex d8198f03168..006003679c1 100755--- a/scripts/release.py+++ b/scripts/release.py@@ -37,6 +37,7 @@ def git(*args, cwd=None):["git"] + list(args),capture_output=True, text=True, encoding="utf-8", errors="replace",cwd=cwd or str(REPO_ROOT),+ check=False,)if result.returncode != 0:print(f"git {' '.join(args)} failed: {result.stderr}", file=sys.stderr)@@ -51,6 +52,7 @@ def git_result(*args, cwd=None):capture_output=True,text=True, encoding="utf-8", errors="replace",cwd=cwd or str(REPO_ROOT),+ check=False,)@@ -92,6 +94,7 @@ def dispatch_desktop_build(tag: str, gh_repo: str | None) -> bool:result = subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8",errors="replace", cwd=str(REPO_ROOT),+ check=False,)if result.returncode != 0:print(f" ✗ Could not start the release pipeline: {result.stderr.strip()}")@@ -110,6 +113,7 @@ def _default_branch(gh_repo: str | None) -> str | None:result = subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8",errors="replace", cwd=str(REPO_ROOT),+ check=False,)if result.returncode != 0:return None@@ -432,6 +436,7 @@ def _resume_canary(tag: str, remote: str, repository: str, *, notes_file: Path |view = subprocess.run(["gh", "release", "view", tag, "--repo", repository, "--json", "tagName,isDraft,isPrerelease,url"],cwd=REPO_ROOT, capture_output=True, text=True, encoding="utf-8",+ check=False,)# A draft is served at an untagged-* URL, never releases/tag/<tag>; gh's# answer is the only working link to it.@@ -444,6 +449,7 @@ def _resume_canary(tag: str, remote: str, repository: str, *, notes_file: Path |create.extend(["--notes-file", str(notes_file)] if notes_file else ["--generate-notes"])created = subprocess.run(create, cwd=REPO_ROOT, capture_output=True, text=True, encoding="utf-8",+ check=False,)if created.returncode != 0:raise ValueError(created.stderr.strip() or "Canary draft could not be recovered")@@ -597,6 +603,7 @@ def prune_old_canaries(args) -> None:result = subprocess.run(gh_cmd, capture_output=True, text=True, encoding="utf-8",errors="replace", cwd=str(REPO_ROOT),+ check=False,)if result.returncode == 0:print(f"✓ Deleted {tag}")diff --git a/scripts/releases/entrypoint.py b/scripts/releases/entrypoint.pyindex acb4a22e7b9..780c1e4f6c0 100644--- a/scripts/releases/entrypoint.py+++ b/scripts/releases/entrypoint.py@@ -69,13 +69,14 @@ def _require_remote_main(repo: Path, commit: str) -> None:result = subprocess.run(["git", "merge-base", "--is-ancestor", commit, "refs/remotes/hermes-release/main"],cwd=repo, capture_output=True,+ check=False,)if result.returncode != 0:raise ReleaseRefused(f"{commit} is not on origin/main")def _claim_collision(repo: Path, remote: str, tag: str, error: Exception) -> ReleaseRefused:- subprocess.run(["git", "tag", "--delete", tag], cwd=repo, capture_output=True)+ subprocess.run(["git", "tag", "--delete", tag], cwd=repo, capture_output=True, check=False)try:_git(repo, "fetch", remote, f"+refs/tags/{tag}:refs/tags/{tag}")details = _git(@@ -149,7 +150,7 @@ def _require_ancestry(repo: Path, commit: str, published_commit: str | None) ->if published_commit is None:returnancestor = subprocess.run(- ["git", "merge-base", "--is-ancestor", published_commit, commit], cwd=repo, capture_output=True)+ ["git", "merge-base", "--is-ancestor", published_commit, commit], cwd=repo, capture_output=True, check=False)if ancestor.returncode != 0:raise ReleaseRefused(f"{commit} does not descend from the published stable head {published_commit}")@@ -180,7 +181,7 @@ def _changelog(repo: Path, repository: str, *, commit: str, tag: str, version: sreceipt = f"v{published_version}"if base is None and subprocess.run(["git", "rev-parse", "--verify", "--quiet", f"refs/tags/{receipt}^{{commit}}"],- cwd=repo, capture_output=True).returncode == 0:+ cwd=repo, capture_output=True, check=False).returncode == 0:# Before the first publication the seed version's tag is the base.base = receiptcommits = release_script.get_commits(since_tag=base, until=commit, cwd=repo)@@ -495,7 +496,7 @@ def cmd_release(args) -> None:commit = _git(repo, "rev-parse", "--verify", f"{args.commit}^{{commit}}")def execute(command: list[str]) -> None:- completed = subprocess.run(command, cwd=repo, capture_output=True, text=True, encoding="utf-8")+ completed = subprocess.run(command, cwd=repo, capture_output=True, text=True, encoding="utf-8", check=False)if completed.returncode != 0:raise RuntimeError(completed.stderr.strip() or "release command failed")return completed.stdout@@ -535,13 +536,13 @@ def _command_repository(args) -> tuple[Path, str, str]:def _execute(repo: Path, command: list[str]) -> None:- completed = subprocess.run(command, cwd=repo, capture_output=True, text=True, encoding="utf-8")+ completed = subprocess.run(command, cwd=repo, capture_output=True, text=True, encoding="utf-8", check=False)if completed.returncode != 0:raise ReleaseRefused(completed.stderr.strip() or "release command failed")def _inspect(repo: Path, command: list[str]) -> str:- completed = subprocess.run(command, cwd=repo, capture_output=True, text=True, encoding="utf-8")+ completed = subprocess.run(command, cwd=repo, capture_output=True, text=True, encoding="utf-8", check=False)if completed.returncode != 0:raise ReleaseRefused(completed.stderr.strip() or "release inspection failed")return completed.stdoutdiff --git a/scripts/releases/store.py b/scripts/releases/store.pyindex 0e447fffd19..c4d7c3bbd9d 100644--- a/scripts/releases/store.py+++ b/scripts/releases/store.py@@ -91,7 +91,7 @@ class StoreError(RuntimeError):def _cli_run(argv: list[str]) -> str:- result = subprocess.run(argv, capture_output=True, text=True, encoding="utf-8", errors="replace")+ result = subprocess.run(argv, capture_output=True, text=True, encoding="utf-8", errors="replace", check=False)if result.returncode != 0:raise StoreError(f"{' '.join(argv)} failed: {result.stderr.strip()}")return result.stdoutdiff --git a/scripts/render-builds-table.py b/scripts/render-builds-table.pyindex d9b2c0d65b5..5a3f5c71887 100755--- a/scripts/render-builds-table.py+++ b/scripts/render-builds-table.py@@ -724,6 +724,7 @@ def main() -> int:["gh", "release", "view", args.tag, "--repo", args.repo,"--json", "body"],capture_output=True, text=True, encoding="utf-8", errors="replace",+ check=False,)if view.returncode != 0:print(f"::error::gh release view failed: {view.stderr.strip()}")@@ -746,6 +747,7 @@ def main() -> int:"--notes-file", "-"],input=new_body, capture_output=True, text=True, encoding="utf-8",errors="replace",+ check=False,)if edit.returncode != 0:print(f"::error::gh release edit failed: {edit.stderr.strip()}")diff --git a/scripts/run_tests_parallel.py b/scripts/run_tests_parallel.pyindex 047ead06d36..74fe89f0723 100644--- a/scripts/run_tests_parallel.py+++ b/scripts/run_tests_parallel.py@@ -440,6 +440,7 @@ def _kill_tree(proc: subprocess.Popen, pgid: int | None = None) -> None:stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL,timeout=10,+ check=False,) # windows-footgun: okexcept (subprocess.TimeoutExpired, FileNotFoundError, OSError):passdiff --git a/scripts/smoke_nemo_relay_shared_metrics.py b/scripts/smoke_nemo_relay_shared_metrics.pyindex 720b33c4c45..e70260a4bb6 100644--- a/scripts/smoke_nemo_relay_shared_metrics.py+++ b/scripts/smoke_nemo_relay_shared_metrics.py@@ -764,6 +764,7 @@ def main() -> int:text=True,capture_output=True,timeout=120,+ check=False,)finally:server.shutdown()@@ -848,6 +849,7 @@ def main() -> int:text=True,capture_output=True,timeout=60,+ check=False,)(root / "skills.stdout.txt").write_text(skill_result.stdout,diff --git a/scripts/termux/stage_apt_repo.py b/scripts/termux/stage_apt_repo.pyindex b9c4cb6c23d..79f71ae332b 100644--- a/scripts/termux/stage_apt_repo.py+++ b/scripts/termux/stage_apt_repo.py@@ -389,6 +389,7 @@ def _gpg_run(input=stdin,stdin=subprocess.DEVNULL if stdin is None else None,stdout=fo, stderr=fe, env=env,+ check=False,)result.stdout = out_path.read_bytes()result.stderr = err_path.read_bytes()diff --git a/scripts/termux/validate_installed.py b/scripts/termux/validate_installed.pyindex 7d6336e2718..efcdf1a6c1c 100644--- a/scripts/termux/validate_installed.py+++ b/scripts/termux/validate_installed.py@@ -13,7 +13,7 @@ import timedef run(argv: list[str], env: dict[str, str], cwd: Path) -> subprocess.CompletedProcess:- result = subprocess.run(argv, env=env, cwd=cwd, capture_output=True, text=True, encoding="utf-8", timeout=90)+ result = subprocess.run(argv, env=env, cwd=cwd, capture_output=True, text=True, encoding="utf-8", timeout=90, check=False)print("+", " ".join(argv), flush=True)print(result.stdout, result.stderr, flush=True)result.check_returncode()@@ -142,7 +142,7 @@ def main() -> None:"import pm; issues = pm.check(); ""assert not issues, issues; print('PM_RUNTIME_TOOLS_OK')",], env, home)- result = subprocess.run([str(launcher), "update"], env=env, cwd=home, capture_output=True, text=True, encoding="utf-8", timeout=60)+ result = subprocess.run([str(launcher), "update"], env=env, cwd=home, capture_output=True, text=True, encoding="utf-8", timeout=60, check=False)validate_update_refusal(root / "app", result)tui_smoke(launcher, env, home)print("INSTALLED_BUNDLE_VALIDATION_OK", flush=True)diff --git a/scripts/verify-bootstrap-version-stamp.py b/scripts/verify-bootstrap-version-stamp.pyindex dfb3b0010da..d1e7ab0f118 100644--- a/scripts/verify-bootstrap-version-stamp.py+++ b/scripts/verify-bootstrap-version-stamp.py@@ -80,7 +80,8 @@ def _fail(errors: list[str], message: str) -> None:def _git(repo: Path, *args: str) -> str | None:try:result = subprocess.run(- [_GIT, *args], cwd=str(repo), capture_output=True, text=True, timeout=15+ [_GIT, *args], cwd=str(repo), capture_output=True, text=True, timeout=15,+ check=False,)except (OSError, subprocess.SubprocessError):return Nonediff --git a/scripts/write_install_stamp.py b/scripts/write_install_stamp.pyindex 7aec97f129a..0a2745297bf 100644--- a/scripts/write_install_stamp.py+++ b/scripts/write_install_stamp.py@@ -66,7 +66,8 @@ FALLBACK_COMMIT = "0" * 40def _run_git(*args: str, cwd: str | Path = _REPO_ROOT) -> str | None:try:result = subprocess.run(- ["git", *args], capture_output=True, text=True, timeout=5, cwd=str(cwd)+ ["git", *args], capture_output=True, text=True, timeout=5, cwd=str(cwd),+ check=False,)except (OSError, subprocess.SubprocessError):return Nonediff --git a/skills/productivity/docx/tests/test_docx_skill.py b/skills/productivity/docx/tests/test_docx_skill.pyindex cb5c6aea82a..8476c4f502a 100644--- a/skills/productivity/docx/tests/test_docx_skill.py+++ b/skills/productivity/docx/tests/test_docx_skill.py@@ -43,7 +43,7 @@ def run(script: str, *args: str) -> dict:env["PYTHONIOENCODING"] = "utf-8"proc = subprocess.run([sys.executable, str(SCRIPTS / script), *map(str, args)],- capture_output=True, env=env)+ capture_output=True, env=env, check=False)assert proc.returncode == 0, proc.stderr.decode("utf-8", "replace")return json.loads(proc.stdout.decode("utf-8"))@@ -228,7 +228,7 @@ class TestTemplate:proc = subprocess.run([sys.executable, str(SCRIPTS / "docx_template.py"), str(tpl),str(values), str(workdir / "out2.docx"), "--strict"],- capture_output=True, env=env)+ capture_output=True, env=env, check=False)assert proc.returncode == 1payload = json.loads(proc.stdout.decode("utf-8"))assert payload["unfilled_tokens"] == ["gone"]@@ -247,7 +247,7 @@ def run_raw(script: str, *args: str):env = dict(os.environ, LC_ALL="C", PYTHONIOENCODING="utf-8")return subprocess.run([sys.executable, str(SCRIPTS / script), *map(str, args)],- capture_output=True, env=env)+ capture_output=True, env=env, check=False)def _add_ins(para, rev_id: int, text: str, author="Editor"):diff --git a/skills/productivity/google-workspace/scripts/google_api.py b/skills/productivity/google-workspace/scripts/google_api.pyindex 9d76a17f6da..c418491030b 100644--- a/skills/productivity/google-workspace/scripts/google_api.py+++ b/skills/productivity/google-workspace/scripts/google_api.py@@ -110,6 +110,7 @@ def _run_gws(parts: list[str], *, params: dict | None = None, body: dict | Nonecapture_output=True,text=True, encoding='utf-8', errors='replace',env=_gws_env(),+ check=False,)if result.returncode != 0:err = result.stderr.strip() or result.stdout.strip() or "Unknown gws error"diff --git a/skills/productivity/google-workspace/scripts/gws_bridge.py b/skills/productivity/google-workspace/scripts/gws_bridge.pyindex fa28bdb38cd..857dabd3efe 100755--- a/skills/productivity/google-workspace/scripts/gws_bridge.py+++ b/skills/productivity/google-workspace/scripts/gws_bridge.py@@ -110,7 +110,7 @@ def main():env = os.environ.copy()env["GOOGLE_WORKSPACE_CLI_TOKEN"] = access_token- result = subprocess.run(["gws"] + sys.argv[1:], env=env)+ result = subprocess.run(["gws"] + sys.argv[1:], env=env, check=False)sys.exit(result.returncode)diff --git a/skills/productivity/pdf/scripts/_raster.py b/skills/productivity/pdf/scripts/_raster.pyindex de5553198a7..a38c9b9aaad 100644--- a/skills/productivity/pdf/scripts/_raster.py+++ b/skills/productivity/pdf/scripts/_raster.py@@ -66,7 +66,7 @@ def _via_pdftoppm(pdf_path: str, page: int, dpi: int, password: str | None):if password:cmd += ["-upw", password]cmd += [pdf_path, prefix]- proc = subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8")+ proc = subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8", check=False)if proc.returncode != 0:raise ValueError(f"pdftoppm failed: {proc.stderr.strip()}")produced = sorted(Path(tmp).glob("page*.png"))diff --git a/skills/productivity/pdf/tests/test_pdf_skill.py b/skills/productivity/pdf/tests/test_pdf_skill.pyindex ecc24a68edf..aaff9f5c109 100644--- a/skills/productivity/pdf/tests/test_pdf_skill.py+++ b/skills/productivity/pdf/tests/test_pdf_skill.py@@ -17,6 +17,7 @@ def run(script: str, *args: str, expect: int = 0) -> subprocess.CompletedProcessproc = subprocess.run([sys.executable, str(SCRIPTS / script), *args],capture_output=True, text=True, encoding="utf-8", env=env,+ check=False,)assert proc.returncode == expect, f"{script} {args}: rc={proc.returncode}\n{proc.stderr}"return procdiff --git a/skills/productivity/powerpoint/scripts/pptx_render.py b/skills/productivity/powerpoint/scripts/pptx_render.pyindex 7d54aa02bc5..31956e3ce37 100644--- a/skills/productivity/powerpoint/scripts/pptx_render.py+++ b/skills/productivity/powerpoint/scripts/pptx_render.py@@ -50,7 +50,7 @@ def render(pptx_path, out_dir, prefix, dpi):[soffice, "--headless", "--convert-to", "pdf","--outdir", tmp, pptx_path],capture_output=True, text=True, encoding="utf-8",- errors="replace", timeout=300)+ errors="replace", timeout=300, check=False)pdfs = glob.glob(os.path.join(tmp, "*.pdf"))if proc.returncode != 0 or not pdfs:raise SystemExit(f"soffice PDF conversion failed: {proc.stderr}")@@ -59,7 +59,7 @@ def render(pptx_path, out_dir, prefix, dpi):proc = subprocess.run([splitter, "-png", "-r", str(dpi), pdf, out_prefix],capture_output=True, text=True, encoding="utf-8",- errors="replace", timeout=300)+ errors="replace", timeout=300, check=False)if proc.returncode != 0:raise SystemExit(f"{os.path.basename(splitter)} failed: "f"{proc.stderr}")diff --git a/skills/productivity/powerpoint/tests/test_powerpoint_skill.py b/skills/productivity/powerpoint/tests/test_powerpoint_skill.pyindex a5ccdfa6382..475d30cf742 100644--- a/skills/productivity/powerpoint/tests/test_powerpoint_skill.py+++ b/skills/productivity/powerpoint/tests/test_powerpoint_skill.py@@ -18,7 +18,7 @@ def run(script, *args):env = dict(os.environ, LC_ALL="C", PYTHONIOENCODING="utf-8")proc = subprocess.run([sys.executable, os.path.join(SCRIPTS, script), *args],- capture_output=True, text=True, encoding="utf-8", env=env)+ capture_output=True, text=True, encoding="utf-8", env=env, check=False)assert proc.returncode == 0, f"{script} failed: {proc.stderr}"return json.loads(proc.stdout)@@ -253,7 +253,7 @@ def test_help_flags():"pptx_from_template.py"):proc = subprocess.run([sys.executable, os.path.join(SCRIPTS, script), "--help"],- capture_output=True, text=True, encoding="utf-8")+ capture_output=True, text=True, encoding="utf-8", check=False)assert proc.returncode == 0 and "usage" in proc.stdout.lower()@@ -266,7 +266,7 @@ def run_raw(script, *args):env = dict(os.environ, LC_ALL="C", PYTHONIOENCODING="utf-8")return subprocess.run([sys.executable, os.path.join(SCRIPTS, script), *args],- capture_output=True, text=True, encoding="utf-8", env=env)+ capture_output=True, text=True, encoding="utf-8", env=env, check=False)def test_render_all_slides(workdir):diff --git a/skills/productivity/xlsx/scripts/xlsx_recalc.py b/skills/productivity/xlsx/scripts/xlsx_recalc.pyindex f01d092e924..2e55bffb3f1 100644--- a/skills/productivity/xlsx/scripts/xlsx_recalc.py+++ b/skills/productivity/xlsx/scripts/xlsx_recalc.py@@ -84,7 +84,7 @@ def main(argv=None):capture_output=True, text=True, encoding="utf-8",timeout=args.timeout,env={"HOME": tmp, "PATH": Path(soffice).parent.as_posix()- + ":/usr/bin:/bin"})+ + ":/usr/bin:/bin"}, check=False)produced = Path(tmp) / (src.stem + ".xlsx")if proc.returncode != 0 or not produced.exists():print(json.dumps({"ok": False,diff --git a/skills/productivity/xlsx/tests/test_xlsx_skill.py b/skills/productivity/xlsx/tests/test_xlsx_skill.pyindex ad9242dc233..284198d8066 100644--- a/skills/productivity/xlsx/tests/test_xlsx_skill.py+++ b/skills/productivity/xlsx/tests/test_xlsx_skill.py@@ -25,7 +25,7 @@ def run(script, *args, expect_ok=True):env.pop("PYTHONIOENCODING", None)proc = subprocess.run([sys.executable, str(SCRIPTS / script), *map(str, args)],- capture_output=True, text=True, env=env, encoding="utf-8")+ capture_output=True, text=True, env=env, encoding="utf-8", check=False)if expect_ok:assert proc.returncode == 0, f"{script} failed: {proc.stderr}"return proc@@ -521,7 +521,7 @@ def test_recalc_reports_json_both_ways(tmp_path):env = dict(os.environ, LC_ALL="C", LANG="C", PATH=str(tmp_path))proc = subprocess.run([sys.executable, str(SCRIPTS / "xlsx_recalc.py"), str(book)],- capture_output=True, text=True, env=env, encoding="utf-8")+ capture_output=True, text=True, env=env, encoding="utf-8", check=False)assert proc.returncode == 0absent = json.loads(proc.stdout)assert absent["recalculated"] is False and "soffice" in absent["reason"]diff --git a/tests/agent/lsp/test_workspace_release.py b/tests/agent/lsp/test_workspace_release.pyindex 8b3ff02f00a..80a0e0d350e 100644--- a/tests/agent/lsp/test_workspace_release.py+++ b/tests/agent/lsp/test_workspace_release.py@@ -22,7 +22,7 @@ MOCK_SERVER = str(Path(__file__).parent / "_mock_lsp_server.py")def _git(*args: str, cwd: Path) -> str:res = subprocess.run(["git", *args], cwd=str(cwd), capture_output=True, text=True, encoding="utf-8",- errors="replace", timeout=60)+ errors="replace", timeout=60, check=False)assert res.returncode == 0, f"git {' '.join(args)} failed: {res.stderr}"return res.stdout.strip()diff --git a/tests/agent/test_anthropic_spent_rotation_verdict.py b/tests/agent/test_anthropic_spent_rotation_verdict.pyindex 5fed1915fba..88af7c499ff 100644--- a/tests/agent/test_anthropic_spent_rotation_verdict.py+++ b/tests/agent/test_anthropic_spent_rotation_verdict.py@@ -332,6 +332,7 @@ def test_second_process_adopts_the_terminal_verdict(timeout=60,env=env,stdin=subprocess.DEVNULL,+ check=False,)assert proc.returncode == 0, f"witness failed:\n{proc.stdout}\n{proc.stderr}"verdict = json.loads(proc.stdout.strip().splitlines()[-1])diff --git a/tests/agent/test_deadline_fork_race.py b/tests/agent/test_deadline_fork_race.pyindex 72c79b8b7f9..dad679eda6e 100644--- a/tests/agent/test_deadline_fork_race.py+++ b/tests/agent/test_deadline_fork_race.py@@ -16,6 +16,7 @@ def test_cron_timeout_closes_the_descendant_snapshot_fork_window(tmp_path):[sys.executable, str(probe)],env={**os.environ, "HOME": str(tmp_path), "HERMES_HOME": str(tmp_path)},stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=35,+ check=False,)assert result.returncode == 0, result.stdout + result.stderrdiff --git a/tests/agent/test_iron_proxy_e2e.py b/tests/agent/test_iron_proxy_e2e.pyindex 82043849776..a4b5c3b7d1b 100644--- a/tests/agent/test_iron_proxy_e2e.py+++ b/tests/agent/test_iron_proxy_e2e.py@@ -147,6 +147,7 @@ def test_iron_proxy_swaps_authorization_header_end_to_end(hermes_home, monkeypat],capture_output=True,text=True,+ check=False,)assert result.returncode == 0, f"curl failed: {result.stderr}"# Some iron-proxy versions return 200 with no body; only the swap matters.@@ -254,6 +255,7 @@ def test_iron_proxy_swaps_x_api_key_header_end_to_end(hermes_home, monkeypatch):],capture_output=True,text=True,+ check=False,)assert result.returncode == 0, f"curl failed: {result.stderr}"captured = _CaptureXApiKeyHandler.captured_key@@ -353,6 +355,7 @@ def test_iron_proxy_management_reload_end_to_end(hermes_home, monkeypatch):f"http://127.0.0.1:{upstream_port}/",],capture_output=True, text=True,+ check=False,)assert result.returncode == 0, f"curl failed: {result.stderr}"captured = _CaptureHandler.captured_authdiff --git a/tests/agent/test_live_db_preview_locks.py b/tests/agent/test_live_db_preview_locks.pyindex 8d1a6e121ec..3290a9439ec 100644--- a/tests/agent/test_live_db_preview_locks.py+++ b/tests/agent/test_live_db_preview_locks.py@@ -48,7 +48,7 @@ def test_preview_preserves_live_database_locks(tmp_path, route, target_kind):code = ("import sqlite3,sys; c=sqlite3.connect(sys.argv[1], timeout=0); ""c.execute('BEGIN IMMEDIATE'); c.rollback(); c.close()")result = subprocess.run([sys.executable, "-c", code, str(path)],- capture_output=True, text=True, timeout=10)+ capture_output=True, text=True, timeout=10, check=False)return result.returncode != 0 and "database is locked" in result.stderrbefore = (own_posix_locks(path), own_posix_locks(shm))@@ -86,7 +86,7 @@ def test_preview_preserves_live_database_locks(tmp_path, route, target_kind):"c.commit(); c.close()")rival = subprocess.run([sys.executable, "-c", code, str(path)],- capture_output=True, text=True, timeout=10)+ capture_output=True, text=True, timeout=10, check=False)assert rival.returncode == 0, rival.stderrassert [row[0] for row in conn.execute("SELECT value FROM preview_markers ORDER BY rowid"diff --git a/tests/agent/test_outbound_webhooks.py b/tests/agent/test_outbound_webhooks.pyindex 2237ed8f815..f2af05ce31d 100644--- a/tests/agent/test_outbound_webhooks.py+++ b/tests/agent/test_outbound_webhooks.py@@ -595,6 +595,7 @@ class TestDelivery:)proc = subprocess.run([_sys.executable, str(script)], capture_output=True, timeout=30,+ check=False,)assert proc.returncode == 0, proc.stderr.decode()deadline = time.monotonic() + 5diff --git a/tests/agent/test_relay_session_segments.py b/tests/agent/test_relay_session_segments.pyindex 9be1b076120..55aac6cbfb8 100644--- a/tests/agent/test_relay_session_segments.py+++ b/tests/agent/test_relay_session_segments.py@@ -43,6 +43,7 @@ def _run_isolated(code: str) -> subprocess.CompletedProcess[str]:cwd=str(repo_root),env={**os.environ, "PYTHONDONTWRITEBYTECODE": "1"},timeout=30,+ check=False,)diff --git a/tests/agent/test_ssl_verify.py b/tests/agent/test_ssl_verify.pyindex 0079c88f986..07b571346f3 100644--- a/tests/agent/test_ssl_verify.py+++ b/tests/agent/test_ssl_verify.py@@ -85,7 +85,7 @@ import httpxwith httpx.Client(verify=resolve_httpx_verify()) as client:ctx = client._transport._pool._ssl_contextassert ctx.verify_mode == ssl.CERT_REQUIRED and ctx.check_hostname-"""], capture_output=True, text=True, timeout=30)+"""], capture_output=True, text=True, timeout=30, check=False)assert child.returncode == 0, child.stderrassert "truststore unavailable" in child.stderr@@ -184,5 +184,5 @@ ctx = resolve_httpx_verify(ca_bundle=certifi.where())assert isinstance(ctx, ssl.SSLContext), ctxassert ctx.verify_mode == ssl.CERT_REQUIRED and ctx.check_hostnameassert ctx.cert_store_stats()['x509_ca'] > 0-"""], capture_output=True, text=True, timeout=30)+"""], capture_output=True, text=True, timeout=30, check=False)assert child.returncode == 0, child.stderrdiff --git a/tests/ci/test_channel_build_publication.py b/tests/ci/test_channel_build_publication.pyindex b176ba0c717..7c7a98c7a85 100644--- a/tests/ci/test_channel_build_publication.py+++ b/tests/ci/test_channel_build_publication.py@@ -199,7 +199,7 @@ def run_shell(tmp_path, r2_server, script, env, *, cwd=None):gh.chmod(0o755)return subprocess.run(["bash", "-e", "-o", "pipefail", "-c", script], cwd=cwd or tmp_path,env={**os.environ, **env, "PATH": str(tools) + os.pathsep + os.environ["PATH"]},- capture_output=True, text=True, encoding="utf-8", timeout=60)+ capture_output=True, text=True, encoding="utf-8", timeout=60, check=False)@pytest.mark.platforms("posix")diff --git a/tests/ci/test_commit_build_staging.py b/tests/ci/test_commit_build_staging.pyindex 83e2b4d7eb3..a68b619074b 100644--- a/tests/ci/test_commit_build_staging.py+++ b/tests/ci/test_commit_build_staging.py@@ -59,7 +59,7 @@ def shell_step(tmp_path, r2_server, job, name, env, *, script=None):environment = _child_env(**env)environment['PATH'] = str(helper) + os.pathsep + environment['PATH']return subprocess.run([_BASH, '-e', '-o', 'pipefail', str(script_file)], cwd=tmp_path,- env=environment, capture_output=True, text=True, encoding='utf-8', timeout=60)+ env=environment, capture_output=True, text=True, encoding='utf-8', timeout=60, check=False)@pytest.mark.parametrize("has_download", [True, False])diff --git a/tests/ci/test_desktop_release_commit_admission.py b/tests/ci/test_desktop_release_commit_admission.pyindex 19f740f331e..0e83adcadd8 100644--- a/tests/ci/test_desktop_release_commit_admission.py+++ b/tests/ci/test_desktop_release_commit_admission.py@@ -41,7 +41,7 @@ def run_admission(clone, env):script.write_text(_admission_script(), encoding='utf-8', newline='\n')return subprocess.run([_BASH, '-e', '-o', 'pipefail', str(script)], cwd=clone,env={**env, 'PATH': str(helper) + os.pathsep + env['PATH']},- capture_output=True, text=True, encoding='utf-8', timeout=60)+ capture_output=True, text=True, encoding='utf-8', timeout=60, check=False)def test_mixed_dispatch_is_refused_before_loading_repository_code(tmp_path):diff --git a/tests/ci/test_desktop_release_tag_admission.py b/tests/ci/test_desktop_release_tag_admission.pyindex 22cf1b88dac..38bcc5992de 100644--- a/tests/ci/test_desktop_release_tag_admission.py+++ b/tests/ci/test_desktop_release_tag_admission.py@@ -191,6 +191,7 @@ def _run_admission(clone: Path, tag: str, claim_tag: str) -> subprocess.Completecapture_output=True,text=True,timeout=120,+ check=False,)@@ -280,7 +281,7 @@ def test_downloadable_native_builds_refuse_to_ship_unsigned(tmp_path: Path):env.update({name: "" for name in names})env.update(values)return subprocess.run(["bash", "-euo", "pipefail", "-c", step["run"]], env=env,- capture_output=True, text=True, timeout=60)+ capture_output=True, text=True, timeout=60, check=False)proc = run()assert proc.returncode != 0 and "::error::" in proc.stdout and "AZURE_SIGN_ENDPOINT" in proc.stdoutdiff --git a/tests/ci/test_desktop_store_eligibility.py b/tests/ci/test_desktop_store_eligibility.pyindex e371c1321d1..0b3daeaab41 100644--- a/tests/ci/test_desktop_store_eligibility.py+++ b/tests/ci/test_desktop_store_eligibility.py@@ -39,7 +39,7 @@ def test_bundle_only_requests_store_for_stable(tmp_path, tag, commit, store):script = next(step['run'] for step in job['steps']if step.get('name') == 'Assemble the signed MSIX bundle without publishing')result = subprocess.run([_BASH, '-e', '-o', 'pipefail', '-c', script], env=env, cwd=tmp_path,- capture_output=True, text=True, timeout=15)+ capture_output=True, text=True, timeout=15, check=False)assert result.returncode == 0, result.stdout + result.stderrcalls = [json.loads(line) for line in log.read_text(encoding='utf-8-sig').splitlines()]assert calls[0][:1] == ['scripts/stage-msixbundle.mjs']@@ -89,6 +89,7 @@ def test_native_windows_build_selects_store_only_for_stable(tmp_path):result = subprocess.run([powershell, '-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Bypass', '-File', str(wrapper)],env=_child_env(RUNNER_TEMP=str(tmp_path)), capture_output=True, text=True,+ check=False,)assert result.returncode == 0, result.stdout + result.stderrfor index, (_, _, store, _) in enumerate(cases):diff --git a/tests/ci/test_list_os_marked_tests.py b/tests/ci/test_list_os_marked_tests.pyindex e85de64eae0..e268689fa12 100644--- a/tests/ci/test_list_os_marked_tests.py+++ b/tests/ci/test_list_os_marked_tests.py@@ -25,6 +25,7 @@ def _run(*args: str) -> subprocess.CompletedProcess:text=True,timeout=120,cwd=REPO_ROOT,+ check=False,)diff --git a/tests/ci/test_pending_fixes_strict.py b/tests/ci/test_pending_fixes_strict.pyindex 003d5ce7ab1..b3f482d4438 100644--- a/tests/ci/test_pending_fixes_strict.py+++ b/tests/ci/test_pending_fixes_strict.py@@ -57,7 +57,7 @@ def _run(tmp_path: Path, strict: str | None) -> dict[str, str]:proc = subprocess.run([sys.executable, "-m", "pytest", str(cell), "-rA", "-q", "-p", "no:cacheprovider","-p", "no:randomly", "-o", "addopts=", "--rootdir", str(tmp_path)],- cwd=tmp_path, env=env, capture_output=True, text=True, timeout=120)+ cwd=tmp_path, env=env, capture_output=True, text=True, timeout=120, check=False)if strict and strict not in ("0",):assert "known gap is not excused" not in proc.stdout or f"HERMES_E2E_STRICT_ACCEPTANCE={strict.strip()}:" in proc.stdoutoutcomes = {}diff --git a/tests/ci/test_plugin_catalog_ci_confinement.py b/tests/ci/test_plugin_catalog_ci_confinement.pyindex 568c3898bac..87e573c08eb 100644--- a/tests/ci/test_plugin_catalog_ci_confinement.py+++ b/tests/ci/test_plugin_catalog_ci_confinement.py@@ -54,7 +54,7 @@ def _run(script_text: str, tmp_path: Path, cwd: Path, env: dict) -> subprocess.Cscript.write_text(script_text, encoding="utf-8")return subprocess.run(["bash", str(script)], env=env, cwd=cwd,- stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=120)+ stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=120, check=False)# ── pinned-source step ────────────────────────────────────────────────────────@@ -243,7 +243,7 @@ def test_structural_and_pinned_gates_agree(tmp_path, origin, mut):entry.write_text(yaml.safe_dump(data), encoding="utf-8")structural = subprocess.run([sys.executable, str(ROOT / "scripts/validate_plugin_catalog.py"), str(entry)],- capture_output=True, text=True)+ capture_output=True, text=True, check=False)gate = _gate(tmp_path, origin, [entry])assert (structural.returncode == 0) == (gate.returncode == 0), (f"{structural.stdout}{structural.stderr}\n{gate.stdout}{gate.stderr}")diff --git a/tests/ci/test_protected_canary_publication.py b/tests/ci/test_protected_canary_publication.pyindex 86bb5542a43..dec2350d74f 100644--- a/tests/ci/test_protected_canary_publication.py+++ b/tests/ci/test_protected_canary_publication.py@@ -111,7 +111,7 @@ def canary(tmp_path, r2_server, monkeypatch):def run(script, **overrides):return subprocess.run(["bash", "-e", "-o", "pipefail", "-c", script], cwd=clone,- env={**env, **overrides}, capture_output=True, text=True, timeout=60)+ env={**env, **overrides}, capture_output=True, text=True, timeout=60, check=False)return clone, identity, env, rundiff --git a/tests/ci/test_required_results.py b/tests/ci/test_required_results.pyindex 14a59c6375d..da052d57ebd 100644--- a/tests/ci/test_required_results.py+++ b/tests/ci/test_required_results.py@@ -85,6 +85,7 @@ def test_cli_stdin_exit_codes_and_output(tmp_path, release, results, code, repor[sys.executable, str(SCRIPT), *(["--release"] if release else [])],input=json.dumps(needs), capture_output=True, text=True, timeout=30,env={**os.environ, "GITHUB_OUTPUT": str(output)},+ check=False,)assert child.returncode == code, child.stderrassert report in child.stdoutdiff --git a/tests/ci/test_stable_release_graph.py b/tests/ci/test_stable_release_graph.pyindex 86bd0206cf1..a8ec4b82aee 100644--- a/tests/ci/test_stable_release_graph.py+++ b/tests/ci/test_stable_release_graph.py@@ -336,6 +336,7 @@ def test_docker_recovery_refuses_to_replace_a_divergent_version_tag(tmp_path):"IMAGE_NAME": "owner/repo", "RELEASE_TAG": "0.21.5","CREATE_MARKER": str(marker)},capture_output=True, text=True, encoding="utf-8",+ check=False,)assert result.returncode != 0assert "versioned Docker manifest differs" in result.stderrdiff --git a/tests/ci/test_update_ci_routing.py b/tests/ci/test_update_ci_routing.pyindex 0ef0ad6e26b..4f98d2f496a 100644--- a/tests/ci/test_update_ci_routing.py+++ b/tests/ci/test_update_ci_routing.py@@ -415,7 +415,7 @@ def test_marker_corpus_change_runs_every_language_that_reads_it():def _tracked_mentions(name: str) -> list[str]:try:out = subprocess.run(["git", "-C", str(_REPO), "grep", "-l", "-F", name, "--", "."],- capture_output=True, text=True, timeout=60)+ capture_output=True, text=True, timeout=60, check=False)except OSError:pytest.skip("git unavailable: cannot list the fixture's consumers")if out.returncode not in (0, 1):@@ -574,7 +574,7 @@ def test_replay_python3_is_the_replay_interpreter_when_its_dir_has_only_python(t"print(json.dumps([sys.executable, workflow_steps.outputs(json.loads(sys.argv[1]), {})]))")env = {**os.environ, "PYTHONPATH": str(_REPO)}result = subprocess.run([str(interpreter), "-c", probe, json.dumps(_PROBE_STEP)], cwd=_REPO, env=env,- capture_output=True, text=True, timeout=60)+ capture_output=True, text=True, timeout=60, check=False)assert result.returncode == 0, result.stderrreplay_python, out = json.loads(result.stdout)assert out["py3"] == replay_pythondiff --git a/tests/ci/workflow_steps.py b/tests/ci/workflow_steps.pyindex 50d469c6796..9b1d34d5875 100644--- a/tests/ci/workflow_steps.py+++ b/tests/ci/workflow_steps.py@@ -87,6 +87,7 @@ def _run(step: dict, ctx: dict, cwd: Path | None = None, *, receipt: bool = Fals[bash, "--noprofile", "--norc", "-eo", "pipefail", str(script)],cwd=cwd or root, env=env, stdin=subprocess.DEVNULL,stdout=out_f, stderr=err_f, timeout=30,+ check=False,).returncodeexcept subprocess.TimeoutExpired:returncode = Nonediff --git a/tests/cron/test_cron_execution_identity.py b/tests/cron/test_cron_execution_identity.pyindex a2082f6322d..9695f45c65e 100644--- a/tests/cron/test_cron_execution_identity.py+++ b/tests/cron/test_cron_execution_identity.py@@ -63,7 +63,7 @@ def test_tool_hook_in_a_ticked_job_sees_its_execution_and_none_outside(tmp_path)and not k.endswith(("_API_KEY", "_TOKEN"))}env.update(HERMES_HOME=str(home), PYTHONPATH=str(Path(__file__).resolve().parents[2]))result = subprocess.run([sys.executable, "-c", _TICK], env=env, stdin=subprocess.DEVNULL,- capture_output=True, text=True, timeout=180)+ capture_output=True, text=True, timeout=180, check=False)assert result.returncode == 0, result.stdout + result.stderrreport = json.loads(result.stdout.strip().splitlines()[-1])seen = json.loads((home / "seen.json").read_text())diff --git a/tests/cron/test_cron_script.py b/tests/cron/test_cron_script.pyindex 76456f93b48..4c1c3dbf5a3 100644--- a/tests/cron/test_cron_script.py+++ b/tests/cron/test_cron_script.py@@ -289,7 +289,7 @@ class TestRunJobScript:)# Run the bootstrap with the current interpreter (stands in for the# base python.exe on Windows; the semantics are interpreter-agnostic).- result = subprocess.run(argv, capture_output=True, text=True)+ result = subprocess.run(argv, capture_output=True, text=True, check=False)assert result.returncode == 0, result.stderrassert result.stdout.strip() == "42"@@ -316,7 +316,7 @@ class TestRunJobScript:argv = _windows_cron_bootstrap_argv(sys.executable, {"VIRTUAL_ENV": str(venv)}, str(script))- result = subprocess.run(argv, capture_output=True, text=True)+ result = subprocess.run(argv, capture_output=True, text=True, check=False)assert result.returncode == 0, result.stderrassert result.stdout.strip() == "sibling ok"diff --git a/tests/cron/test_delivery_queue_retention_race.py b/tests/cron/test_delivery_queue_retention_race.pyindex c1ff0283977..9fae34f77b9 100644--- a/tests/cron/test_delivery_queue_retention_race.py+++ b/tests/cron/test_delivery_queue_retention_race.py@@ -38,6 +38,7 @@ except sqlite3.OperationalError as exc:raisesys.exit(75)""", str(db)], capture_output=True, text=True, timeout=30,+check=False,)assert result.returncode in (0, 75), result.stderrprunes.append(result.returncode)diff --git a/tests/cron/test_missed_window_catchup.py b/tests/cron/test_missed_window_catchup.pyindex dfc063d71bc..fb240429027 100644--- a/tests/cron/test_missed_window_catchup.py+++ b/tests/cron/test_missed_window_catchup.py@@ -72,7 +72,7 @@ def slot_env(tmp_path, monkeypatch):"""Process 1: its tick advances the schedule, then it dies before any fire claim."""env = dict(os.environ, HERMES_HOME=str(home))proc = subprocess.run([sys.executable, "-c", _CRASH_BEFORE_DISPATCH, str(REPO)],- env=env, cwd=str(REPO), capture_output=True, text=True, timeout=120)+ env=env, cwd=str(REPO), capture_output=True, text=True, timeout=120, check=False)assert proc.returncode == 137, proc.stderr[-2000:]yield {"job_id": job["id"], "slot": slot, "fires": fires, "crash": crash_before_dispatch,diff --git a/tests/cron/test_restart_safe_worker.py b/tests/cron/test_restart_safe_worker.pyindex 583315de910..e6090ea6b34 100644--- a/tests/cron/test_restart_safe_worker.py+++ b/tests/cron/test_restart_safe_worker.py@@ -771,6 +771,7 @@ def test_marked_worker_boots_dependencies_before_cron_jobs(marked):child = subprocess.run([sys.executable, "-c", _BOOT_ORDER_PROBE, worker_bootstrap.WORKER_MARKER],cwd=repo_root, env=env, capture_output=True, text=True, timeout=60,+ check=False,)assert child.returncode == 0, child.stderrresult = json.loads(child.stdout.strip().splitlines()[-1])@@ -832,6 +833,7 @@ def test_relaunch_replays_the_worker_before_its_ack(tmp_path, cause):[sys.executable, "-c", _RELAUNCH_PROBE, str(payload), str(ack), str(record),worker_bootstrap.WORKER_MARKER, cause],cwd=repo_root, env=env, capture_output=True, text=True, timeout=120,+ check=False,)assert record.exists(), f"worker never relaunched (exit {child.returncode}): {child.stderr}"seen = json.loads(record.read_text())diff --git a/tests/cron/test_scheduled_occurrence.py b/tests/cron/test_scheduled_occurrence.pyindex c350b46f5d4..743d5c506ee 100644--- a/tests/cron/test_scheduled_occurrence.py+++ b/tests/cron/test_scheduled_occurrence.py@@ -49,7 +49,7 @@ def _fire(home, mode):env['HERMES_HOME'] = str(home)env['PYTHONPATH'] = str(Path(__file__).resolve().parents[2])result = subprocess.run([sys.executable, '-c', _FIRE, mode], env=env,- stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=90)+ stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=90, check=False)assert result.returncode == 0, result.stdout + result.stderrdiff --git a/tests/cron/test_worktree_maintenance_isolation.py b/tests/cron/test_worktree_maintenance_isolation.pyindex a2b545358c0..22b8669ebfd 100644--- a/tests/cron/test_worktree_maintenance_isolation.py+++ b/tests/cron/test_worktree_maintenance_isolation.py@@ -45,5 +45,5 @@ assert not errors, errorsassert os.environ['TERMINAL_CWD'] == before"""result = subprocess.run([sys.executable, "-c", script, str(repo)], env=env,- cwd=tmp_path, capture_output=True, text=True, timeout=45)+ cwd=tmp_path, capture_output=True, text=True, timeout=45, check=False)assert result.returncode == 0, result.stdout + result.stderrdiff --git a/tests/desktop/test_appinstaller_check_script.py b/tests/desktop/test_appinstaller_check_script.pyindex 042fe408d0a..07e3f866f4f 100644--- a/tests/desktop/test_appinstaller_check_script.py+++ b/tests/desktop/test_appinstaller_check_script.py@@ -91,7 +91,7 @@ def test_script_import_failure_json_and_exit(tmp_path):(tmp_path / "winrt.py").write_text("raise ImportError('fixture unavailable')", encoding="utf-8")child = subprocess.run([HERMES_PYTHON, "-P", "-m", MODULE], capture_output=True,text=True, timeout=30,- env={**os.environ, "PYTHONPATH": os.pathsep.join([str(REPO), str(tmp_path)])})+ env={**os.environ, "PYTHONPATH": os.pathsep.join([str(REPO), str(tmp_path)])}, check=False)assert child.returncode == 1, child.stderrpayload = json.loads(child.stdout)assert payload["available"] is None@@ -113,6 +113,7 @@ def test_installed_winrt_projects_checker_uri_and_async_types(tmp_path):"_load_projection(); ""print('WINRT_CHECKER_TYPES_OK')"],cwd=tmp_path, capture_output=True, text=True, timeout=30,+ check=False,)assert probe.returncode == 0, probe.stderrassert probe.stdout.strip() == "WINRT_CHECKER_TYPES_OK"diff --git a/tests/desktop/test_check_store_update.py b/tests/desktop/test_check_store_update.pyindex bbfbdac80d0..e6011c9402c 100644--- a/tests/desktop/test_check_store_update.py+++ b/tests/desktop/test_check_store_update.py@@ -97,7 +97,7 @@ def test_native_projection_has_required_update_contract(tmp_path):"del c; uninit_apartment(); print('store projection ready')")result = subprocess.run([sys.executable, "-I", "-c", code], cwd=tmp_path,- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stderrassert result.stdout.strip() == "store projection ready"@@ -108,7 +108,7 @@ def test_entry_reports_json_when_the_projection_is_unavailable(tmp_path):(tmp_path / "winrt.py").write_text("raise ImportError('fixture unavailable')", encoding="utf-8")child = subprocess.run([sys.executable, "-P", "-m", MODULE, "--mode", "check"], capture_output=True,text=True, timeout=30,- env={**os.environ, "PYTHONPATH": os.pathsep.join([str(REPO), str(tmp_path)])})+ env={**os.environ, "PYTHONPATH": os.pathsep.join([str(REPO), str(tmp_path)])}, check=False)assert child.returncode == 1, child.stderrpayload = json.loads(child.stdout)assert payload["ok"] is False and payload["available"] is Nonediff --git a/tests/docker/conftest.py b/tests/docker/conftest.pyindex 77f8e753c5c..6597c068121 100644--- a/tests/docker/conftest.py+++ b/tests/docker/conftest.py@@ -29,6 +29,7 @@ def _docker_available() -> bool:try:r = subprocess.run(["docker", "info"], capture_output=True, timeout=5,+ check=False,)return r.returncode == 0except (subprocess.TimeoutExpired, OSError):@@ -63,6 +64,7 @@ def built_image() -> str:result = subprocess.run(["docker", "build", "-t", IMAGE_TAG, repo_root],capture_output=True, text=True, timeout=1200,+ check=False,)assert result.returncode == 0, (f"docker build failed:\n{result.stderr[-2000:]}"@@ -79,6 +81,7 @@ def container_name(request) -> Iterator[str]:subprocess.run(["docker", "rm", "-f", name],capture_output=True, timeout=10,+ check=False,)@@ -119,6 +122,7 @@ def docker_exec(cmd = ["docker", "exec", "-u", user, *extra_docker_args, container, *args]return subprocess.run(cmd, capture_output=True, text=True, timeout=timeout,+ check=False,)@@ -305,6 +309,7 @@ def wait_for_docker_logs(r = subprocess.run(["docker", "logs", container],capture_output=True, text=True, timeout=10,+ check=False,)last = r.stdout + r.stderrif needle in last:diff --git a/tests/docker/test_container_restart.py b/tests/docker/test_container_restart.pyindex dd38bba8f67..8437b826c25 100644--- a/tests/docker/test_container_restart.py+++ b/tests/docker/test_container_restart.py@@ -24,10 +24,11 @@ from tests.docker.conftest import docker_exec, docker_exec_sh, wait_for_path, wadef _docker(*args: str, **kw) -> subprocess.CompletedProcess[str]:- return subprocess.run(+ return subprocess.run( # noqa: PLW1510 -- forwarding wrapper: callers pass subprocess kwargs via **kwargs (check may arrive through it); an explicit check=False would raise TypeError["docker", *args],capture_output=True, text=True, timeout=kw.pop("timeout", 60),**kw,+)diff --git a/tests/docker/test_docker_exec_privilege_drop.py b/tests/docker/test_docker_exec_privilege_drop.pyindex 44fac426147..501e64770f6 100644--- a/tests/docker/test_docker_exec_privilege_drop.py+++ b/tests/docker/test_docker_exec_privilege_drop.py@@ -68,6 +68,7 @@ def _wait_for_cont_init(container: str) -> None:["docker", "exec", container,"cat", "/opt/data/logs/container-boot.log"],capture_output=True, text=True, timeout=5,+ check=False,)if r.returncode == 0:last = r.stdout@@ -91,6 +92,7 @@ def sleep_container(built_image: str, container_name: str) -> Iterator[str]:["docker", "run", "-d", "--name", container_name, built_image,"sleep", "infinity"],capture_output=True, text=True, timeout=30,+ check=False,)assert r.returncode == 0, f"docker run failed: {r.stderr}"try:@@ -130,6 +132,7 @@ def test_shim_drops_root_to_hermes_uid(sleep_container: str) -> None:["docker", "exec", sleep_container,"hermes", "config", "set", "_test.shim_marker", "1"],capture_output=True, text=True, timeout=30,+ check=False,)assert r.returncode == 0, f"config set failed: stdout={r.stdout!r} stderr={r.stderr!r}"@@ -138,6 +141,7 @@ def test_shim_drops_root_to_hermes_uid(sleep_container: str) -> None:["docker", "exec", sleep_container,"stat", "-c", "%U:%G", "/opt/data/config.yaml"],capture_output=True, text=True, timeout=10,+ check=False,)assert r.returncode == 0, f"stat failed: {r.stderr}"assert r.stdout.strip() == "hermes:hermes", (@@ -186,6 +190,7 @@ def test_e2e_login_then_supervised_gateway_can_read_auth(["docker", "exec", sleep_container,"hermes", "config", "set", "_test.e2e_marker", "1"],capture_output=True, text=True, timeout=30,+ check=False,)assert r.returncode == 0, f"config set failed: {r.stderr}"@@ -196,6 +201,7 @@ def test_e2e_login_then_supervised_gateway_can_read_auth("find", "/opt/data", "-maxdepth", "2", "-type", "f","!", "-readable", "-print"],capture_output=True, text=True, timeout=15,+ check=False,)assert r.returncode == 0, f"find failed: {r.stderr}"unreadable = [ln for ln in r.stdout.splitlines() if ln.strip()]diff --git a/tests/docker/test_dump_build_sha.py b/tests/docker/test_dump_build_sha.pyindex 9932e839509..8f3e7d5c8d4 100644--- a/tests/docker/test_dump_build_sha.py+++ b/tests/docker/test_dump_build_sha.py@@ -45,6 +45,7 @@ def _run_dump(image: str) -> str:r = subprocess.run(["docker", "run", "--rm", image, "dump"],capture_output=True, text=True, timeout=120,+ check=False,)assert r.returncode == 0, (f"hermes dump exited {r.returncode}: "@@ -61,6 +62,7 @@ def _read_stamp_commit_from_image(image: str) -> str | None:"/opt/hermes/install-stamp.json",],capture_output=True, text=True, timeout=30,+ check=False,)if r.returncode != 0:return Nonediff --git a/tests/docker/test_gateway_bootstrap_state.py b/tests/docker/test_gateway_bootstrap_state.pyindex d8ddf680287..8e79c1dc521 100644--- a/tests/docker/test_gateway_bootstrap_state.py+++ b/tests/docker/test_gateway_bootstrap_state.py@@ -103,6 +103,7 @@ def test_non_running_value_ignored(subprocess.run(["docker", "rm", "-f", name],capture_output=True, timeout=10,+ check=False,)@@ -130,6 +131,7 @@ def _cleanup_bind_mount(built_image: str, container_name: str, host_dir: Path) -subprocess.run(["docker", "rm", "-f", container_name],capture_output=True, timeout=10,+ check=False,)subprocess.run(["docker", "run", "--rm",@@ -137,6 +139,7 @@ def _cleanup_bind_mount(built_image: str, container_name: str, host_dir: Path) -"--entrypoint", "sh", built_image,"-c", "chown -R 0:0 /clean 2>/dev/null; rm -rf /clean/* /clean/.* 2>/dev/null; chown 0:0 /clean; true"],capture_output=True, timeout=15,+ check=False,)@@ -185,6 +188,7 @@ def test_does_not_seed_gateway_state_through_symlink(r = subprocess.run(["docker", "logs", container_name],capture_output=True, text=True, timeout=10,+ check=False,)combined = r.stdout + r.stderrassert "refusing" in combined and "gateway_state.json" in combined, (diff --git a/tests/docker/test_gateway_run_supervised.py b/tests/docker/test_gateway_run_supervised.pyindex 889e194b159..54cf539295e 100644--- a/tests/docker/test_gateway_run_supervised.py+++ b/tests/docker/test_gateway_run_supervised.py@@ -67,6 +67,7 @@ def _wait_for_gateway_or_exit(r = subprocess.run(["docker", "inspect", "-f", "{{.State.Status}}", container],capture_output=True, text=True, timeout=10,+ check=False,)status = r.stdout.strip()if status == "exited":@@ -126,6 +127,7 @@ def test_gateway_run_redirects_to_supervised(r = subprocess.run(["docker", "inspect", "-f", "{{.State.Status}}", container_name],capture_output=True, text=True, timeout=10,+ check=False,)assert r.returncode == 0 and r.stdout.strip() == "running", (f"container exited prematurely: {r.stdout!r}; "diff --git a/tests/docker/test_image_payload.py b/tests/docker/test_image_payload.pyindex bcaafdd08d2..963f23d13fe 100644--- a/tests/docker/test_image_payload.py+++ b/tests/docker/test_image_payload.py@@ -24,6 +24,7 @@ print('PM interpreter and application dependencies load as hermes')["docker", "run", "--rm", "--network", "none", "--user", "hermes","--entrypoint", "/opt/hermes/.venv/bin/python", built_image, "-c", probe],capture_output=True, text=True, timeout=60,+ check=False,)assert result.returncode == 0, result.stdout + result.stderr@@ -44,5 +45,6 @@ assert Path('/opt/hermes/node_modules/typescript/bin/tsc').is_file()["docker", "run", "--rm", "--network", "none", "--user", "hermes","--entrypoint", "/opt/hermes/.venv/bin/python", built_image, "-c", probe],capture_output=True, text=True, timeout=60,+ check=False,)assert result.returncode == 0, result.stdout + result.stderrdiff --git a/tests/docker/test_immutable_install_permissions.py b/tests/docker/test_immutable_install_permissions.pyindex 048d24c1cbd..f9407afc40c 100644--- a/tests/docker/test_immutable_install_permissions.py+++ b/tests/docker/test_immutable_install_permissions.py@@ -19,6 +19,7 @@ def test_container_sets_hosted_write_policy_env(built_image: str) -> None:capture_output=True,text=True,timeout=60,+ check=False,)assert result.returncode == 0, result.stderr[-2000:]@@ -65,5 +66,6 @@ def test_hermes_user_cannot_modify_install_but_can_write_data(built_image: str)capture_output=True,text=True,timeout=120,+ check=False,)assert result.returncode == 0, result.stderr[-2000:]diff --git a/tests/docker/test_license_file_present.py b/tests/docker/test_license_file_present.pyindex fcb69b99315..7848124152e 100644--- a/tests/docker/test_license_file_present.py+++ b/tests/docker/test_license_file_present.py@@ -19,6 +19,7 @@ def test_docker_image_contains_license_file(built_image: str) -> None:["docker", "run", "--rm", "--entrypoint", "test",built_image, "-f", "/opt/hermes/LICENSE"],capture_output=True, text=True, timeout=60,+ check=False,)assert r.returncode == 0, (f"LICENSE file not found at /opt/hermes/LICENSE inside the Docker "diff --git a/tests/docker/test_main_invocation.py b/tests/docker/test_main_invocation.pyindex 74be1faef04..3e9ea443797 100644--- a/tests/docker/test_main_invocation.py+++ b/tests/docker/test_main_invocation.py@@ -22,6 +22,7 @@ def test_chat_subcommand_passthrough(built_image: str) -> None:r = subprocess.run(["docker", "run", "--rm", built_image, "chat", "--help"],capture_output=True, text=True, timeout=60,+ check=False,)assert r.returncode == 0combined = (r.stdout + r.stderr).lower()@@ -35,6 +36,7 @@ def test_bash_pattern(built_image: str) -> None:r = subprocess.run(["docker", "run", "--rm", built_image, "bash", "-c", "echo ok"],capture_output=True, text=True, timeout=30,+ check=False,)assert r.returncode == 0assert "ok" in r.stdout@@ -49,5 +51,6 @@ def test_container_exit_code_matches_inner_exit(built_image: str) -> None:r = subprocess.run(["docker", "run", "--rm", built_image, "sh", "-c", "exit 42"],capture_output=True, text=True, timeout=30,+ check=False,)assert r.returncode == 42diff --git a/tests/docker/test_smoke.py b/tests/docker/test_smoke.pyindex a1ddd03b537..8f17f59dfef 100644--- a/tests/docker/test_smoke.py+++ b/tests/docker/test_smoke.py@@ -28,6 +28,7 @@ def test_hermes_help(built_image: str) -> None:r = subprocess.run(["docker", "run", "--rm", built_image, "--help"],capture_output=True, text=True, timeout=60,+ check=False,)assert r.returncode == 0, (f"hermes --help failed (exit {r.returncode}): "@@ -49,6 +50,7 @@ def test_dashboard_subcommand_present(built_image: str) -> None:r = subprocess.run(["docker", "run", "--rm", built_image, "dashboard", "--help"],capture_output=True, text=True, timeout=60,+ check=False,)assert r.returncode == 0, (f"hermes dashboard --help failed (exit {r.returncode}): "@@ -73,6 +75,7 @@ def test_hermes_help_under_wrapped_init(built_image: str) -> None:r = subprocess.run(["docker", "run", "--init", "--rm", built_image, "--help"],capture_output=True, text=True, timeout=120,+ check=False,)assert "can only run as pid 1" not in (r.stdout + r.stderr), (f"s6-overlay-suexec aborted under a wrapped init (#38349): "diff --git a/tests/docker/test_sqlite_runtime.py b/tests/docker/test_sqlite_runtime.pyindex 235a6a2c20e..14548e7302b 100644--- a/tests/docker/test_sqlite_runtime.py+++ b/tests/docker/test_sqlite_runtime.py@@ -49,6 +49,7 @@ def test_image_links_fixed_sqlite_with_fts5_trigram(built_image: str) -> None:capture_output=True,text=True,timeout=60,+ check=False,)assert result.returncode == 0, (diff --git a/tests/docker/test_tini_compat_shim.py b/tests/docker/test_tini_compat_shim.pyindex 98749fe035f..42372313a7c 100644--- a/tests/docker/test_tini_compat_shim.py+++ b/tests/docker/test_tini_compat_shim.py@@ -23,6 +23,7 @@ def test_legacy_tini_entrypoint_boots(built_image: str) -> None:["docker", "run", "--rm", "--entrypoint", "/usr/bin/tini",built_image, "-g", "--", "--help"],capture_output=True, text=True, timeout=120,+ check=False,)combined = r.stdout + r.stderrassert "-g: not found" not in combined, (diff --git a/tests/docker/test_toplevel_chown.py b/tests/docker/test_toplevel_chown.pyindex 7cdedc23835..704f88a94ec 100644--- a/tests/docker/test_toplevel_chown.py+++ b/tests/docker/test_toplevel_chown.py@@ -156,6 +156,7 @@ def test_symlinked_allowlisted_file_not_chowned(r = subprocess.run(["docker", "logs", container_name],capture_output=True, text=True, timeout=10,+ check=False,)combined = r.stdout + r.stderrassert "refusing" in combined and "auth.json" in combined, (@@ -167,6 +168,7 @@ def test_symlinked_allowlisted_file_not_chowned(subprocess.run(["docker", "rm", "-f", container_name],capture_output=True, timeout=10,+ check=False,)subprocess.run(["docker", "run", "--rm",@@ -174,6 +176,7 @@ def test_symlinked_allowlisted_file_not_chowned("--entrypoint", "sh", built_image,"-c", "chown -R 0:0 /clean 2>/dev/null; rm -rf /clean/* /clean/.* 2>/dev/null; chown 0:0 /clean; true"],capture_output=True, timeout=15,+ check=False,)try:host_data.rmdir()diff --git a/tests/docker/test_tui_passthrough.py b/tests/docker/test_tui_passthrough.pyindex 201600918a2..9c5268f471e 100644--- a/tests/docker/test_tui_passthrough.py+++ b/tests/docker/test_tui_passthrough.py@@ -44,6 +44,7 @@ def test_tty_passthrough_to_container(built_image: str) -> None:r = subprocess.run(["script", "-qc", cmd, "/dev/null"],capture_output=True, text=True, timeout=120,+ check=False,)output = r.stdoutmatches = re.findall(rf"{marker}=(\S+)", output)diff --git a/tests/docker/test_tui_prebuilt_bundle.py b/tests/docker/test_tui_prebuilt_bundle.pyindex 69283389e79..e28da43f646 100644--- a/tests/docker/test_tui_prebuilt_bundle.py+++ b/tests/docker/test_tui_prebuilt_bundle.py@@ -33,7 +33,7 @@ def _exec_py(image: str, py: str) -> str:"docker", "run", "--rm", "--network=none", "--entrypoint", "su", image,"hermes", "-s", "/bin/bash", "-c", inner,]- r = subprocess.run(cmd, capture_output=True, text=True, timeout=120)+ r = subprocess.run(cmd, capture_output=True, text=True, timeout=120, check=False)assert r.returncode == 0, f"in-container python failed:\n{r.stderr[-2000:]}"return r.stdout.strip()@@ -118,6 +118,7 @@ print(json.dumps({["docker", "run", "--rm", "--network=none", "--user", "hermes","--entrypoint", "/bin/bash", built_image, "-c", inner],capture_output=True, text=True, timeout=120,+ check=False,)assert r.returncode == 0, r.stderr[-2000:]out = json.loads(r.stdout.strip())diff --git a/tests/docker/test_user_flag_guard.py b/tests/docker/test_user_flag_guard.pyindex b9a870ca44f..490654102ff 100644--- a/tests/docker/test_user_flag_guard.py+++ b/tests/docker/test_user_flag_guard.py@@ -20,6 +20,7 @@ def test_arbitrary_user_uid_rejected(["docker", "run", "--rm", "--user", "1000:1000",built_image, "echo", "should_not_reach"],capture_output=True, text=True, timeout=60,+ check=False,)assert r.returncode != 0, (f"container started with arbitrary --user UID unexpectedly: {r.stdout}"@@ -47,6 +48,7 @@ def test_user_pinned_to_hermes_uid_works(["docker", "run", "--rm", "--user", "10000:10000",built_image, "sh", "-c", "echo OK"],capture_output=True, text=True, timeout=60,+ check=False,)assert r.returncode == 0, (f"--user 10000:10000 (hermes UID) was rejected: {r.stderr[-500:]}"diff --git a/tests/e2e/core/cli_tmux/test_resize_scrollback.py b/tests/e2e/core/cli_tmux/test_resize_scrollback.pyindex c28eea6146a..fd7455ddb33 100644--- a/tests/e2e/core/cli_tmux/test_resize_scrollback.py+++ b/tests/e2e/core/cli_tmux/test_resize_scrollback.py@@ -44,7 +44,7 @@ def test_resizes_keep_each_transcript_line_once_in_tmux_scrollback(tmp_path: Pat(tmp_path / "work").mkdir()def tmux(*args: str) -> str:- return subprocess.run(["tmux", "-L", sock, *args], capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=30).stdout+ return subprocess.run(["tmux", "-L", sock, *args], capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=30, check=False).stdoutdef transcript() -> str:return tmux("capture-pane", "-p", "-J", "-t", "p", "-S", "-", "-E", "-")diff --git a/tests/e2e/core/dashboard/_helpers.py b/tests/e2e/core/dashboard/_helpers.pyindex 5d39101c2e6..c8df7e178ec 100644--- a/tests/e2e/core/dashboard/_helpers.py+++ b/tests/e2e/core/dashboard/_helpers.py@@ -221,6 +221,7 @@ def _assert_profiles_root_under(sb: Sandbox) -> None:probe = subprocess.run([sys.executable, "-c", "from hermes_cli.profiles import _get_profiles_root as r; print(r())"],env=sb.env(), cwd=str(sb.home), capture_output=True, text=True, timeout=120, stdin=subprocess.DEVNULL,+ check=False,)assert probe.returncode == 0, probe.stderr[-2000:]got = Path(probe.stdout.strip().splitlines()[-1]).resolve()@@ -333,7 +334,7 @@ def run_py(sb: Sandbox, code: str, *args: str, hermes_home: Path | None = None,timeout: float = 120.0) -> subprocess.CompletedProcess:extra = {"HERMES_HOME": str(hermes_home)} if hermes_home else Nonereturn subprocess.run([sys.executable, "-c", code, *args], env=sb.env(extra), cwd=str(sb.home),- capture_output=True, text=True, timeout=timeout, stdin=subprocess.DEVNULL)+ capture_output=True, text=True, timeout=timeout, stdin=subprocess.DEVNULL, check=False)SEED_SESSIONS = """diff --git a/tests/e2e/core/dashboard/test_dashboard_pty.py b/tests/e2e/core/dashboard/test_dashboard_pty.pyindex 074c06c3ec3..1ba54d0e477 100644--- a/tests/e2e/core/dashboard/test_dashboard_pty.py+++ b/tests/e2e/core/dashboard/test_dashboard_pty.py@@ -164,7 +164,7 @@ def _private_tui(tmp_path: Path) -> Path:def copied_intact() -> bool:shutil.copyfile(src, dst)return subprocess.run([shutil.which("node") or "node", "--check", str(dst)], capture_output=True,- timeout=60, stdin=subprocess.DEVNULL).returncode == 0+ timeout=60, stdin=subprocess.DEVNULL, check=False).returncode == 0poll(copied_intact, 180, "an intact copy of ui-tui/dist/entry.js (a concurrent build may be writing it)",interval=1.0)return dst.parent.parentdiff --git a/tests/e2e/core/delivery/_pending_fixes.py b/tests/e2e/core/delivery/_pending_fixes.pyindex 1858e520c04..3411f98ac16 100644--- a/tests/e2e/core/delivery/_pending_fixes.py+++ b/tests/e2e/core/delivery/_pending_fixes.py@@ -65,7 +65,7 @@ def gap_open(pr: int) -> bool:env.update({"HOME": str(home), "HERMES_HOME": str(home / ".hermes"),"PYTHONPATH": str(REPO_ROOT), **extra_env})proc = subprocess.run([sys.executable, "-c", _PRELUDE + script], cwd=str(REPO_ROOT), env=env,- stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=120)+ stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=120, check=False)verdict = proc.stdout.strip().splitlines()[-1:] if proc.returncode == 0 else []if verdict not in (["open"], ["fixed"]):raise AssertionError(f"probe for #{pr} is broken (rc={proc.returncode}): "diff --git a/tests/e2e/core/kanban/_helpers.py b/tests/e2e/core/kanban/_helpers.pyindex 9e82ceef90a..d0be252a0f2 100644--- a/tests/e2e/core/kanban/_helpers.py+++ b/tests/e2e/core/kanban/_helpers.py@@ -110,6 +110,7 @@ class Board:proc = subprocess.run([PY, "-m", "hermes_cli.main", "kanban", *args], cwd=str(self.root), env=self.env(),capture_output=True, text=True, timeout=timeout, stdin=subprocess.DEVNULL,+ check=False,)if check and proc.returncode != 0:raise AssertionError(f"kanban {' '.join(args)} rc={proc.returncode}\n{proc.stdout}\n{proc.stderr}")diff --git a/tests/e2e/core/mcp_plugins/_helpers.py b/tests/e2e/core/mcp_plugins/_helpers.pyindex f168270ec93..41d591dd7d4 100644--- a/tests/e2e/core/mcp_plugins/_helpers.py+++ b/tests/e2e/core/mcp_plugins/_helpers.py@@ -258,7 +258,7 @@ def call_tool(body: dict[str, Any], name: str, args: dict[str, Any] | str) -> Todef run_chat_q(eh: E2EHome, prompt: str, *, timeout: float = TURN_TIMEOUT,env: dict[str, str] | None = None) -> subprocess.CompletedProcess:return subprocess.run(hermes_argv("chat", "-q", prompt, "-Q"), cwd=eh.project, env=eh.env(env),- capture_output=True, text=True, timeout=timeout, stdin=subprocess.DEVNULL)+ capture_output=True, text=True, timeout=timeout, stdin=subprocess.DEVNULL, check=False)# Observation ------------------------------------------------------------------------------------diff --git a/tests/e2e/core/mcp_plugins/test_plugin_activation.py b/tests/e2e/core/mcp_plugins/test_plugin_activation.pyindex 4b272f3ec4e..6da18d4d9a8 100644--- a/tests/e2e/core/mcp_plugins/test_plugin_activation.py+++ b/tests/e2e/core/mcp_plugins/test_plugin_activation.py@@ -137,7 +137,7 @@ def test_plugin_sandbox_selects_real_pm_tools_offline(tmp_path: Path) -> None:child = subprocess.run([sys.executable, "-c","from pm._uv import _toolchain; assert _toolchain(realize=False) is not None"],env=eh.env({"HERMES_DISABLE_LAZY_INSTALLS": "1"}), cwd=eh.project,- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert child.returncode == 0, child.stderr@@ -284,7 +284,7 @@ def name_collision(tmp_path_factory: pytest.TempPathFactory) -> dict[str, Any]:backup = write_portable_plugin(eh, "foo.bak-x", {"srv": portable_stdio(root / "backup.jsonl", eh.tag, MCPE2E_CANARY="CANARY-BACKUP")}, name="foo", version="1.0.0")listing = subprocess.run(hermes_argv("plugins", "list", "--plain", "--no-bundled"), cwd=eh.project,- env=eh.env(), capture_output=True, text=True, timeout=120, stdin=subprocess.DEVNULL)+ env=eh.env(), capture_output=True, text=True, timeout=120, stdin=subprocess.DEVNULL, check=False)assert listing.returncode == 0, listing.stderr[-2000:]try:turn = run_chat_q(eh, "Use the foo plugin.")diff --git a/tests/e2e/core/parity/_boot_contract.py b/tests/e2e/core/parity/_boot_contract.pyindex 3dc922a96e9..574135baf71 100644--- a/tests/e2e/core/parity/_boot_contract.py+++ b/tests/e2e/core/parity/_boot_contract.py@@ -29,7 +29,7 @@ def node_binary() -> str | None:if not node:return Noneout = subprocess.run([node, "--version"], capture_output=True, text=True, timeout=30,- stdin=subprocess.DEVNULL).stdout.strip()+ stdin=subprocess.DEVNULL, check=False).stdout.strip()m = re.match(r"v(\d+)\.(\d+)", out)if not m or (int(m.group(1)), int(m.group(2))) < _MIN_NODE:return None@@ -48,6 +48,7 @@ def desktop_parse(stdout_bytes: str) -> dict:proc = subprocess.run([require_node(), str(BRIDGE_MJS), str(PARSER_TS), "5000"], input=stdout_bytes,capture_output=True, text=True, timeout=60,+ check=False,)assert proc.returncode == 0, f"desktop parser bridge crashed: {proc.stderr[-2000:]}"return json.loads(proc.stdout.strip().splitlines()[-1])diff --git a/tests/e2e/core/parity/_drive_cli.py b/tests/e2e/core/parity/_drive_cli.pyindex 1d87cd4665a..5c97b817fb4 100644--- a/tests/e2e/core/parity/_drive_cli.py+++ b/tests/e2e/core/parity/_drive_cli.py@@ -28,6 +28,7 @@ def _run_cli(ph: ParityHome, *args: str) -> subprocess.CompletedProcess:return subprocess.run(hermes_argv(*args), cwd=ph.project, env=ph.env(), capture_output=True, text=True,timeout=TURN_TIMEOUT, stdin=subprocess.DEVNULL,+ check=False,)diff --git a/tests/e2e/core/parity/_drive_cron.py b/tests/e2e/core/parity/_drive_cron.pyindex 5a739f292fb..271e9ded98c 100644--- a/tests/e2e/core/parity/_drive_cron.py+++ b/tests/e2e/core/parity/_drive_cron.py@@ -33,6 +33,7 @@ def _cron(ph: ParityHome, *args: str) -> subprocess.CompletedProcess:return subprocess.run(hermes_argv("cron", *args), cwd=ph.home, env=ph.env(), capture_output=True, text=True,timeout=TURN_TIMEOUT, stdin=subprocess.DEVNULL,+ check=False,)diff --git a/tests/e2e/core/parity/_drive_gateway.py b/tests/e2e/core/parity/_drive_gateway.pyindex 3ef6e64b70d..28eb34dc523 100644--- a/tests/e2e/core/parity/_drive_gateway.py+++ b/tests/e2e/core/parity/_drive_gateway.py@@ -108,6 +108,7 @@ def _stop(ph: ParityHome, proc: subprocess.Popen) -> bool:str(proc.pid)],cwd=ph.project, env=ph.env(), capture_output=True, text=True, timeout=60,stdin=subprocess.DEVNULL,+ check=False,)assert marker.returncode == 0, f"planned-stop marker write failed: {marker.stderr[-1000:]}"marker_path = Path(marker.stdout.strip().splitlines()[-1])diff --git a/tests/e2e/core/platforms/_helpers.py b/tests/e2e/core/platforms/_helpers.pyindex a3a7c0784f9..9115a317ffd 100644--- a/tests/e2e/core/platforms/_helpers.py+++ b/tests/e2e/core/platforms/_helpers.py@@ -161,7 +161,7 @@ class GatewayUnderTest:def run_cli(self, *argv: str, timeout: float = 120.0) -> subprocess.CompletedProcess:return subprocess.run([sys.executable, "-m", "hermes_cli.main", *argv], cwd=str(self.home),env=hermetic_env(self.home, dict(self._env)), stdin=subprocess.DEVNULL,- capture_output=True, text=True, timeout=timeout)+ capture_output=True, text=True, timeout=timeout, check=False)def alive(self) -> bool:return self.proc is not None and self.proc.poll() is Nonediff --git a/tests/e2e/core/providers/_anthropic_helpers.py b/tests/e2e/core/providers/_anthropic_helpers.pyindex ef49cf29d9d..81e61bd58a0 100644--- a/tests/e2e/core/providers/_anthropic_helpers.py+++ b/tests/e2e/core/providers/_anthropic_helpers.py@@ -82,7 +82,7 @@ class Rig:def run(self, *args: str, timeout: float = TURN_TIMEOUT, extra_env: dict[str, str] | None = None,) -> subprocess.CompletedProcess:return subprocess.run(hermes_argv(*args), cwd=self.project, env=self.env(extra_env), capture_output=True,- text=True, timeout=timeout, stdin=subprocess.DEVNULL)+ text=True, timeout=timeout, stdin=subprocess.DEVNULL, check=False)def stop(self) -> None:reap_adopted(kill_tagged(self.tag))diff --git a/tests/e2e/core/providers/_catalog_helpers.py b/tests/e2e/core/providers/_catalog_helpers.pyindex 45f57c13483..73e6d9dec6b 100644--- a/tests/e2e/core/providers/_catalog_helpers.py+++ b/tests/e2e/core/providers/_catalog_helpers.py@@ -177,7 +177,7 @@ def discover_catalog() -> list[Row]:env = {k: v for k, v in os.environ.items() if k in _PASSTHROUGH}env.update(HOME=d, HERMES_HOME=str(Path(d) / ".hermes"), PYTHONPATH=str(REPO_ROOT))proc = subprocess.run([sys.executable, "-c", _DISCOVER], env=env, capture_output=True,- text=True, timeout=120, cwd=str(REPO_ROOT))+ text=True, timeout=120, cwd=str(REPO_ROOT), check=False)line = next((ln for ln in proc.stdout.splitlines() if ln.startswith("CATALOG=")), None)assert line, f"provider discovery failed: {proc.stderr[-2000:]}"_CATALOG = sorted((Row(**{**r, "aliases": tuple(r["aliases"])}) for r in json.loads(line[8:])),diff --git a/tests/e2e/core/providers/_native_helpers.py b/tests/e2e/core/providers/_native_helpers.pyindex dac4a7a8c6b..685cf0a78dc 100644--- a/tests/e2e/core/providers/_native_helpers.py+++ b/tests/e2e/core/providers/_native_helpers.py@@ -125,7 +125,7 @@ def run_chat(nh: NativeHome, prompt: str, *, resume: str | None = None, env: dicargv += ["--resume", resume]started = time.monotonic()proc = subprocess.run(argv, cwd=nh.project, env=nh.env(env), capture_output=True, text=True,- timeout=timeout, stdin=subprocess.DEVNULL)+ timeout=timeout, stdin=subprocess.DEVNULL, check=False)return ChatResult(proc.returncode, proc.stdout, proc.stderr, time.monotonic() - started)diff --git a/tests/e2e/core/providers/_oauth_helpers.py b/tests/e2e/core/providers/_oauth_helpers.pyindex 47826ec759d..5c94df151df 100644--- a/tests/e2e/core/providers/_oauth_helpers.py+++ b/tests/e2e/core/providers/_oauth_helpers.py@@ -90,7 +90,7 @@ def hermes_argv(*args: str) -> list[str]:def run_hermes(fh: FakeHome, args: list[str], *, extra_env: dict[str, str] | None = None,timeout: float = 120.0) -> subprocess.CompletedProcess:return subprocess.run(hermes_argv(*args), env=fh.env(extra_env), cwd=str(fh.root), stdin=subprocess.DEVNULL,- capture_output=True, text=True, timeout=timeout)+ capture_output=True, text=True, timeout=timeout, check=False)def spawn_hermes(fh: FakeHome, args: list[str], *, extra_env: dict[str, str] | None = None,diff --git a/tests/e2e/core/providers/_openai_helpers.py b/tests/e2e/core/providers/_openai_helpers.pyindex f928ea7291b..5e29286d0f8 100644--- a/tests/e2e/core/providers/_openai_helpers.py+++ b/tests/e2e/core/providers/_openai_helpers.py@@ -215,7 +215,7 @@ def oneshot(h: Home, prompt: str, *args: str, resume: str | None = None, timeoutif resume:argv += ["--resume", resume]proc = subprocess.run(hermes_argv(*argv), cwd=h.project, env=h.env(env), capture_output=True,- text=True, encoding="utf-8", errors="replace", timeout=timeout, stdin=subprocess.DEVNULL)+ text=True, encoding="utf-8", errors="replace", timeout=timeout, stdin=subprocess.DEVNULL, check=False)usage = json.loads(usage_file.read_text(encoding="utf-8")) if usage_file.exists() else {}return Run(proc, usage)diff --git a/tests/e2e/core/providers/test_anthropic_discovery_and_aliases.py b/tests/e2e/core/providers/test_anthropic_discovery_and_aliases.pyindex 4dd83effbc8..ba94c595aba 100644--- a/tests/e2e/core/providers/test_anthropic_discovery_and_aliases.py+++ b/tests/e2e/core/providers/test_anthropic_discovery_and_aliases.py@@ -79,7 +79,7 @@ def _discover(r: Rig, relay: AnthropicMessagesServer | None, *, via: str) -> liselse:extra = {"ANTHROPIC_BASE_URL": relay.base_url.removesuffix("/anthropic")}proc = subprocess.run([sys.executable, "-c", _DISCOVERY_PROBE], cwd=r.project, env=r.env(extra),- capture_output=True, text=True, timeout=120, stdin=subprocess.DEVNULL)+ capture_output=True, text=True, timeout=120, stdin=subprocess.DEVNULL, check=False)assert proc.returncode == 0, proc.stderr[-2000:]line = next(ln for ln in proc.stdout.splitlines() if ln.startswith("IDS="))return json.loads(line[4:])diff --git a/tests/e2e/core/providers/test_catalog_listing.py b/tests/e2e/core/providers/test_catalog_listing.pyindex f6322d2b5bb..3d7caee0034 100644--- a/tests/e2e/core/providers/test_catalog_listing.py+++ b/tests/e2e/core/providers/test_catalog_listing.py@@ -94,7 +94,7 @@ def _probe(row: Row, root: Path, kind: str) -> dict:try:proc = subprocess.run([sys.executable, "-c", script, row.name, unique], cwd=root, capture_output=True,text=True, env=hermetic_env(home, {**keys, **fake.proxy_env()}),- timeout=PROBE_TIMEOUT, stdin=subprocess.DEVNULL)+ timeout=PROBE_TIMEOUT, stdin=subprocess.DEVNULL, check=False)out, err = proc.stdout, proc.stderrexcept subprocess.TimeoutExpired:out, err = "", f"TIMEOUT after {PROBE_TIMEOUT}s"diff --git a/tests/e2e/core/providers/test_catalog_oauth.py b/tests/e2e/core/providers/test_catalog_oauth.pyindex 349223f2cfb..e659b6c1da9 100644--- a/tests/e2e/core/providers/test_catalog_oauth.py+++ b/tests/e2e/core/providers/test_catalog_oauth.py@@ -101,7 +101,7 @@ class Home:timeout: float = TURN_TIMEOUT) -> subprocess.CompletedProcess[str]:return subprocess.run([sys.executable, "-m", "hermes_cli.main", *argv], cwd=str(self.home), env=self.env(extra_env),- stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=timeout)+ stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=timeout, check=False)def _iso(delta_s: float) -> str:diff --git a/tests/e2e/core/providers/test_native_copilot_acp_errors.py b/tests/e2e/core/providers/test_native_copilot_acp_errors.pyindex 69a85e10301..97c775adf38 100644--- a/tests/e2e/core/providers/test_native_copilot_acp_errors.py+++ b/tests/e2e/core/providers/test_native_copilot_acp_errors.py@@ -155,7 +155,7 @@ def test_auth_failure_remedy_is_an_actionable_command(outcomes):for command in REMEDY_RE.findall(out.run.stdout):argv = [sys.executable, "-m", "hermes_cli.main", *command.split()[1:]]proc = subprocess.run(argv, cwd=out.nh.project, env=out.nh.env(), capture_output=True, text=True,- timeout=60, stdin=subprocess.DEVNULL)+ timeout=60, stdin=subprocess.DEVNULL, check=False)said = (proc.stdout + proc.stderr).lower()with known_gate(KNOWN, "auth_remedy", raises=KnownSymptom):if "not implemented" in said:diff --git a/tests/e2e/core/security/_helpers.py b/tests/e2e/core/security/_helpers.pyindex 47819e14906..e0dce7fbba7 100644--- a/tests/e2e/core/security/_helpers.py+++ b/tests/e2e/core/security/_helpers.py@@ -150,7 +150,7 @@ def run_python(code: str, home: Path, *args: str, timeout: float = 120.0,extra_env: dict[str, str] | None = None) -> subprocess.CompletedProcess:"""A fresh interpreter importing the worktree's Hermes under the hermetic env."""return subprocess.run([sys.executable, "-c", code, *args], cwd=str(home), env=hermetic_env(home, extra_env),- capture_output=True, text=True, timeout=timeout, stdin=subprocess.DEVNULL)+ capture_output=True, text=True, timeout=timeout, stdin=subprocess.DEVNULL, check=False)def db_blob(db: Path) -> str:diff --git a/tests/e2e/core/tenancy/_helpers.py b/tests/e2e/core/tenancy/_helpers.pyindex 20acd435e12..7092fc6ace1 100644--- a/tests/e2e/core/tenancy/_helpers.py+++ b/tests/e2e/core/tenancy/_helpers.py@@ -211,6 +211,7 @@ def assert_profiles_root_under(root: Path, home: Path) -> None:[sys.executable, "-c", "from hermes_cli.profiles import _get_profiles_root as r; print(r())"],env=hermetic_env(home), cwd=str(home), capture_output=True, text=True, timeout=120,stdin=subprocess.DEVNULL,+ check=False,)assert probe.returncode == 0, probe.stderr[-2000:]got = Path(probe.stdout.strip().splitlines()[-1]).resolve()@@ -340,7 +341,7 @@ def seed_due_cron_job(t: Tenant, home: Path) -> str:"run on next tick" action produces), so the multiplexed ticker's first tick fires it."""r = subprocess.run([sys.executable, "-c", _SEED_CRON, t.cron_prompt], cwd=str(home),env=hermetic_env(home, {"HERMES_HOME": str(t.home)}), capture_output=True, text=True,- timeout=120, stdin=subprocess.DEVNULL)+ timeout=120, stdin=subprocess.DEVNULL, check=False)assert r.returncode == 0, r.stderr[-2000:]return r.stdout.strip().splitlines()[-1]diff --git a/tests/e2e/core/tui_pty/_helpers.py b/tests/e2e/core/tui_pty/_helpers.pyindex df43240a825..a03a3d70815 100644--- a/tests/e2e/core/tui_pty/_helpers.py+++ b/tests/e2e/core/tui_pty/_helpers.py@@ -90,7 +90,7 @@ def private_tui_dir(root: Path) -> Path:dest.parent.mkdir(parents=True, exist_ok=True)for _ in range(20):shutil.copyfile(src, dest)- if subprocess.run(["node", "--check", str(dest)], capture_output=True, timeout=60).returncode == 0:+ if subprocess.run(["node", "--check", str(dest)], capture_output=True, timeout=60, check=False).returncode == 0:return dest.parent.parenttime.sleep(0.5) # caught a rebuild mid-write; take another copyraise AssertionError(f"{src} never parsed (a rebuild kept rewriting it?)")@@ -273,7 +273,7 @@ class TmuxTui:def tmux_run(self, *args: str) -> subprocess.CompletedProcess:argv = ["tmux", "-S", self.sock, *args]return subprocess.run(argv, capture_output=True, text=True, encoding="utf-8", errors="replace",- timeout=30)+ timeout=30, check=False)def tmux(self, *args: str) -> str:return self.tmux_run(*args).stdoutdiff --git a/tests/e2e/core/upgrade/_helpers.py b/tests/e2e/core/upgrade/_helpers.pyindex e017334dfaf..c05d839e810 100644--- a/tests/e2e/core/upgrade/_helpers.py+++ b/tests/e2e/core/upgrade/_helpers.py@@ -43,6 +43,7 @@ def _bwrap_usable() -> bool:r = subprocess.run([exe, "--dev-bind", "/", "/", "--unshare-pid", "--proc", "/proc", "--die-with-parent", "true"],capture_output=True, timeout=30,+ check=False,)except (OSError, subprocess.TimeoutExpired):return Falsediff --git a/tests/e2e/core/upgrade/_install_helpers.py b/tests/e2e/core/upgrade/_install_helpers.pyindex 7c104ca5912..3285570727a 100644--- a/tests/e2e/core/upgrade/_install_helpers.py+++ b/tests/e2e/core/upgrade/_install_helpers.py@@ -38,7 +38,7 @@ def real_uv() -> str | None:def git(*args: str, cwd: Path, check: bool = True, env: dict | None = None) -> str:cp = subprocess.run(["git", *args], cwd=str(cwd), capture_output=True, text=True,- env=env or {**os.environ, "GIT_TERMINAL_PROMPT": "0"})+ env=env or {**os.environ, "GIT_TERMINAL_PROMPT": "0"}, check=False)if check and cp.returncode != 0:raise AssertionError(f"git {args} failed in {cwd}: {cp.stderr}")return cp.stdout.strip()diff --git a/tests/e2e/core/upgrade/git/_git_world.py b/tests/e2e/core/upgrade/git/_git_world.pyindex 485e5193c64..52f9cda8cb2 100644--- a/tests/e2e/core/upgrade/git/_git_world.py+++ b/tests/e2e/core/upgrade/git/_git_world.py@@ -198,7 +198,7 @@ class World:def _preclone(sb: I.Sandbox, args: list[str], env: dict[str, str]) -> None:sb.hermes_home.mkdir(parents=True, exist_ok=True)cp = subprocess.run(["git", "clone", "-q", *args, "--branch", "main", I.OFFICIAL_HTTPS, str(sb.checkout)],- capture_output=True, text=True, env=env, timeout=900)+ capture_output=True, text=True, env=env, timeout=900, check=False)assert cp.returncode == 0, f"pre-clone {args} failed: {cp.stderr[-2000:]}"diff --git a/tests/e2e/core/upgrade/git/test_hostile_lock.py b/tests/e2e/core/upgrade/git/test_hostile_lock.pyindex f19387fb29f..6c77be3c05f 100644--- a/tests/e2e/core/upgrade/git/test_hostile_lock.py+++ b/tests/e2e/core/upgrade/git/test_hostile_lock.py@@ -151,7 +151,7 @@ class Rig:wrap = root / "wrap"wrap.mkdir()real_git = subprocess.run(["sh", "-c", "command -v git"], text=True, encoding="utf-8",- capture_output=True).stdout.strip()+ capture_output=True, check=False).stdout.strip()(wrap / "git").write_text("#!/usr/bin/env bash\n"'for a in "$@"; do if [ "$a" = fetch ]; then\n'@@ -174,7 +174,7 @@ class Rig:argv = H.sandbox_argv([sys.executable, str(self.root / "driver.py"), str(self.root), str(self.checkout), *args],writable=[self.root])cp = subprocess.run(argv, env=envs["home-a"], cwd=self.checkout, stdin=subprocess.DEVNULL,- capture_output=True, text=True, timeout=timeout)+ capture_output=True, text=True, timeout=timeout, check=False)assert cp.returncode == 0, f"driver failed:\n{cp.stdout[-3000:]}\n{cp.stderr[-3000:]}"return json.loads(cp.stdout.strip().splitlines()[-1])diff --git a/tests/e2e/core/upgrade/handoff/_handoff.py b/tests/e2e/core/upgrade/handoff/_handoff.pyindex e8bc60dfcfc..3e5fb316f6c 100644--- a/tests/e2e/core/upgrade/handoff/_handoff.py+++ b/tests/e2e/core/upgrade/handoff/_handoff.py@@ -183,7 +183,7 @@ def stage_n1(root: Path) -> Install:uv_env = {k: v for k, v in os.environ.items() if k not in ("VIRTUAL_ENV", "UV_NO_CONFIG", "UV_CONFIG_FILE")}uv_env.update(UV_PROJECT_ENVIRONMENT=str(checkout / "venv"), XDG_CONFIG_HOME=str(no_cfg), XDG_CONFIG_DIRS=str(no_cfg))cp = subprocess.run([I.real_uv(), "sync", "-q", "--locked", "--extra", "all", "--managed-python", "--python",- base_python], cwd=str(checkout), env=uv_env, capture_output=True, text=True, timeout=1800)+ base_python], cwd=str(checkout), env=uv_env, capture_output=True, text=True, timeout=1800, check=False)assert cp.returncode == 0, f"N-1 venv install from its uv.lock failed:\n{cp.stderr[-4000:]}"local_bin = sb.home / ".local" / "bin"local_bin.mkdir(parents=True, exist_ok=True)diff --git a/tests/e2e/core/upgrade/hosts/test_libc_musl.py b/tests/e2e/core/upgrade/hosts/test_libc_musl.pyindex 827d4eade3b..a5d1d001a51 100644--- a/tests/e2e/core/upgrade/hosts/test_libc_musl.py+++ b/tests/e2e/core/upgrade/hosts/test_libc_musl.py@@ -33,7 +33,7 @@ def _docker_reason() -> str | None:if exe is None:return "docker CLI not installed; the musl host shape runs in an Alpine container"try:- cp = subprocess.run([exe, "info", "--format", "{{.ServerVersion}}"], capture_output=True, text=True, timeout=30)+ cp = subprocess.run([exe, "info", "--format", "{{.ServerVersion}}"], capture_output=True, text=True, timeout=30, check=False)except (OSError, subprocess.TimeoutExpired) as exc:return f"docker daemon unreachable ({exc})"if cp.returncode != 0:@@ -78,12 +78,12 @@ def alpine_install(tmp_path_factory):shutil.copy(H.WORKTREE / "scripts" / "install.sh", work / "install.sh")# The --shared origin borrows objects from this checkout's object store: mount it too.objects = Path(I.git("rev-parse", "--path-format=absolute", "--git-common-dir", cwd=H.WORKTREE)) / "objects"- pull = subprocess.run(["docker", "pull", "-q", IMAGE], capture_output=True, text=True, timeout=600)+ pull = subprocess.run(["docker", "pull", "-q", IMAGE], capture_output=True, text=True, timeout=600, check=False)assert pull.returncode == 0, f"docker pull {IMAGE} failed (network?):\n{pull.stderr[-2000:]}"argv = ["docker", "run", "--rm", "-e", f"ORIGIN={origin}","-v", f"{origin}:{origin}:ro", "-v", f"{objects}:{objects}:ro", "-v", f"{work}:/work:ro",IMAGE, "sh", "-c", SCRIPT]- cp = subprocess.run(argv, capture_output=True, text=True, timeout=1800)+ cp = subprocess.run(argv, capture_output=True, text=True, timeout=1800, check=False)assert cp.returncode != 90, "harness: apk could not install bash/git/curl in the container:\n" + I.describe(cp)return cpdiff --git a/tests/e2e/core/upgrade/network/_netedge.py b/tests/e2e/core/upgrade/network/_netedge.pyindex d7f005c2fb2..8d9bd59bbcb 100644--- a/tests/e2e/core/upgrade/network/_netedge.py+++ b/tests/e2e/core/upgrade/network/_netedge.py@@ -53,6 +53,7 @@ def netns_usable() -> bool:[shutil.which("bwrap") or "bwrap", "--dev-bind", "/", "/", "--unshare-net", "--unshare-pid","--proc", "/proc", "--die-with-parent", sys.executable, "-I", "-c", probe],capture_output=True, text=True, timeout=30,+ check=False,)except (OSError, subprocess.TimeoutExpired):return False@@ -256,7 +257,7 @@ def git_app(project_root: Path, *, faults: list[Response] | None = None) -> App:}if req.headers.get("content-encoding", "").lower() == "gzip":body = gzip.decompress(body)- cp = subprocess.run([git, "http-backend"], input=body, env=env, capture_output=True, timeout=300)+ cp = subprocess.run([git, "http-backend"], input=body, env=env, capture_output=True, timeout=300, check=False)head, _, payload = cp.stdout.partition(b"\r\n\r\n")if not _:head, _, payload = cp.stdout.partition(b"\n\n")diff --git a/tests/e2e/core/upgrade/pm/test_configured_features.py b/tests/e2e/core/upgrade/pm/test_configured_features.pyindex d24a24d3be4..8322d8a14a6 100644--- a/tests/e2e/core/upgrade/pm/test_configured_features.py+++ b/tests/e2e/core/upgrade/pm/test_configured_features.py@@ -145,7 +145,7 @@ def migrated(tmp_path_factory, provider):assert uv is not Nonecp = subprocess.run([uv, "sync", "-q", "--locked", "--extra", "all", "--extra", "messaging","--python", str(leg.install / "venv" / "bin" / "python")],- cwd=str(leg.install), env=uv_env, capture_output=True, text=True, timeout=1800)+ cwd=str(leg.install), env=uv_env, capture_output=True, text=True, timeout=1800, check=False)assert cp.returncode == 0, f"harness: messaging install into the N-1 venv failed:\n{cp.stderr[-4000:]}"with (leg.install / "pyproject.toml").open("rb") as fh:assert "messaging" in tomllib.load(fh)["project"]["optional-dependencies"], "harness: N-1 has no messaging extra"diff --git a/tests/e2e/core/upgrade/pm/test_interpreter_hygiene.py b/tests/e2e/core/upgrade/pm/test_interpreter_hygiene.pyindex 975b0a6e78c..737ea35c78f 100644--- a/tests/e2e/core/upgrade/pm/test_interpreter_hygiene.py+++ b/tests/e2e/core/upgrade/pm/test_interpreter_hygiene.py@@ -57,7 +57,7 @@ def _stray_python() -> str:"""Another Python than PM's: 3.11 when uv can find one (the #123972 shape), else the test's."""uv = I.real_uv()assert uv is not None- cp = subprocess.run([uv, "python", "find", "3.11"], capture_output=True, text=True, timeout=120)+ cp = subprocess.run([uv, "python", "find", "3.11"], capture_output=True, text=True, timeout=120, check=False)return cp.stdout.strip() if cp.returncode == 0 and cp.stdout.strip() else sys.executable@@ -69,7 +69,7 @@ def _seed_stray_venvs(sb: I.Sandbox) -> dict[str, Path]:venv = sb.checkout / nameshutil.rmtree(venv, ignore_errors=True)cp = subprocess.run([uv, "venv", "-q", "--python", python, str(venv)], capture_output=True, text=True,- timeout=300, env={k: v for k, v in __import__("os").environ.items() if k != "VIRTUAL_ENV"})+ timeout=300, env={k: v for k, v in __import__("os").environ.items() if k != "VIRTUAL_ENV"}, check=False)assert cp.returncode == 0, f"harness: uv venv {venv} failed:\n{cp.stderr}"site = next(venv.glob("lib/python3*/site-packages"))log = sb.root / f"stray-{name.strip('.')}-loaded.log"diff --git a/tests/e2e/core/upgrade/test_config_roundtrip_properties.py b/tests/e2e/core/upgrade/test_config_roundtrip_properties.pyindex a5bbd410f81..62a83b9a8c0 100644--- a/tests/e2e/core/upgrade/test_config_roundtrip_properties.py+++ b/tests/e2e/core/upgrade/test_config_roundtrip_properties.py@@ -566,7 +566,7 @@ def _dotted_provider(case: Case) -> str:def _cli(env: dict, *args: str, timeout: float = 120) -> subprocess.CompletedProcess:return subprocess.run([sys.executable, "-m", "hermes_cli.main", *args], cwd=str(WORKTREE), env=env,- capture_output=True, text=True, timeout=timeout, stdin=subprocess.DEVNULL)+ capture_output=True, text=True, timeout=timeout, stdin=subprocess.DEVNULL, check=False)def _cli_home(tmp_path: Path, case: Case) -> tuple[dict, Path]:diff --git a/tests/e2e/core/upgrade/test_fresh_process_entrypoints.py b/tests/e2e/core/upgrade/test_fresh_process_entrypoints.pyindex 28350cd5a7a..625eb964722 100644--- a/tests/e2e/core/upgrade/test_fresh_process_entrypoints.py+++ b/tests/e2e/core/upgrade/test_fresh_process_entrypoints.py@@ -148,7 +148,7 @@ def _dist_is_optional_here(dist: str) -> bool:def _git(*args: str, cwd: Path = WORKTREE) -> subprocess.CompletedProcess:return subprocess.run(["git", *args], cwd=str(cwd), capture_output=True, text=True, encoding="utf-8",- stdin=subprocess.DEVNULL, timeout=120)+ stdin=subprocess.DEVNULL, timeout=120, check=False)def _tracked(prefix: str = "") -> set[str] | None:@@ -592,7 +592,7 @@ def test_pre_handoff_updater_stale_graph_imports_post_update_modules(tmp_path):checkout = tmp_path / "checkout"checkout.mkdir()archive = subprocess.run(["git", "archive", "--format=tar", tag, "--", *old_entries], cwd=str(WORKTREE),- capture_output=True, stdin=subprocess.DEVNULL, timeout=120)+ capture_output=True, stdin=subprocess.DEVNULL, timeout=120, check=False)assert archive.returncode == 0, archive.stderr.decode(errors="replace")subprocess.run(["tar", "-x", "-C", str(checkout)], input=archive.stdout, check=True, timeout=120)roots = [n for n in _root_py_modules() if not n.startswith("_test_")]diff --git a/tests/e2e/core/upgrade/test_upgrade_path.py b/tests/e2e/core/upgrade/test_upgrade_path.pyindex e418c554060..009c2fd16ac 100644--- a/tests/e2e/core/upgrade/test_upgrade_path.py+++ b/tests/e2e/core/upgrade/test_upgrade_path.py@@ -81,7 +81,7 @@ CLI_TIMEOUT = 600def _git(*args: str, cwd: Path, check: bool = True) -> str:cp = subprocess.run(["git", *args], cwd=str(cwd), capture_output=True, text=True,- env={**os.environ, "GIT_TERMINAL_PROMPT": "0"})+ env={**os.environ, "GIT_TERMINAL_PROMPT": "0"}, check=False)if check and cp.returncode != 0:raise AssertionError(f"git {args} failed in {cwd}: {cp.stderr}")return cp.stdout.strip()@@ -375,7 +375,7 @@ def make_leg(root: Path, template_home: Path | None) -> Leg:uv_env.update(UV_PROJECT_ENVIRONMENT=str(install / "venv"), XDG_CONFIG_HOME=str(no_cfg), XDG_CONFIG_DIRS=str(no_cfg))cp = subprocess.run([uv, "sync", "-q", "--locked", "--extra", "all", "--managed-python","--python", base_python], cwd=str(install),- env=uv_env, capture_output=True, text=True, timeout=1800)+ env=uv_env, capture_output=True, text=True, timeout=1800, check=False)assert cp.returncode == 0, f"N-1 venv install from its uv.lock failed:\n{cp.stderr[-4000:]}"env_probe = H.isolated_env(root)hermes_home = Path(env_probe["HERMES_HOME"])diff --git a/tests/e2e/core/windows/_helpers.py b/tests/e2e/core/windows/_helpers.pyindex b2d6b2e5396..7253aa3b145 100644--- a/tests/e2e/core/windows/_helpers.py+++ b/tests/e2e/core/windows/_helpers.py@@ -145,6 +145,7 @@ def run(argv: list[str], home: WinHome, *, cwd: Path | None = None, timeout: floproc = subprocess.run(argv, cwd=cwd or home.project, env=home.env(env_extra), capture_output=True,input=stdin, stdin=None if stdin is not None else subprocess.DEVNULL, timeout=timeout,+ check=False,)return Run(proc.returncode, _decode(proc.stdout), _decode(proc.stderr))@@ -324,7 +325,7 @@ def kill_owned(home: WinHome, *, since: float) -> None:def taskkill_tree(pid: int) -> subprocess.CompletedProcess:"""The Desktop's backend quit path on Windows (electron/backend-child.ts): taskkill /T /F."""- return subprocess.run(["taskkill", "/PID", str(pid), "/T", "/F"], capture_output=True, timeout=60)+ return subprocess.run(["taskkill", "/PID", str(pid), "/T", "/F"], capture_output=True, timeout=60, check=False)def nonce(prefix: str) -> str:diff --git a/tests/e2e/core/windows_update/_machine.py b/tests/e2e/core/windows_update/_machine.pyindex 8f089d899d2..100a6a311c0 100644--- a/tests/e2e/core/windows_update/_machine.py+++ b/tests/e2e/core/windows_update/_machine.py@@ -106,7 +106,7 @@ def harness_git(*args: str, cwd: Path | None = None, env: dict[str, str] | Nonebase = {k: v for k, v in os.environ.items() if not k.startswith("GIT_")}base.update(env or {})res = subprocess.run([REAL_GIT, "-c", "safe.directory=*", *args], cwd=cwd, env=base,- capture_output=True, timeout=timeout)+ capture_output=True, timeout=timeout, check=False)out, err = _decode(res.stdout), _decode(res.stderr)if res.returncode:raise RuntimeError(f"harness git {' '.join(args)} failed rc={res.returncode}: {err[-2000:]}")@@ -345,7 +345,7 @@ class Machine:code = proc.wait(timeout=timeout)self.timings.append((label, round(time.monotonic() - started, 1)))except subprocess.TimeoutExpired:- subprocess.run(["taskkill", "/PID", str(proc.pid), "/T", "/F"], capture_output=True, timeout=60)+ subprocess.run(["taskkill", "/PID", str(proc.pid), "/T", "/F"], capture_output=True, timeout=60, check=False)proc.wait(timeout=60)reader.join(timeout=10)raise AssertionError(@@ -514,7 +514,7 @@ class Machine:kill_tree(self.owned_processes())for proc in self._spawned:if proc.poll() is None:- subprocess.run(["taskkill", "/PID", str(proc.pid), "/T", "/F"], capture_output=True, timeout=60)+ subprocess.run(["taskkill", "/PID", str(proc.pid), "/T", "/F"], capture_output=True, timeout=60, check=False)def teardown(self) -> None:self.kill_owned()@@ -649,4 +649,4 @@ def taskkill_tree(pid: int) -> subprocess.CompletedProcess:rc 0 means every process in the tree was terminated. rc 128 can still mean ``pid`` itself waskilled (a job member died with it mid-walk): read stdout, see ``_kill_delivered``."""- return subprocess.run(["taskkill", "/PID", str(pid), "/T", "/F"], capture_output=True, timeout=60)+ return subprocess.run(["taskkill", "/PID", str(pid), "/T", "/F"], capture_output=True, timeout=60, check=False)diff --git a/tests/e2e/core/windows_update/test_crash_cells.py b/tests/e2e/core/windows_update/test_crash_cells.pyindex a2676213380..4a7babaebe6 100644--- a/tests/e2e/core/windows_update/test_crash_cells.py+++ b/tests/e2e/core/windows_update/test_crash_cells.py@@ -266,7 +266,7 @@ def _tree(machine, label: str) -> dict:def git(*args: str) -> tuple[int, str]:res = subprocess.run([REAL_GIT, "--no-optional-locks", "-c", "safe.directory=*","-C", str(machine.install_dir), *args],- env=machine.env(), capture_output=True, timeout=300)+ env=machine.env(), capture_output=True, timeout=300, check=False)return res.returncode, (_decode(res.stdout) + _decode(res.stderr)).strip()rc_head, head = git("rev-parse", "HEAD")@@ -578,7 +578,7 @@ def _orphan(machine, srv, label: str) -> dict:marker_at_kill = _read_marker(machine)# No /T: the script alone dies; its update child (in the script's job, which has# no KILL_ON_JOB_CLOSE) keeps running.- subprocess.run(["taskkill", "/PID", str(proc.pid), "/F"], capture_output=True, timeout=60)+ subprocess.run(["taskkill", "/PID", str(proc.pid), "/F"], capture_output=True, timeout=60, check=False)proc.wait(timeout=60)killed_at = time.monotonic()dead_while_running = Nonediff --git a/tests/e2e/core/windows_update/test_git_and_holders.py b/tests/e2e/core/windows_update/test_git_and_holders.pyindex a3b48e543a2..484d8539f24 100644--- a/tests/e2e/core/windows_update/test_git_and_holders.py+++ b/tests/e2e/core/windows_update/test_git_and_holders.py@@ -58,7 +58,7 @@ def _spawn_holders(machine: Machine) -> list[int]:def _stop_holders(pids: list[int]) -> None:for pid in pids:- subprocess.run(["taskkill", "/PID", str(pid), "/T", "/F"], capture_output=True, timeout=60)+ subprocess.run(["taskkill", "/PID", str(pid), "/T", "/F"], capture_output=True, timeout=60, check=False)wait_until(lambda: not any(psutil.pid_exists(p) for p in pids), 60, "venv holders to exit")diff --git a/tests/e2e/core/windows_update/test_pause_custody.py b/tests/e2e/core/windows_update/test_pause_custody.pyindex 4fc8b36e64f..1e2bb894cde 100644--- a/tests/e2e/core/windows_update/test_pause_custody.py+++ b/tests/e2e/core/windows_update/test_pause_custody.py@@ -239,14 +239,14 @@ time.sleep(600)""")out["drain_asked"] = _await_line(updater, log, "asked")# The updater dies with the stop request on disk (its venv launcher and the interpreter under it).- subprocess.run(["taskkill", "/PID", str(updater.pid), "/T", "/F"], capture_output=True, timeout=60)+ subprocess.run(["taskkill", "/PID", str(updater.pid), "/T", "/F"], capture_output=True, timeout=60, check=False)updater.wait(timeout=60)out["drain_updater"] = _text(log)out["drain_live_before"] = psutil.pid_exists(live)out["drain_launch_while"] = _launch(machine, "while-draining")out["drain_live_after_launch"] = psutil.pid_exists(live)out["drain_owed_while"] = _owed(machine)- subprocess.run(["taskkill", "/PID", str(live), "/F"], capture_output=True, timeout=60)+ subprocess.run(["taskkill", "/PID", str(live), "/F"], capture_output=True, timeout=60, check=False)deadline = time.monotonic() + 30while psutil.pid_exists(live) and time.monotonic() < deadline:time.sleep(0.2)diff --git a/tests/e2e/core/windows_update/test_pause_durable.py b/tests/e2e/core/windows_update/test_pause_durable.pyindex 15537a3e975..cd92a1112d4 100644--- a/tests/e2e/core/windows_update/test_pause_durable.py+++ b/tests/e2e/core/windows_update/test_pause_durable.py@@ -82,7 +82,7 @@ def _update_killed_after_pause(machine) -> tuple[bool, str]:deadline = time.monotonic() + 600while not seen.is_set() and proc.poll() is None and time.monotonic() < deadline:time.sleep(0.05)- subprocess.run(["taskkill", "/PID", str(proc.pid), "/T", "/F"], capture_output=True, timeout=60)+ subprocess.run(["taskkill", "/PID", str(proc.pid), "/T", "/F"], capture_output=True, timeout=60, check=False)proc.wait(timeout=60)return seen.is_set(), "\n".join(lines[-40:])diff --git a/tests/e2e/core/windows_update/test_update_lock_tree.py b/tests/e2e/core/windows_update/test_update_lock_tree.pyindex 54bcade8e03..94b7f43423d 100644--- a/tests/e2e/core/windows_update/test_update_lock_tree.py+++ b/tests/e2e/core/windows_update/test_update_lock_tree.py@@ -97,14 +97,14 @@ def journey(tmp_path_factory):out["a_update"] = machine.update(label="update-while-held")out["a_head"] = machine.installed_head()# (b) kill the owner only; the job must take its child down- subprocess.run(["taskkill", "/F", "/PID", str(owner.pid)], capture_output=True, timeout=60)+ subprocess.run(["taskkill", "/F", "/PID", str(owner.pid)], capture_output=True, timeout=60, check=False)owner.wait(timeout=60)try:wait_until(lambda: not _alive(child), 20, "the bound child to die with its owner")out["b_child_dead"] = Trueexcept AssertionError:out["b_child_dead"] = False- subprocess.run(["taskkill", "/F", "/PID", str(child)], capture_output=True, timeout=60)+ subprocess.run(["taskkill", "/F", "/PID", str(child)], capture_output=True, timeout=60, check=False)# (c) the tree is gone: the lock is freeout["c_update"] = machine.update(label="update-after-tree")out["c_head"] = machine.installed_head()diff --git a/tests/gateway/relay/test_cold_opt_out.py b/tests/gateway/relay/test_cold_opt_out.pyindex 76603734c44..1f1f7c4a4b7 100644--- a/tests/gateway/relay/test_cold_opt_out.py+++ b/tests/gateway/relay/test_cold_opt_out.py@@ -57,7 +57,7 @@ def test_cold_fronted_platforms_is_read_only(tmp_path, case):"changed_env": changed}))""")child = subprocess.run([sys.executable, "-c", code, case, str(scoped)],- cwd=tmp_path, env=env, text=True, capture_output=True, timeout=45)+ cwd=tmp_path, env=env, text=True, capture_output=True, timeout=45, check=False)assert child.returncode == 0, child.stderrobserved = json.loads(child.stdout.splitlines()[-1])assert observed == {"fronted": ["slack"] if case == "url-only" else [],diff --git a/tests/gateway/test_complete_path_at_filter.py b/tests/gateway/test_complete_path_at_filter.pyindex b9e07a06002..26f4c30339e 100644--- a/tests/gateway/test_complete_path_at_filter.py+++ b/tests/gateway/test_complete_path_at_filter.py@@ -99,7 +99,7 @@ def _fake_remote_backend(monkeypatch, remote_root: Path) -> list:calls.append((command, kwargs.get("task_id")))proc = subprocess.run(command, shell=True, cwd=remote_root, capture_output=True, text=True,- env={"PATH": os.environ.get("PATH", ""), "HOME": str(remote_root)})+ env={"PATH": os.environ.get("PATH", ""), "HOME": str(remote_root)}, check=False)return json.dumps({"output": proc.stdout, "exit_code": proc.returncode})monkeypatch.setattr(terminal_tool_mod, "terminal_tool", fake_terminal_tool)diff --git a/tests/gateway/test_config_env_bridge_authority.py b/tests/gateway/test_config_env_bridge_authority.pyindex 6cf2a74a88a..fd3a3440661 100644--- a/tests/gateway/test_config_env_bridge_authority.py+++ b/tests/gateway/test_config_env_bridge_authority.py@@ -90,6 +90,7 @@ def _run_gateway_import(capture_output=True,text=True,timeout=60,+ check=False,)if result.returncode != 0:pytest.fail(diff --git a/tests/gateway/test_control_socket_windows_live.py b/tests/gateway/test_control_socket_windows_live.pyindex a9bda25aa12..22080a5aab1 100644--- a/tests/gateway/test_control_socket_windows_live.py+++ b/tests/gateway/test_control_socket_windows_live.py@@ -114,6 +114,7 @@ def _kill_tree(proc: subprocess.Popen) -> None:subprocess.run(["taskkill", "/PID", str(proc.pid), "/T", "/F"],capture_output=True,+ check=False,)proc.wait()diff --git a/tests/gateway/test_failure_writer_ownership.py b/tests/gateway/test_failure_writer_ownership.pyindex 9340e17d38b..b9edeff1d98 100644--- a/tests/gateway/test_failure_writer_ownership.py+++ b/tests/gateway/test_failure_writer_ownership.py@@ -22,6 +22,7 @@ def test_gateway_failure_writer_preserves_accepted_turn_identity(tmp_path):text=True,stdin=subprocess.DEVNULL,timeout=90,+ check=False,)assert receipt.exists(), result.stdout + result.stderrdata = json.loads(receipt.read_text())diff --git a/tests/gateway/test_import_preserves_tui_cwd.py b/tests/gateway/test_import_preserves_tui_cwd.pyindex 91f628dc69f..8b644e3ed38 100644--- a/tests/gateway/test_import_preserves_tui_cwd.py+++ b/tests/gateway/test_import_preserves_tui_cwd.py@@ -34,6 +34,7 @@ assert Path(server._completion_cwd({})) == launch, ()"""],cwd=launch, env=env, capture_output=True, text=True, timeout=60,+ check=False,)assert result.returncode == 0, result.stdout + result.stderrdiff --git a/tests/gateway/test_remote_media_fetch.py b/tests/gateway/test_remote_media_fetch.pyindex bb033a16d9e..2f57b74563d 100644--- a/tests/gateway/test_remote_media_fetch.py+++ b/tests/gateway/test_remote_media_fetch.py@@ -78,7 +78,7 @@ class _ScriptedEnv(BaseEnvironment):def execute(self, command, cwd="", **kwargs):import subprocess- proc = subprocess.run(["bash", "-c", command], capture_output=True, text=True)+ proc = subprocess.run(["bash", "-c", command], capture_output=True, text=True, check=False)return {"output": "echo login-noise\n" + proc.stdout + proc.stderr, "returncode": proc.returncode}diff --git a/tests/gateway/test_signal.py b/tests/gateway/test_signal.pyindex 8d2d0c55e47..f9e9ccab7d8 100644--- a/tests/gateway/test_signal.py+++ b/tests/gateway/test_signal.py@@ -172,6 +172,7 @@ class TestSignalHelpers:"-i", "anullsrc=r=44100:cl=mono", "-t", "0.5","-c:a", "aac", "-f", "adts", adts_path],capture_output=True, timeout=30,+ check=False,)if gen.returncode != 0:import pytestdiff --git a/tests/hermes_cli/plugin_worker_support.py b/tests/hermes_cli/plugin_worker_support.pyindex 09ff622cd12..055c5f36374 100644--- a/tests/hermes_cli/plugin_worker_support.py+++ b/tests/hermes_cli/plugin_worker_support.py@@ -36,7 +36,7 @@ def git(repo: Path, *args: str) -> str:env = {k: v for k, v in os.environ.items() if k not in {"GIT_DIR", "GIT_WORK_TREE", "GIT_INDEX_FILE"}}env.update(GIT_AUTHOR_NAME="fixture", GIT_AUTHOR_EMAIL="[email protected]",GIT_COMMITTER_NAME="fixture", GIT_COMMITTER_EMAIL="[email protected]")- result = subprocess.run(["git", *args], cwd=repo, env=env, capture_output=True, text=True, timeout=30)+ result = subprocess.run(["git", *args], cwd=repo, env=env, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stderrreturn result.stdout.strip()@@ -110,7 +110,7 @@ class PluginWorld:f"assert plugin.register(None) == ({pin!r}, {pin!r})")result = subprocess.run([str(python), "-I", "-B", "-c", code], cwd=self.root,- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stderr@@ -192,6 +192,6 @@ def plugin_world(tmp_path, monkeypatch, isolated_python):'dependencies=["plugin-core-dep==1.0"]\n[tool.uv]\npackage=false\nno-index=true\n'f'find-links=[{json.dumps(wheels.as_posix())}]\n', encoding="utf-8")result = subprocess.run([uv, "lock", "--python", sys.executable], cwd=world.core,- capture_output=True, text=True, timeout=60)+ capture_output=True, text=True, timeout=60, check=False)assert result.returncode == 0, result.stderrreturn world\ No newline at end of filediff --git a/tests/hermes_cli/test_agent_env_advertisement.py b/tests/hermes_cli/test_agent_env_advertisement.pyindex 1e4a5222a74..b204241ff9c 100644--- a/tests/hermes_cli/test_agent_env_advertisement.py+++ b/tests/hermes_cli/test_agent_env_advertisement.py@@ -68,6 +68,7 @@ class TestWrapCommandAdvertisesHarness:out = subprocess.run(["bash", "-c", wrapped], capture_output=True, text=True,env=clean_env, timeout=30,+ check=False,)assert f"AI={HARNESS_ID} HERMES=true" in out.stdout@@ -75,5 +76,6 @@ class TestWrapCommandAdvertisesHarness:out = subprocess.run(["bash", "-c", wrapped], capture_output=True, text=True,env=outer_env, timeout=30,+ check=False,)assert "AI=pi HERMES=false" in out.stdoutdiff --git a/tests/hermes_cli/test_argparse_flag_propagation.py b/tests/hermes_cli/test_argparse_flag_propagation.pyindex 05d65a1cf23..748c4c70b07 100644--- a/tests/hermes_cli/test_argparse_flag_propagation.py+++ b/tests/hermes_cli/test_argparse_flag_propagation.py@@ -126,6 +126,7 @@ print(json.dumps(results))capture_output=True,text=True,timeout=180,+ check=False,)assert result.returncode == 0, (f"driver failed rc={result.returncode}\n"diff --git a/tests/hermes_cli/test_backup_preflight.py b/tests/hermes_cli/test_backup_preflight.pyindex e23e6ea9979..e5668288361 100644--- a/tests/hermes_cli/test_backup_preflight.py+++ b/tests/hermes_cli/test_backup_preflight.py@@ -39,6 +39,7 @@ runpy.run_path(sys.argv[0], run_name='__main__')result = subprocess.run([sys.executable, "-I", "-S", "-c", runner, str(script), str(home)],capture_output=True, text=True, timeout=20,+ check=False,)assert result.returncode == 0, result.stderrbackup = Path(json.loads(result.stdout)["path"])@@ -49,7 +50,7 @@ runpy.run_path(sys.argv[0], run_name='__main__')writer.close()previous = sorted(home.glob("state.db.pre-update-emergency-*.bak"))db.write_bytes(b"broken database")- result = subprocess.run([sys.executable, "-I", "-S", str(script), str(home)], capture_output=True, text=True, timeout=20)+ result = subprocess.run([sys.executable, "-I", "-S", str(script), str(home)], capture_output=True, text=True, timeout=20, check=False)assert result.returncode != 0assert sorted(home.glob("state.db.pre-update-emergency-*.bak")) == previousassert not list(home.glob("*.partial"))diff --git a/tests/hermes_cli/test_boot_convergence.py b/tests/hermes_cli/test_boot_convergence.pyindex 474693e80b5..60fdd35d36b 100644--- a/tests/hermes_cli/test_boot_convergence.py+++ b/tests/hermes_cli/test_boot_convergence.py@@ -134,7 +134,7 @@ print(json.dumps(boot_bootstrap.run_boot_bootstrap(root)))assert time.monotonic() < deadlinetime.sleep(0.02)second = subprocess.run([*command, "go"], env=dict(env, HERMES_HOME=str(other)),- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert second.returncode == 0, second.stderrresult = json.loads(second.stdout.splitlines()[-1])if sibling_profile:@@ -146,7 +146,7 @@ print(json.dumps(boot_bootstrap.run_boot_bootstrap(root)))stdout, stderr = first.communicate(timeout=30)assert first.returncode == 0, stderrassert json.loads(stdout.splitlines()[-1])["home"]["db"]["ok"]- again = subprocess.run([*command, "go"], env=env, capture_output=True, text=True, timeout=30)+ again = subprocess.run([*command, "go"], env=env, capture_output=True, text=True, timeout=30, check=False)assert json.loads(again.stdout.splitlines()[-1]) == {"home": "skipped"}for directory in {home, other}:assert len(list(directory.glob("config.yaml.bak-*"))) == 1@@ -163,7 +163,7 @@ print(json.dumps(boot_bootstrap.run_boot_bootstrap(root)))subprocess.run(['git', '-c', 'user.name=Fixture', '-c', '[email protected]','-c', 'commit.gpgsign=false', 'commit', '--allow-empty', '-qm', 'revision'],cwd=root, check=True)- changed = subprocess.run([*command, 'go'], env=env, capture_output=True, text=True, timeout=30)+ changed = subprocess.run([*command, 'go'], env=env, capture_output=True, text=True, timeout=30, check=False)assert changed.returncode == 0, changed.stderrassert json.loads(changed.stdout.splitlines()[-1])['home']['migrate']['ok']import hermes_yamldiff --git a/tests/hermes_cli/test_cli_import_without_patch_stdout.py b/tests/hermes_cli/test_cli_import_without_patch_stdout.pyindex eff7b0e7faf..8dac17eb814 100644--- a/tests/hermes_cli/test_cli_import_without_patch_stdout.py+++ b/tests/hermes_cli/test_cli_import_without_patch_stdout.py@@ -40,6 +40,7 @@ def _import_cli_without_patch_stdout():text=True,env={"PYTHONPATH": str(PROJECT_ROOT), "PATH": "", "HOME": str(Path.home())},cwd=str(PROJECT_ROOT),+ check=False,)@@ -60,5 +61,6 @@ def test_cli_patch_stdout_falls_back_to_nullcontext():text=True,env={"PYTHONPATH": str(PROJECT_ROOT), "PATH": "", "HOME": str(Path.home())},cwd=str(PROJECT_ROOT),+ check=False,)assert proc.returncode == 0, proc.stderrdiff --git a/tests/hermes_cli/test_cmd_uninstall.py b/tests/hermes_cli/test_cmd_uninstall.pyindex 8fc1cb64e49..0de18f2b6d9 100644--- a/tests/hermes_cli/test_cmd_uninstall.py+++ b/tests/hermes_cli/test_cmd_uninstall.py@@ -55,7 +55,7 @@ def test_module_subprocess_removes_only_the_disposable_home(layout, tmp_path):LOCALAPPDATA=str(tmp_path), PYTHONPATH=str(root), PYTHONUTF8="1")result = subprocess.run([sys.executable, "-m", "hermes_cli.uninstall", "--mode", "data"],cwd=tmp_path, env=env, stdin=subprocess.DEVNULL,- capture_output=True, text=True, encoding="utf-8", timeout=30)+ capture_output=True, text=True, encoding="utf-8", timeout=30, check=False)assert result.returncode == 0, result.stdout + result.stderr# This process's actual source is outside the temp home, unlike layout's# declared source. Managed tools, launchers and sibling profiles survive.diff --git a/tests/hermes_cli/test_commit_build_cli.py b/tests/hermes_cli/test_commit_build_cli.pyindex 51b32a2a535..464e8b53d16 100644--- a/tests/hermes_cli/test_commit_build_cli.py+++ b/tests/hermes_cli/test_commit_build_cli.py@@ -54,7 +54,7 @@ try:finally:print('AUDIT=' + json.dumps(attempts))"""- result = subprocess.run([sys.executable, "-c", script], env=env, cwd=root, capture_output=True, text=True, timeout=45)+ result = subprocess.run([sys.executable, "-c", script], env=env, cwd=root, capture_output=True, text=True, timeout=45, check=False)assert result.returncode == (0 if args == ["--version"] else 2), result.stdout + result.stderrassert "AUDIT=[]" in result.stdout, result.stdout + result.stderrif args == ["--version"]:diff --git a/tests/hermes_cli/test_completion.py b/tests/hermes_cli/test_completion.pyindex a847e81f463..bb02cbbcdf0 100644--- a/tests/hermes_cli/test_completion.py+++ b/tests/hermes_cli/test_completion.py@@ -87,7 +87,7 @@ class TestGenerateBash:f.write(out)path = f.nametry:- result = subprocess.run(["bash", "-n", path], capture_output=True)+ result = subprocess.run(["bash", "-n", path], capture_output=True, check=False)assert result.returncode == 0, result.stderr.decode()finally:os.unlink(path)diff --git a/tests/hermes_cli/test_config_loader_e2e.py b/tests/hermes_cli/test_config_loader_e2e.pyindex 08f2402a2a0..585db19da99 100644--- a/tests/hermes_cli/test_config_loader_e2e.py+++ b/tests/hermes_cli/test_config_loader_e2e.py@@ -48,6 +48,7 @@ def _run_py(code: str, env_extra: dict[str, str], tmp_path: Path) -> dict:env=env,cwd=str(tmp_path),timeout=120,+ check=False,)assert proc.returncode == 0, f"subprocess failed:\n{proc.stdout}\n{proc.stderr}"assert out_file.exists(), f"no result file:\n{proc.stdout}\n{proc.stderr}"diff --git a/tests/hermes_cli/test_dashboard_tui_backcompat.py b/tests/hermes_cli/test_dashboard_tui_backcompat.pyindex c01806f5e23..1d8436c0ee4 100644--- a/tests/hermes_cli/test_dashboard_tui_backcompat.py+++ b/tests/hermes_cli/test_dashboard_tui_backcompat.py@@ -41,6 +41,7 @@ def _run_cli(args, timeout=60):capture_output=True,text=True,timeout=timeout,+ check=False,)diff --git a/tests/hermes_cli/test_data_dir_suffix.py b/tests/hermes_cli/test_data_dir_suffix.pyindex fd7b6879e15..2dc270b919e 100644--- a/tests/hermes_cli/test_data_dir_suffix.py+++ b/tests/hermes_cli/test_data_dir_suffix.py@@ -47,6 +47,7 @@ print(json.dumps(result))[sys.executable, "-c", script], env=env,cwd=Path(__file__).resolve().parents[2],text=True, capture_output=True,+ check=False,)assert result.returncode == 0, result.stderrbase = tmp_path / "AppData" / "Local" / "hermes" if sys.platform == "win32" else tmp_path / ".hermes"diff --git a/tests/hermes_cli/test_doctor_command_install.py b/tests/hermes_cli/test_doctor_command_install.pyindex f10a0a3de91..48f6db07818 100644--- a/tests/hermes_cli/test_doctor_command_install.py+++ b/tests/hermes_cli/test_doctor_command_install.py@@ -100,7 +100,7 @@ def test_pm_fix_publishes_a_generation_aware_launcher(tmp_path, monkeypatch, capassert "Fixed 1 issue" in capsys.readouterr().outassert not command.is_symlink()- result = subprocess.run([str(command)], cwd=tmp_path, capture_output=True, text=True, timeout=30)+ result = subprocess.run([str(command)], cwd=tmp_path, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stdout + result.stderrassert result.stdout.strip() == "selected"assert stale.is_file()diff --git a/tests/hermes_cli/test_doctor_exit_status.py b/tests/hermes_cli/test_doctor_exit_status.pyindex 0ab5b30e787..4be2a0c76fa 100644--- a/tests/hermes_cli/test_doctor_exit_status.py+++ b/tests/hermes_cli/test_doctor_exit_status.py@@ -48,6 +48,7 @@ main()[sys.executable, "-c", program],cwd=Path(__file__).resolve().parents[2],capture_output=True, text=True, encoding="utf-8", timeout=30,+ check=False,)assert result.returncode == int(unresolved), result.stdout + result.stderrassert ("fixture unresolved problem" if unresolved else "All checks passed") in result.stdoutdiff --git a/tests/hermes_cli/test_doctor_legacy_checkout.py b/tests/hermes_cli/test_doctor_legacy_checkout.pyindex 440a2051b4c..ae53b9c3d5d 100644--- a/tests/hermes_cli/test_doctor_legacy_checkout.py+++ b/tests/hermes_cli/test_doctor_legacy_checkout.py@@ -13,6 +13,7 @@ def _git(cwd, *args):result = subprocess.run(["git", "-C", str(cwd), *args],capture_output=True, text=True, encoding="utf-8",+ check=False,)assert result.returncode == 0, f"git {args} failed: {result.stderr}"return result.stdout.strip()diff --git a/tests/hermes_cli/test_early_recovery.py b/tests/hermes_cli/test_early_recovery.pyindex 4b5956a8b19..dedad72cbe0 100644--- a/tests/hermes_cli/test_early_recovery.py+++ b/tests/hermes_cli/test_early_recovery.py@@ -27,6 +27,7 @@ def test_bootstrap_and_pm_cli_work_without_site_packages(tmp_path, prefix):result = subprocess.run([sys.executable, "-S", "-m", "hermes_cli.main", *prefix, "pm", "repair", "--help"],cwd=tmp_path, env=env, capture_output=True, text=True, timeout=60,+ check=False,)assert result.returncode == 0, result.stderrassert "hermes pm repair" in result.stdoutdiff --git a/tests/hermes_cli/test_ensure_windows_bin_launchers.py b/tests/hermes_cli/test_ensure_windows_bin_launchers.pyindex 0d9592abdd8..de8e414f032 100644--- a/tests/hermes_cli/test_ensure_windows_bin_launchers.py+++ b/tests/hermes_cli/test_ensure_windows_bin_launchers.py@@ -431,6 +431,7 @@ def test_repo_gitignores_the_legacy_bin_dir():result = subprocess.run([git, "-C", str(repo_root), "check-ignore", "-q", "bin/hermes.exe"],capture_output=True, env=env,+ check=False,)assert result.returncode == 0, ("bin/hermes.exe is not gitignored — hermes update's autostash "diff --git a/tests/hermes_cli/test_finite_chat_delegation.py b/tests/hermes_cli/test_finite_chat_delegation.pyindex b8be3a76c87..f9e65b94a4f 100644--- a/tests/hermes_cli/test_finite_chat_delegation.py+++ b/tests/hermes_cli/test_finite_chat_delegation.py@@ -130,7 +130,7 @@ def test_finite_chat_joins_parallel_children_before_final_response(tmp_path, mod]try:result = subprocess.run(command, cwd=tmp_path, env=env, stdin=subprocess.DEVNULL,- capture_output=True, text=True, encoding="utf-8", timeout=75)+ capture_output=True, text=True, encoding="utf-8", timeout=75, check=False)finally:server.shutdown()server.server_close()diff --git a/tests/hermes_cli/test_gateway_job_teardown_live.py b/tests/hermes_cli/test_gateway_job_teardown_live.pyindex d4f7f3b4f19..ff9df1ea42e 100644--- a/tests/hermes_cli/test_gateway_job_teardown_live.py+++ b/tests/hermes_cli/test_gateway_job_teardown_live.py@@ -202,7 +202,8 @@ class TestJobObjectMechanismLive:)finally:subprocess.run(- ["taskkill", "/PID", str(pid), "/T", "/F"], capture_output=True+ ["taskkill", "/PID", str(pid), "/T", "/F"], capture_output=True,+ check=False,)def test_non_breakaway_child_killed_by_job_teardown(self, tmp_path):@@ -216,7 +217,8 @@ class TestJobObjectMechanismLive:)finally:subprocess.run(- ["taskkill", "/PID", str(pid), "/T", "/F"], capture_output=True+ ["taskkill", "/PID", str(pid), "/T", "/F"], capture_output=True,+ check=False,)diff --git a/tests/hermes_cli/test_gateway_restart_watcher_bare_python.py b/tests/hermes_cli/test_gateway_restart_watcher_bare_python.pyindex dde7a12f476..69f6df0f98c 100644--- a/tests/hermes_cli/test_gateway_restart_watcher_bare_python.py+++ b/tests/hermes_cli/test_gateway_restart_watcher_bare_python.py@@ -34,7 +34,7 @@ def test_restart_watcher_relaunches_from_an_interpreter_without_site_packages(tmbare = tmp_path / "bare-python"bare.write_text(f'#!/bin/sh\nunset PYTHONPATH\nexec "{sys.executable}" -S "$@"\n', encoding="utf-8")bare.chmod(0o755)- probe = subprocess.run([str(bare), "-c", "import ruamel.yaml"], cwd=REPO, capture_output=True, text=True)+ probe = subprocess.run([str(bare), "-c", "import ruamel.yaml"], cwd=REPO, capture_output=True, text=True, check=False)assert probe.returncode != 0, "premise: the stand-in interpreter must not see site-packages"marker = tmp_path / "respawned"diff --git a/tests/hermes_cli/test_gateway_windows.py b/tests/hermes_cli/test_gateway_windows.pyindex 8c2f072470e..220a846d69f 100644--- a/tests/hermes_cli/test_gateway_windows.py+++ b/tests/hermes_cli/test_gateway_windows.py@@ -69,12 +69,13 @@ def test_exec_schtasks_round_trips_non_ascii_task_argument_live(monkeypatch):created = subprocess.run(["schtasks", "/Create", "/F", "/TN", task, "/SC", "ONLOGON", "/TR", f'wscript.exe //B "C:\\{marker}\\x.vbs"'],capture_output=True, timeout=30,+ check=False,)assert created.returncode == 0, created.stderrtry:code, out, _err = gateway_windows._exec_schtasks(["/Query", "/TN", task, "/XML"])finally:- subprocess.run(["schtasks", "/Delete", "/F", "/TN", task], capture_output=True, timeout=30)+ subprocess.run(["schtasks", "/Delete", "/F", "/TN", task], capture_output=True, timeout=30, check=False)assert code == 0assert marker in out, outdiff --git a/tests/hermes_cli/test_git_pack_tidy.py b/tests/hermes_cli/test_git_pack_tidy.pyindex 1d4c22b081f..b408d43cda9 100644--- a/tests/hermes_cli/test_git_pack_tidy.py+++ b/tests/hermes_cli/test_git_pack_tidy.py@@ -169,7 +169,7 @@ def test_a_refused_or_killed_erase_leaves_git_reading_and_is_finished_later(_git("multi-pack-index", "write", *midx_layout, cwd=clone)assert list(pack_dir.glob("multi-pack-index*"))child = subprocess.run([sys.executable, "-c", _KILLED_MID_ERASE, str(clone)], capture_output=True, text=True, encoding="utf-8",- env={**_GIT_ENV, "PYTHONPATH": str(Path(tidy.__file__).resolve().parents[1])})+ env={**_GIT_ENV, "PYTHONPATH": str(Path(tidy.__file__).resolve().parents[1])}, check=False)assert child.returncode == 9, child.stderrassert not list(pack_dir.glob("multi-pack-index*")), "a killed erase left a multi-pack-index naming a lost pack"assert _objects(clone) == helddiff --git a/tests/hermes_cli/test_git_probe_no_lazy_fetch.py b/tests/hermes_cli/test_git_probe_no_lazy_fetch.pyindex e0a5f92a9fe..47b59605f0a 100644--- a/tests/hermes_cli/test_git_probe_no_lazy_fetch.py+++ b/tests/hermes_cli/test_git_probe_no_lazy_fetch.py@@ -53,7 +53,7 @@ def partial_clone(tmp_path: Path):def _fetched(clone: Path, sha: str) -> bool:env = {**_ENV, "GIT_NO_LAZY_FETCH": "1"}- return subprocess.run(["git", "cat-file", "-e", sha], cwd=clone, env=env, capture_output=True).returncode == 0+ return subprocess.run(["git", "cat-file", "-e", sha], cwd=clone, env=env, capture_output=True, check=False).returncode == 0def test_update_check_ancestry_probe_never_fetches_from_the_promisor(partial_clone):diff --git a/tests/hermes_cli/test_git_trampoline_windows_live.py b/tests/hermes_cli/test_git_trampoline_windows_live.pyindex 4421bf5e5aa..24b1bbda2d5 100644--- a/tests/hermes_cli/test_git_trampoline_windows_live.py+++ b/tests/hermes_cli/test_git_trampoline_windows_live.py@@ -42,7 +42,8 @@ class TestGitTrampolineLive:# Healthy PATH git on the runner: probe must report False and the# probe itself must actually run git (sanity: git exists here).version = subprocess.run(- ["git", "--version"], capture_output=True, text=True, timeout=30+ ["git", "--version"], capture_output=True, text=True, timeout=30,+ check=False,)assert version.returncode == 0, version.stderrassert update_cmd._git_is_trampoline(["git"]) is False@@ -63,7 +64,8 @@ class TestGitTrampolineLive:assert real.exists()assert real.name == "git.exe"probe = subprocess.run(- [str(real), "--version"], capture_output=True, text=True, timeout=30+ [str(real), "--version"], capture_output=True, text=True, timeout=30,+ check=False,)assert probe.returncode == 0assert "git version" in probe.stdout.lower()@@ -81,7 +83,8 @@ class TestGitTrampolineLive:assert real.exists() and real.name == "git.exe"# The healed command must actually work.result = subprocess.run(- healed[:1] + ["--version"], capture_output=True, text=True, timeout=30+ healed[:1] + ["--version"], capture_output=True, text=True, timeout=30,+ check=False,)assert result.returncode == 0assert "switching to real git" in capsys.readouterr().outdiff --git a/tests/hermes_cli/test_gitlock.py b/tests/hermes_cli/test_gitlock.pyindex 6bb56c187b0..08691295b50 100644--- a/tests/hermes_cli/test_gitlock.py+++ b/tests/hermes_cli/test_gitlock.py@@ -315,14 +315,14 @@ def test_a_checkout_the_first_cut_configured_folds_again(partial_clone: Path) ->assert len(_packs(partial_clone)) == 1left = subprocess.run(["git", "config", "--local", "--get-regexp", r"^(maintenance\.auto|gc\.auto)$"],- cwd=partial_clone, capture_output=True, text=True).stdout+ cwd=partial_clone, capture_output=True, text=True, check=False).stdoutassert left == ""def test_non_partial_checkout_is_left_alone(repo: Path) -> None:settle_partial_clone_maintenance(repo)keys = subprocess.run(["git", "config", "--local", "--get-regexp", "maintenance|writecommitgraph"], cwd=repo,- capture_output=True, text=True).stdout+ capture_output=True, text=True, check=False).stdoutassert keys == "", "a full clone keeps git's stock maintenance"diff --git a/tests/hermes_cli/test_kanban_boards.py b/tests/hermes_cli/test_kanban_boards.pyindex 613d4f6a2c6..e2344b33752 100644--- a/tests/hermes_cli/test_kanban_boards.py+++ b/tests/hermes_cli/test_kanban_boards.py@@ -342,6 +342,7 @@ def _cli(args: list[str], env_extra: dict | None = None) -> subprocess.Completedtext=True,cwd=str(_WORKTREE),timeout=30,+ check=False,)diff --git a/tests/hermes_cli/test_kanban_db.py b/tests/hermes_cli/test_kanban_db.pyindex c237079b2ea..22217ebc415 100644--- a/tests/hermes_cli/test_kanban_db.py+++ b/tests/hermes_cli/test_kanban_db.py@@ -1612,7 +1612,7 @@ def test_resolve_hermes_argv_module_actually_runs():os.environ.pop("HERMES_BIN", None)with mock.patch.object(shutil, "which", return_value=None):argv = kbd._resolve_hermes_argv()- r = subprocess.run(argv + ["--version"], capture_output=True, text=True, timeout=30)+ r = subprocess.run(argv + ["--version"], capture_output=True, text=True, timeout=30, check=False)assert r.returncode == 0, (f"`{' '.join(argv)} --version` failed (rc={r.returncode}); "f"stderr={r.stderr[:200]!r}"diff --git a/tests/hermes_cli/test_kanban_worktree_teardown.py b/tests/hermes_cli/test_kanban_worktree_teardown.pyindex 10f64d07e50..1d9458940d7 100644--- a/tests/hermes_cli/test_kanban_worktree_teardown.py+++ b/tests/hermes_cli/test_kanban_worktree_teardown.py@@ -30,6 +30,7 @@ def _git(*args: str, cwd: str | None = None) -> str:encoding="utf-8",errors="replace",timeout=60,+ check=False,)assert result.returncode == 0, f"git {' '.join(args)} failed: {result.stderr}"return result.stdoutdiff --git a/tests/hermes_cli/test_kanban_worktree_unicode_path.py b/tests/hermes_cli/test_kanban_worktree_unicode_path.pyindex 08d8cbbe81d..03327ea6ed4 100644--- a/tests/hermes_cli/test_kanban_worktree_unicode_path.py+++ b/tests/hermes_cli/test_kanban_worktree_unicode_path.py@@ -37,6 +37,7 @@ def _git(repo: Path, *args: str) -> subprocess.CompletedProcess:capture_output=True,text=True,timeout=60,+ check=False,)diff --git a/tests/hermes_cli/test_launcher_runtime_selection.py b/tests/hermes_cli/test_launcher_runtime_selection.pyindex 5cc91062071..f21755813f4 100644--- a/tests/hermes_cli/test_launcher_runtime_selection.py+++ b/tests/hermes_cli/test_launcher_runtime_selection.py@@ -60,6 +60,6 @@ def test_minted_launcher_reads_current_selection_and_editable_members(tmp_path,env = dict(os.environ)env.pop("PYTHONPATH", None)env.pop("PYTHONHOME", None)- result = subprocess.run([str(launcher)], cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30)+ result = subprocess.run([str(launcher)], cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stdout + result.stderrassert result.stdout.strip() == "selected editable"diff --git a/tests/hermes_cli/test_lazy_command_exports.py b/tests/hermes_cli/test_lazy_command_exports.pyindex 896a4799186..fd95a13842f 100644--- a/tests/hermes_cli/test_lazy_command_exports.py+++ b/tests/hermes_cli/test_lazy_command_exports.py@@ -37,6 +37,7 @@ def test_importing_main_does_not_import_command_modules():capture_output=True,text=True,timeout=120,+ check=False,)assert result.returncode == 0, result.stderrdiff --git a/tests/hermes_cli/test_lazy_secrets_dispatch.py b/tests/hermes_cli/test_lazy_secrets_dispatch.pyindex 383acd156a9..1d2f3e732c0 100644--- a/tests/hermes_cli/test_lazy_secrets_dispatch.py+++ b/tests/hermes_cli/test_lazy_secrets_dispatch.py@@ -55,6 +55,7 @@ def _run_hermes(args: list[str], timeout: int = 30) -> subprocess.CompletedProcecwd=str(repo_root),env=env,timeout=timeout,+ check=False,)@@ -207,6 +208,7 @@ sys.exit(0)text=True,cwd=str(repo_root),timeout=60,+ check=False,)assert result.returncode == 0, (f"Decisive main()-level probe failed:\n"diff --git a/tests/hermes_cli/test_lazy_secrets_import.py b/tests/hermes_cli/test_lazy_secrets_import.pyindex 8e3f4b5d7e0..fa66e337fa6 100644--- a/tests/hermes_cli/test_lazy_secrets_import.py+++ b/tests/hermes_cli/test_lazy_secrets_import.py@@ -15,6 +15,7 @@ def _run_isolated(code: str) -> subprocess.CompletedProcess[str]:text=True,cwd=str(repo_root),env={**os.environ, "PYTHONDONTWRITEBYTECODE": "1"},+ check=False,)@@ -102,6 +103,7 @@ sys.exit(0)text=True,cwd=str(repo_root),env={**os.environ, "PYTHONDONTWRITEBYTECODE": "1"},+ check=False,)assert result.returncode == 0, (f"cryptography._rust loaded during update check:\n"diff --git a/tests/hermes_cli/test_legacy_launchers_windows_live.py b/tests/hermes_cli/test_legacy_launchers_windows_live.pyindex 54fbebf9e0b..ba531ecba4e 100644--- a/tests/hermes_cli/test_legacy_launchers_windows_live.py+++ b/tests/hermes_cli/test_legacy_launchers_windows_live.py@@ -40,6 +40,7 @@ def test_status_warns_and_uninstall_removes_pre_suffix_launchers(tmp_path, monkecreate = subprocess.run([schtasks, "/Create", "/F", "/TN", "Hermes_Gateway", "/SC", "ONLOGON", "/TR", f"wscript.exe //B {legacy_pair}"],capture_output=True, text=True, timeout=60,+ check=False,)assert create.returncode == 0, create.stderrtry:@@ -55,10 +56,10 @@ def test_status_warns_and_uninstall_removes_pre_suffix_launchers(tmp_path, monkeassert "Removed legacy pre-suffix Scheduled Task 'Hermes_Gateway'" in outassert not legacy_vbs.exists()assert not legacy_pair.exists()- query = subprocess.run([schtasks, "/Query", "/TN", "Hermes_Gateway"], capture_output=True, text=True, timeout=60)+ query = subprocess.run([schtasks, "/Query", "/TN", "Hermes_Gateway"], capture_output=True, text=True, timeout=60, check=False)assert query.returncode != 0, "the pre-suffix task must be gone after uninstall"gateway_windows.status()assert "legacy pre-suffix" not in capsys.readouterr().outfinally:- subprocess.run([schtasks, "/Delete", "/F", "/TN", "Hermes_Gateway"], capture_output=True, text=True, timeout=60)+ subprocess.run([schtasks, "/Delete", "/F", "/TN", "Hermes_Gateway"], capture_output=True, text=True, timeout=60, check=False)diff --git a/tests/hermes_cli/test_linux_desktop_entry.py b/tests/hermes_cli/test_linux_desktop_entry.pyindex 5480c3d7b10..1675427545f 100644--- a/tests/hermes_cli/test_linux_desktop_entry.py+++ b/tests/hermes_cli/test_linux_desktop_entry.py@@ -800,7 +800,8 @@ def test_app_id_matches_the_desktop_build_identity():repo = Path(__file__).resolve().parents[2]probe = "console.log(require('./apps/desktop/product-identity.cjs').appId)"result = subprocess.run(- [node, "-e", probe], cwd=repo, capture_output=True, text=True, timeout=60+ [node, "-e", probe], cwd=repo, capture_output=True, text=True, timeout=60,+ check=False,)if result.returncode != 0:pytest.skip(f"product-identity.cjs did not evaluate: {result.stderr.strip()[:200]}")diff --git a/tests/hermes_cli/test_macos_tcc_anchor.py b/tests/hermes_cli/test_macos_tcc_anchor.pyindex 920ea8dab31..072f41d666b 100644--- a/tests/hermes_cli/test_macos_tcc_anchor.py+++ b/tests/hermes_cli/test_macos_tcc_anchor.py@@ -601,6 +601,7 @@ class TestAnchoredAliasesBootE2E:capture_output=True,text=True,timeout=120,+ check=False,)assert probe.returncode == 0, (f"{name} failed to boot after anchoring:\n{probe.stderr}"diff --git a/tests/hermes_cli/test_noninteractive_git.py b/tests/hermes_cli/test_noninteractive_git.pyindex 6f0eedc248d..f722d9ebfc6 100644--- a/tests/hermes_cli/test_noninteractive_git.py+++ b/tests/hermes_cli/test_noninteractive_git.py@@ -191,6 +191,7 @@ class TestNoninteractiveGitEnv:return subprocess.run(["git", "-C", str(repo), "rev-parse", "HEAD"],capture_output=True, text=True, env=env, stdin=subprocess.DEVNULL,+ check=False,).returncodeassert _rev_parse(trusted) == 0, "the explicitly trusted repo must stay usable"@@ -264,6 +265,7 @@ def test_git_clone_against_auth_remote_fails_fast(tmp_path: Path):timeout=30,stdin=subprocess.DEVNULL,env=env,+ check=False,)elapsed = time.monotonic() - t0assert proc.returncode != 0diff --git a/tests/hermes_cli/test_old_updater_shims.py b/tests/hermes_cli/test_old_updater_shims.pyindex ec5aaadafc8..5c517d963d5 100644--- a/tests/hermes_cli/test_old_updater_shims.py+++ b/tests/hermes_cli/test_old_updater_shims.py@@ -181,7 +181,7 @@ def test_ensure_uv_stops_both_historical_return_contracts(unpack, status, fresh_else:uv = ensure_uv()# A falsy result is NOT inert: old callers install through pip instead.- subprocess.run([uv, "pip", "install"] if uv else [sys.executable, "-m", "pip", "install"])+ subprocess.run([uv, "pip", "install"] if uv else [sys.executable, "-m", "pip", "install"], check=False)def test_retired_probes_and_refreshes_do_no_work(no_external_work, tmp_path):diff --git a/tests/hermes_cli/test_old_updater_takeover.py b/tests/hermes_cli/test_old_updater_takeover.pyindex f42e060dc38..8b50ca7f690 100644--- a/tests/hermes_cli/test_old_updater_takeover.py+++ b/tests/hermes_cli/test_old_updater_takeover.py@@ -73,7 +73,7 @@ def test_historical_payload_maps_to_takeover_request_schema(tmp_path, desktop, rif not key.startswith(('HERMES_', 'PYTHON', 'UV_'))}env.update(HOME=str(home), HERMES_HOME=str(home))result = subprocess.run([sys.executable, "-B", str(program)], env=env,- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stdout + result.stderrhandoff = json.loads((home / "logs/update_receipts").glob("post_swap_*.json").__next__().read_text())assert handoff["had_desktop_app_before_update"] is desktop@@ -128,6 +128,7 @@ def test_shipped_post_swap_argv_enters_takeover_before_current_cli(tmp_path):[sys.executable, "-B", "-m", "hermes_cli.main", "update", "--yes","--no-gateway-restart", "--branch", "main", "--post-swap", str(handoff)],cwd=root, env=env, capture_output=True, text=True, timeout=30,+ check=False,)assert result.returncode == 0, result.stdout + result.stderrassert not handoff.exists()@@ -190,7 +191,7 @@ def test_takeover_waits_propagates_status_and_never_reenters_old_code(tmp_path,if stdio:env["PYTHONIOENCODING"] = stdioresult = subprocess.run([sys.executable, "-B", str(program)], env=env,- capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=30)+ capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=30, check=False)assert result.returncode == status, result.stdout + result.stderrassert (home / "runs").read_text() == "child\n"assert (home / "cleanup").read_text() == "ran"@@ -238,7 +239,7 @@ def test_only_known_early_updater_restarts_with_original_arguments(tmp_path, posif not key.startswith(("HERMES_", "PYTHON", "UV_"))}env.update(HOME=str(home), HERMES_HOME=str(home))result = subprocess.run([sys.executable, "-B", *argv], env=env,- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stdout + result.stderrrequest = json.loads((home / "request.json").read_text())assert request.get("restart_update", False) is (not post_pull and module_name == "update_cmd")@@ -291,7 +292,7 @@ def test_atexit_recovers_only_stopped_serves_after_cached_update(tmp_path, acknoif not key.startswith(("HERMES_", "PYTHON", "UV_"))}env.update(HOME=str(home), HERMES_HOME=str(home))result = subprocess.run([sys.executable, "-B", str(program)], env=env,- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 7, result.stdout + result.stderrassert (home / "runs").read_text() == "update\ncleanup\n"token = json.loads((home / "token.json").read_text())@@ -347,7 +348,7 @@ def test_serve_resume_child_reuses_respawn_without_updater_or_supervisors(tmp_paif not key.startswith(("HERMES_", "PYTHON", "UV_"))}env.update(HOME=str(home), HERMES_HOME=str(home))result = subprocess.run([sys.executable, "-I", "-B", "-X", "utf8", str(program)],- env=env, capture_output=True, text=True, timeout=30)+ env=env, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == int(spawn_fails or discarded), result.stdout + result.stderrassert json.loads(result_path.read_text()) == {"serves_handled": True}commands = json.loads((home / "commands.json").read_text())@@ -372,6 +373,7 @@ def test_serve_resume_child_leaves_token_unhandled_when_imports_fail(tmp_path):result = subprocess.run([sys.executable, "-I", "-S", "-B", "-X", "utf8", str(root / "hermes_cli/update_serve_resume.py"),str(context), str(result_path)], env=env, capture_output=True, text=True, timeout=30,+ check=False,)assert result.returncode == 1assert json.loads(result_path.read_text()) == {"serves_handled": False}@@ -404,6 +406,7 @@ def test_completed_serve_token_is_acknowledged_without_preparation(tmp_path, enc[sys.executable, "-I", "-S", "-B", str(package / f"{entrypoint}.py"),str(context), str(result_path)], cwd=tmp_path, capture_output=True,text=True, encoding="utf-8", timeout=30,+ check=False,)assert child.returncode == 0, child.stdout + child.stderrassert json.loads(result_path.read_text(encoding="utf-8-sig")) == {"serves_handled": True}@@ -439,6 +442,7 @@ def test_bootstrap_lock_remains_live_without_application_dependencies(tmp_path):prelude + "assert not lock.acquire(), 'live lock was stolen'\n"f"assert lock.holder.pid == {holder_pid}, lock.holder\n"],stdin=subprocess.DEVNULL, capture_output=True, text=True, encoding="utf-8", timeout=30,+ check=False,)finally:holder.communicate("\n", timeout=30)@@ -533,6 +537,7 @@ def test_takeover_arms_the_host_record_without_application_dependencies(tmp_pathf"_arm_fleet_obligation(Path({str(root)!r}))\n"],env={**os.environ, "HERMES_GATEWAY_LOCK_DIR": str(lock_dir), "HERMES_HOME": str(home)},stdin=subprocess.DEVNULL, capture_output=True, text=True, encoding="utf-8", timeout=60,+ check=False,)assert child.returncode == 0, child.stdout + child.stderr[armed] = lock_dir.glob("host-update-restart-*.json") # the install-keyed record (review S3)diff --git a/tests/hermes_cli/test_plan_reconciliation_windows_live.py b/tests/hermes_cli/test_plan_reconciliation_windows_live.pyindex 13ed7b283c3..d9286f20451 100644--- a/tests/hermes_cli/test_plan_reconciliation_windows_live.py+++ b/tests/hermes_cli/test_plan_reconciliation_windows_live.py@@ -136,5 +136,5 @@ def test_plan_reconciliation_live_windows(tmp_path, monkeypatch):for proc in (child, foreign):if proc.poll() is None:# /T: uv's venv python.exe is a trampoline; kill the real interpreter too.- subprocess.run(["taskkill", "/PID", str(proc.pid), "/T", "/F"], capture_output=True)+ subprocess.run(["taskkill", "/PID", str(proc.pid), "/T", "/F"], capture_output=True, check=False)proc.wait()diff --git a/tests/hermes_cli/test_plugin_catalog.py b/tests/hermes_cli/test_plugin_catalog.pyindex e1a7f2ac2db..8f4d26572af 100644--- a/tests/hermes_cli/test_plugin_catalog.py+++ b/tests/hermes_cli/test_plugin_catalog.py@@ -224,7 +224,7 @@ def test_in_tree_catalog_time_does_not_lazy_fetch_on_treeless_clones(tmp_path, mdef local_object_types(repo):out = sp.run(["git", "cat-file", "--batch-all-objects", "--batch-check"], cwd=repo,- capture_output=True, text=True, env=env)+ capture_output=True, text=True, env=env, check=False)return {line.split()[1] for line in out.stdout.splitlines() if line}dst = tmp_path / "treeless"@@ -269,7 +269,7 @@ def test_treeless_checkout_still_outranks_a_doc_fetched_before_the_bump(tmp_pathdef local_object_types(repo):out = sp.run(["git", "cat-file", "--batch-all-objects", "--batch-check"], cwd=repo,- capture_output=True, text=True, env=env)+ capture_output=True, text=True, env=env, check=False)return {line.split()[1] for line in out.stdout.splitlines() if line}dst = tmp_path / "treeless"@@ -282,7 +282,7 @@ def test_treeless_checkout_still_outranks_a_doc_fetched_before_the_bump(tmp_path# pathspec'd probe keeps failing — while the worktree files (and their mtimes) land.sp.run(["git", "-C", str(dst), "checkout", "-q"], check=True, env=env)probe = sp.run(["git", "-C", str(dst), "log", "-1", "--format=%ct", "--", "plugin-catalog"],- capture_output=True, env={**env, "GIT_NO_LAZY_FETCH": "1"})+ capture_output=True, env={**env, "GIT_NO_LAZY_FETCH": "1"}, check=False)assert probe.returncode != 0 # the probe really is blind on this layout, like a real updateold, new = SHA, "a" * 40diff --git a/tests/hermes_cli/test_plugin_install_records_concurrent.py b/tests/hermes_cli/test_plugin_install_records_concurrent.pyindex 03ac4c8f45a..b5a12d14fc1 100644--- a/tests/hermes_cli/test_plugin_install_records_concurrent.py+++ b/tests/hermes_cli/test_plugin_install_records_concurrent.py@@ -34,7 +34,7 @@ def _publish(tmp_path: Path, home: Path, name: str, old: dict, new: dict) -> subreturn subprocess.run([sys.executable, "-c", PROGRAM, str(project), str(staged), str(home / "plugins" / name),json.dumps(old), json.dumps(new)],- env=env, cwd=tmp_path, capture_output=True, text=True, timeout=60)+ env=env, cwd=tmp_path, capture_output=True, text=True, timeout=60, check=False)def test_second_install_keeps_the_first_install_record(tmp_path):diff --git a/tests/hermes_cli/test_plugin_uninstall_windows_live.py b/tests/hermes_cli/test_plugin_uninstall_windows_live.pyindex 5c81953212b..b66abe5e374 100644--- a/tests/hermes_cli/test_plugin_uninstall_windows_live.py+++ b/tests/hermes_cli/test_plugin_uninstall_windows_live.py@@ -65,7 +65,7 @@ def _child_env(home: Path) -> dict:def _hermes(home: Path, *argv: str, timeout: float = 180) -> subprocess.CompletedProcess:return subprocess.run([sys.executable, "-m", "hermes_cli.main", *argv], cwd=str(home),env=_child_env(home), stdin=subprocess.DEVNULL, capture_output=True,- encoding="utf-8", errors="replace", timeout=timeout)+ encoding="utf-8", errors="replace", timeout=timeout, check=False)def _wait(pred, timeout: float) -> bool:@@ -112,7 +112,7 @@ def live_gateway(tmp_path_factory):assert not missing, f"gateway did not load {missing}: {answer}"yield home, procfinally:- subprocess.run(["taskkill", "/PID", str(proc.pid), "/T", "/F"], capture_output=True, timeout=30)+ subprocess.run(["taskkill", "/PID", str(proc.pid), "/T", "/F"], capture_output=True, timeout=30, check=False)proc.wait(timeout=30)log.close()diff --git a/tests/hermes_cli/test_plugin_update_recovery.py b/tests/hermes_cli/test_plugin_update_recovery.pyindex 45c1cbf7563..a2e08e2215a 100644--- a/tests/hermes_cli/test_plugin_update_recovery.py+++ b/tests/hermes_cli/test_plugin_update_recovery.py@@ -41,7 +41,7 @@ if sys.argv[4] == "True":os._exit(17)'''child = subprocess.run([sys.executable, "-c", program, str(project), str(staged), str(target), str(committed)],- env=env, cwd=tmp_path, capture_output=True, text=True, timeout=30)+ env=env, cwd=tmp_path, capture_output=True, text=True, timeout=30, check=False)assert child.returncode == 17, child.stderrrecovery = '''from pathlib import Path@@ -53,7 +53,7 @@ with runtime_lock(project):recover_publication(project)'''result = subprocess.run([sys.executable, "-c", recovery, str(project)], env=env, cwd=tmp_path,- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stderrassert (target / "__init__.py").read_text(encoding="utf-8") == ("new code" if committed else "old code")assert json.loads(metadata.read_text(encoding="utf-8"))["example"]["revision"] == ("new" if committed else "old")diff --git a/tests/hermes_cli/test_plugin_worker_lifecycle.py b/tests/hermes_cli/test_plugin_worker_lifecycle.pyindex f2f752ea5eb..e90dfd2d94d 100644--- a/tests/hermes_cli/test_plugin_worker_lifecycle.py+++ b/tests/hermes_cli/test_plugin_worker_lifecycle.py@@ -54,7 +54,7 @@ def test_declaration_consent_admission_and_resync(plugin_world, monkeypatch, capimport subprocesspython = world.selected() / ("Scripts/python.exe" if os.name == "nt" else "bin/python")result = subprocess.run([str(python), "-I", "-c", "import plugin_proof_dep; assert plugin_proof_dep.__version__ == '2.0'"],- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stderrdiff --git a/tests/hermes_cli/test_plugins_cmd.py b/tests/hermes_cli/test_plugins_cmd.pyindex 2bc77e4c4e9..320e308b01e 100644--- a/tests/hermes_cli/test_plugins_cmd.py+++ b/tests/hermes_cli/test_plugins_cmd.py@@ -157,7 +157,7 @@ class TestGitPullPluginDirAutostash:import subprocess as spdef git(cwd, *args):- r = sp.run(["git", *args], cwd=str(cwd), capture_output=True, text=True)+ r = sp.run(["git", *args], cwd=str(cwd), capture_output=True, text=True, check=False)assert r.returncode == 0, r.stderrreturn r.stdoutdiff --git a/tests/hermes_cli/test_plugins_cmd_catalog.py b/tests/hermes_cli/test_plugins_cmd_catalog.pyindex 6e710ccc861..01931af8f41 100644--- a/tests/hermes_cli/test_plugins_cmd_catalog.py+++ b/tests/hermes_cli/test_plugins_cmd_catalog.py@@ -81,7 +81,7 @@ def world(client, tmp_path, monkeypatch):def _head(path: Path) -> str:- return sp.run(["git", "rev-parse", "HEAD"], cwd=path, capture_output=True, text=True).stdout.strip()+ return sp.run(["git", "rev-parse", "HEAD"], cwd=path, capture_output=True, text=True, check=False).stdout.strip()def test_catalog_platform_mismatch_refuses_before_install(world):diff --git a/tests/hermes_cli/test_post_update_expose_cli.py b/tests/hermes_cli/test_post_update_expose_cli.pyindex cf5df3a15dc..4f57c5e222e 100644--- a/tests/hermes_cli/test_post_update_expose_cli.py+++ b/tests/hermes_cli/test_post_update_expose_cli.py@@ -252,7 +252,7 @@ def test_direct_packaged_cli_exposes_shims_before_electron(tmp_path):# `--help` reaches main()'s boot bootstrap (which owns expose_cli) before argparse# exits; `--version` is answered on the pre-import fast path and never gets there.result = subprocess.run([str(bin_dir / "hermes"), "--help"], env=env,- capture_output=True, text=True, timeout=30, encoding="utf-8")+ capture_output=True, text=True, timeout=30, encoding="utf-8", check=False)assert result.returncode == 0, result.stderrfor name in ("hermes", "hermes-agent", "hermes-acp"):assert (home / ".local/bin" / name).is_symlink()diff --git a/tests/hermes_cli/test_real_home_tripwire.py b/tests/hermes_cli/test_real_home_tripwire.pyindex 6c3898a77e5..0e3454f1a46 100644--- a/tests/hermes_cli/test_real_home_tripwire.py+++ b/tests/hermes_cli/test_real_home_tripwire.py@@ -225,6 +225,7 @@ def test_hermes_exported_scratch_tmp_is_not_the_test_temp_root(tmp_path):result = subprocess.run([sys.executable, "-m", "pytest", "-p", "tests.conftest", "-p", "no:cacheprovider", "-q", str(probe)],cwd=PROJECT_ROOT, env=env, capture_output=True, text=True, timeout=120,+ check=False,)assert result.returncode == 0, result.stdout + result.stderrassert "1 passed" in result.stdoutdiff --git a/tests/hermes_cli/test_redact_config_bridge.py b/tests/hermes_cli/test_redact_config_bridge.pyindex 1f47090bc6d..45bd1f1a5a6 100644--- a/tests/hermes_cli/test_redact_config_bridge.py+++ b/tests/hermes_cli/test_redact_config_bridge.py@@ -64,6 +64,7 @@ def test_redact_secrets_false_in_config_yaml_is_honored(tmp_path):text=True,cwd=str(REPO_ROOT),timeout=30,+ check=False,)assert result.returncode == 0, f"probe failed: {result.stderr}"assert "REDACT_ENABLED=False" in result.stdout, (@@ -107,6 +108,7 @@ def test_redact_secrets_default_true_when_unset(tmp_path):text=True,cwd=str(REPO_ROOT),timeout=30,+ check=False,)assert result.returncode == 0, f"probe failed: {result.stderr}"assert "REDACT_ENABLED=True" in result.stdout@@ -152,6 +154,7 @@ def test_dotenv_redact_secrets_beats_config_yaml(tmp_path):text=True,cwd=str(REPO_ROOT),timeout=30,+ check=False,)assert result.returncode == 0, f"probe failed: {result.stderr}"# .env value winsdiff --git a/tests/hermes_cli/test_review_update_runtime.py b/tests/hermes_cli/test_review_update_runtime.pyindex c1b1a8819fc..61f2ab4b8ba 100644--- a/tests/hermes_cli/test_review_update_runtime.py+++ b/tests/hermes_cli/test_review_update_runtime.py@@ -25,7 +25,7 @@ def test_pre_pm_version_reads_checkout_stamp_without_importing_pm():"print(__version__)\n")result = subprocess.run([sys.executable, "-c", code], cwd=root, capture_output=True,- text=True, encoding="utf-8", timeout=20)+ text=True, encoding="utf-8", timeout=20, check=False)assert result.returncode == 0, result.stderrstamp = root / "install-stamp.json"expected = json.loads(stamp.read_text(encoding="utf-8-sig")).get("baseVersion") if stamp.exists() else Nonediff --git a/tests/hermes_cli/test_service_manager.py b/tests/hermes_cli/test_service_manager.pyindex 0fe6ed9ebed..890a102471e 100644--- a/tests/hermes_cli/test_service_manager.py+++ b/tests/hermes_cli/test_service_manager.py@@ -240,7 +240,7 @@ def test_render_finish_script_does_not_restart_on_clean_exit(tmp_path) -> None:def finish_exit(run_exit_code: int) -> int:proc = subprocess.run(["sh", str(script), str(run_exit_code)],- capture_output=True)+ capture_output=True, check=False)return proc.returncodeassert finish_exit(0) == 125 # clean stop — no restartdiff --git a/tests/hermes_cli/test_setup_hermes_script.py b/tests/hermes_cli/test_setup_hermes_script.pyindex d2e630f790c..98684264ea6 100644--- a/tests/hermes_cli/test_setup_hermes_script.py+++ b/tests/hermes_cli/test_setup_hermes_script.py@@ -7,5 +7,5 @@ SETUP_SCRIPT = REPO_ROOT / "setup-hermes.sh"def test_setup_hermes_script_is_valid_shell():- result = subprocess.run(["bash", "-n", str(SETUP_SCRIPT)], capture_output=True, text=True)+ result = subprocess.run(["bash", "-n", str(SETUP_SCRIPT)], capture_output=True, text=True, check=False)assert result.returncode == 0, result.stderrdiff --git a/tests/hermes_cli/test_setup_pin_values.py b/tests/hermes_cli/test_setup_pin_values.pyindex 9e7a8930ef8..840cc0bdabd 100644--- a/tests/hermes_cli/test_setup_pin_values.py+++ b/tests/hermes_cli/test_setup_pin_values.py@@ -48,7 +48,7 @@ def test_cold_setup_uses_exact_lock_values(tmp_path, missing_target, real_bash):HERMES_RUNTIME_DIR=(tmp_path / "tools").as_posix(), BASH_ENV=hook.as_posix(),PROBE_ARGS=args.as_posix(), PROBE_DOWNLOAD=corrupt.as_posix())result = subprocess.run([real_bash, str(checkout / "setup-hermes.sh")], cwd=tmp_path,- env=env, capture_output=True, text=True, encoding="utf-8", timeout=30)+ env=env, capture_output=True, text=True, encoding="utf-8", timeout=30, check=False)assert result.returncode != 0, result.stdout + result.stderrif missing_target:assert not args.exists(), "a missing target must not select a sibling artifact"diff --git a/tests/hermes_cli/test_shallow_graft_prune.py b/tests/hermes_cli/test_shallow_graft_prune.pyindex e144e9d5ba2..b4dc22bc8c2 100644--- a/tests/hermes_cli/test_shallow_graft_prune.py+++ b/tests/hermes_cli/test_shallow_graft_prune.py@@ -20,7 +20,8 @@ from hermes_cli.gitlock import prune_stale_shallow_graftsdef _git(repo: Path, *args: str) -> str:result = subprocess.run(- ["git", *args], cwd=str(repo), capture_output=True, text=True+ ["git", *args], cwd=str(repo), capture_output=True, text=True,+ check=False,)assert result.returncode == 0, result.stderrreturn result.stdout.strip()diff --git a/tests/hermes_cli/test_shared_metrics_install_run.py b/tests/hermes_cli/test_shared_metrics_install_run.pyindex 2c50a70a7f1..5fa13e8c84c 100644--- a/tests/hermes_cli/test_shared_metrics_install_run.py+++ b/tests/hermes_cli/test_shared_metrics_install_run.py@@ -151,6 +151,7 @@ def test_real_install_sh_ladder_leaves_only_closed_tokens(tmp_path):"--dir", str(tmp_path / "checkout")],env={"HOME": str(tmp_path), "PATH": str(tools), "HERMES_REPO_URL": "https://example.invalid/x.git"},capture_output=True, text=True, encoding="utf-8", timeout=60,+ check=False,)assert result.returncode == 1, result.stdout + result.stderrassert "git is required" in result.stderrdiff --git a/tests/hermes_cli/test_shared_metrics_signals.py b/tests/hermes_cli/test_shared_metrics_signals.pyindex 3d6c6ddb7d7..b43ab0d35ef 100644--- a/tests/hermes_cli/test_shared_metrics_signals.py+++ b/tests/hermes_cli/test_shared_metrics_signals.py@@ -612,7 +612,7 @@ def test_diff_and_record_run_off_the_callers_lock_in_the_owning_profile(marks, mmonkeypatch.setattr(disabled_metrics, "config_transitions", slow)token = set_hermes_home_override(str(tmp_path / "b"))try:- with threading.Lock(): # the caller's write lock (the dashboard's _CONFIG_MUTATION_LOCK)+ with threading.Lock(): # noqa: PLW2101 -- inert on purpose: a stand-in for the caller's _CONFIG_MUTATION_LOCK, which record_config_saved documents running outside of; the caller's write lock (the dashboard's _CONFIG_MUTATION_LOCK)disabled_metrics.record_config_saved({}, {"memory": {"memory_enabled": False}})assert marks.rows == [] # returned without diffingfinally:diff --git a/tests/hermes_cli/test_source_completion_stamp.py b/tests/hermes_cli/test_source_completion_stamp.pyindex e86b4412c03..cdfeb4bbf17 100644--- a/tests/hermes_cli/test_source_completion_stamp.py+++ b/tests/hermes_cli/test_source_completion_stamp.py@@ -157,7 +157,7 @@ def test_completion_runs_under_a_parents_claim_without_releasing_it(tmp_path):"sys.exit(subprocess.call([sys.executable, '-c', sys.argv[1]]))\n")run = subprocess.run([sys.executable, "-c", parent, tail], capture_output=True, timeout=120,- text=True, encoding="utf-8", errors="replace")+ text=True, encoding="utf-8", errors="replace", check=False)assert run.returncode == 0 and run.stdout.strip().splitlines()[-1:] == ["true"], run.stdout + run.stderrassert marker.exists(), "the parent still owns its claim after our tail"@@ -167,7 +167,7 @@ def _verify_bootstrap_receipt(root: Path) -> subprocess.CompletedProcess:"""The same verifier the Windows install/update E2E runs after an update."""script = Path(__file__).resolve().parents[2] / "scripts" / "verify-bootstrap-version-stamp.py"return subprocess.run([sys.executable, "-B", str(script), "--stamp", str(root / ".hermes-bootstrap-complete"),- "--repo", str(root)], capture_output=True, text=True, encoding="utf-8")+ "--repo", str(root)], capture_output=True, text=True, encoding="utf-8", check=False)def test_publishing_checkout_identity_moves_an_installer_receipt_to_head(tmp_path):diff --git a/tests/hermes_cli/test_source_launcher_publication.py b/tests/hermes_cli/test_source_launcher_publication.pyindex da02bf9fb2b..1d84a055640 100644--- a/tests/hermes_cli/test_source_launcher_publication.py+++ b/tests/hermes_cli/test_source_launcher_publication.py@@ -99,7 +99,7 @@ def test_source_launchers_boot_selected_generation_from_custom_home(tmp_path, mocommand = [real_bash, "-s"] if form == "shell" else [str(launcher), *args]script = "exec " + shlex.join([real_bash, str(launcher), *args]) + "\n" if form == "shell" else Noneresult = subprocess.run(command, input=script, cwd=tmp_path, env=env,- capture_output=True, text=True, encoding="utf-8", timeout=30)+ capture_output=True, text=True, encoding="utf-8", timeout=30, check=False)assert result.returncode == 7, result.stdout + result.stderrreceipt = json.loads(result.stdout)assert receipt["value"] == number@@ -121,7 +121,7 @@ def test_launcher_resolves_default_home_at_use_not_publication(tmp_path, monkeypenv = dict(os.environ)env.pop("HERMES_HOME")result = subprocess.run([str(launcher)], cwd=tmp_path, env=env,- capture_output=True, text=True, encoding="utf-8", timeout=30)+ capture_output=True, text=True, encoding="utf-8", timeout=30, check=False)assert result.returncode == 7, result.stdout + result.stderrassert json.loads(result.stdout)["home"] == str(new_user_home / ".hermes")assert json.loads(result.stdout)["value"] == "from-second-user"@@ -162,7 +162,7 @@ def test_profile_publication_preserves_shared_launcher_default_home(tmp_path, moenv["HERMES_HOME"] = str(override)for launcher in launchers:result = subprocess.run([str(launcher)], cwd=tmp_path, env=env,- capture_output=True, text=True, encoding="utf-8", timeout=30)+ capture_output=True, text=True, encoding="utf-8", timeout=30, check=False)assert result.returncode == 7, result.stdout + result.stderrreceipt = json.loads(result.stdout)assert Path(receipt["home"]) == expected@@ -215,7 +215,7 @@ def test_posix_materializer_publishes_only_executable_shell_launchers(tmp_path,# interchangeable with the generated script, even if text decoding agrees.assert launcher.read_bytes() == expectedresult = subprocess.run([str(out / "hermes"), "--print-runtime-command"],- capture_output=True, text=True, encoding="utf-8", timeout=30)+ capture_output=True, text=True, encoding="utf-8", timeout=30, check=False)assert result.returncode == 0, result.stderrassert Path(json.loads(result.stdout)[0]).samefile(_interpreter)before = launcher.stat().st_mtime_ns@@ -231,7 +231,7 @@ def test_materializer_cli_refuses_missing_store_without_publishing(tmp_path, monorphan.touch() # uncommitted tool bytes are not an installed interpreterout = tmp_path / "bin"result = subprocess.run([sys.executable, "-I", str(repo / "hermes_cli/_launchers.py"), str(out)],- cwd=tmp_path, capture_output=True, text=True, encoding="utf-8", timeout=30)+ cwd=tmp_path, capture_output=True, text=True, encoding="utf-8", timeout=30, check=False)assert result.returncode == 1, result.stdout + result.stderrassert "store interpreter" in result.stderrassert not out.exists() or not list(out.iterdir())@@ -264,7 +264,7 @@ def test_boot_migrates_legacy_conveniences_to_selected_runtime(tmp_path, monkeypassert set(result["written"]) == {"hermes", "hermes-acp"}for name in ("hermes", "hermes-acp"):run = subprocess.run([str(out / name), "quoted argument"], cwd=tmp_path,- capture_output=True, text=True, timeout=30, encoding="utf-8")+ capture_output=True, text=True, timeout=30, encoding="utf-8", check=False)assert run.returncode == 7, run.stderrreceipt = json.loads(run.stdout)assert receipt["value"] == "migrated"@@ -298,7 +298,7 @@ def _command_survives_generation_collection(tmp_path, monkeypatch, surface):command = [*_resolve_direct_command(str(launcher)), *args]elif surface == "published":result = subprocess.run([str(launcher), "--print-runtime-command", "--", *args],- capture_output=True, text=True, timeout=30, encoding="utf-8")+ capture_output=True, text=True, timeout=30, encoding="utf-8", check=False)assert result.returncode == 0, result.stderrcommand = json.loads(result.stdout)else:@@ -321,7 +321,7 @@ def _command_survives_generation_collection(tmp_path, monkeypatch, surface):if surface not in ("legacy", "systemd", "launchd"):assert Path(command[0]).samefile(interpreter)assert collect_generations(repo, min_age_seconds=0) == [selected.parent.parent / "old"]- result = subprocess.run(command, cwd=tmp_path, capture_output=True, text=True, timeout=30, encoding="utf-8")+ result = subprocess.run(command, cwd=tmp_path, capture_output=True, text=True, timeout=30, encoding="utf-8", check=False)assert result.returncode == 7, result.stderrreceipt = result.stdoutif surface == "launchd":@@ -372,7 +372,7 @@ def test_running_source_launcher_can_republish_itself(tmp_path, monkeypatch, laucommand = next(Path(p) for p in launchers if Path(p).stem == "hermes")assert command.suffix == (".cmd" if launcher_form == "cmd" else ".exe")result = subprocess.run([str(command)], cwd=tmp_path, capture_output=True,- text=True, encoding="utf-8", timeout=30)+ text=True, encoding="utf-8", timeout=30, check=False)assert result.returncode == 0, result.stdout + result.stderrassert "published 2 2" in result.stdoutassert _launchers.ensure_install_launchers(repo, out)@@ -415,7 +415,7 @@ def test_windows_repair_upgrades_healthy_old_pm_external_launchers(tmp_path, monif not launcher.exists():launcher = local / "hermes.cmd"result = subprocess.run([str(launcher), "--print-runtime-command"], capture_output=True,- text=True, timeout=30, encoding="utf-8")+ text=True, timeout=30, encoding="utf-8", check=False)assert result.returncode == 0, result.stderrassert Path(json.loads(result.stdout)[0]).samefile(interpreter)@@ -452,7 +452,7 @@ def test_pre_pm_base_dependencies_activate_only_at_boot(tmp_path, monkeypatch):(editable / "selected_probe.py").write_text("VALUE = 'base-pth'\n", encoding="utf-8")(site / "member.pth").write_text(str(editable) + "\n", encoding="utf-8")command = _launchers.runtime_command(repo)- result = subprocess.run(command, cwd=tmp_path, capture_output=True, text=True, timeout=30, encoding="utf-8")+ result = subprocess.run(command, cwd=tmp_path, capture_output=True, text=True, timeout=30, encoding="utf-8", check=False)assert result.returncode == 7, result.stderrassert json.loads(result.stdout)["value"] == "base-pth"@@ -461,7 +461,7 @@ def test_external_interpreter_keeps_its_owned_dependencies(tmp_path, monkeypatchmonkeypatch.setenv("HERMES_HOME", str(tmp_path / "home"))monkeypatch.setenv("HERMES_RUNTIME_DIR", str(tmp_path / "empty-store"))command = _launchers.runtime_command(ROOT, code="import ruamel.yaml; print('external-runtime-ready')")- result = subprocess.run(command, cwd=tmp_path, capture_output=True, text=True, timeout=30, encoding="utf-8")+ result = subprocess.run(command, cwd=tmp_path, capture_output=True, text=True, timeout=30, encoding="utf-8", check=False)assert result.returncode == 0, result.stderrassert result.stdout.strip() == "external-runtime-ready"@@ -486,7 +486,7 @@ def test_service_survives_python_tool_replacement(tmp_path, monkeypatch):assert str(store / version) not in unitcommand = shlex.split(next(line.split("=", 1)[1] for line in unit.splitlines() if line.startswith("ExecStart=")))shutil.rmtree(store / "python-A")- result = subprocess.run(command, cwd=tmp_path, capture_output=True, text=True, timeout=30, encoding="utf-8")+ result = subprocess.run(command, cwd=tmp_path, capture_output=True, text=True, timeout=30, encoding="utf-8", check=False)assert result.returncode == 7, result.stderrassert json.loads(result.stdout)["value"] == "ready"@@ -530,7 +530,7 @@ def test_sync_migrates_old_store_wrapper_before_python_collection(tmp_path, monkassert not (home / "skills").exists()shutil.rmtree(store / "python-A")result = subprocess.run([str(out / "hermes")], cwd=tmp_path,- capture_output=True, text=True, timeout=30, encoding="utf-8")+ capture_output=True, text=True, timeout=30, encoding="utf-8", check=False)assert result.returncode == 7, result.stderrassert json.loads(result.stdout)["value"] == "ready"assert Path(json.loads(result.stdout)["exe"]) == store / "python-B/bin/python3"@@ -595,7 +595,7 @@ def test_a_merge_killed_writing_hermes_constants_is_repaired_by_the_next_launch(else:command = _launchers.runtime_command(repo, python=interpreter)result = subprocess.run(command, cwd=tmp_path, env=env, capture_output=True,- text=True, encoding="utf-8", errors="replace", timeout=60)+ text=True, encoding="utf-8", errors="replace", timeout=60, check=False)assert "No module named 'hermes_constants'" not in result.stderr, result.stderrassert result.returncode == 7, result.stdout + result.stderrreceipt = json.loads(result.stdout.strip().splitlines()[-1])diff --git a/tests/hermes_cli/test_source_release_probe.py b/tests/hermes_cli/test_source_release_probe.pyindex 79beae5a534..e4db673b1e6 100644--- a/tests/hermes_cli/test_source_release_probe.py+++ b/tests/hermes_cli/test_source_release_probe.py@@ -18,6 +18,7 @@ def test_invalid_config_refuses_desktop_channel_probe(tmp_path, content):[sys.executable, "-m", "hermes_cli.source_check", "--install-root", str(root), "--home", str(home)],cwd=root, env={**os.environ, "HERMES_HOME": str(home), "HERMES_IGNORE_USER_CONFIG": "0"},capture_output=True, text=True, timeout=30,+ check=False,)assert result.returncode != 0, result.stdout + result.stderrassert '"channel": "main"' not in result.stdoutdiff --git a/tests/hermes_cli/test_startup_fast_guards.py b/tests/hermes_cli/test_startup_fast_guards.pyindex ba82829566f..085f6cf3650 100644--- a/tests/hermes_cli/test_startup_fast_guards.py+++ b/tests/hermes_cli/test_startup_fast_guards.py@@ -62,7 +62,7 @@ def test_cli_starts_from_a_deleted_cwd(tmp_path):result = subprocess.run([sys.executable, "-m", "hermes_cli.main", "--version"],capture_output=True, text=True, timeout=60, env=env,- cwd=REPO_ROOT, preexec_fn=lambda: os.fchdir(fd))+ cwd=REPO_ROOT, preexec_fn=lambda: os.fchdir(fd), check=False)finally:os.close(fd)assert result.returncode == 0, result.stderr@@ -83,6 +83,7 @@ def test_startup_fast_import_weight():text=True,timeout=30,cwd=REPO_ROOT,+ check=False,)assert result.returncode == 0, result.stderrloaded = set(json.loads(result.stdout))@@ -103,6 +104,7 @@ def _run_version(env_overrides: dict) -> subprocess.CompletedProcess:timeout=60,cwd=REPO_ROOT,env=env,+ check=False,)@@ -146,6 +148,7 @@ def test_literal_tilde_hermes_home_expands_before_any_reader(tmp_path):result = subprocess.run([sys.executable, "-m", "hermes_cli.main", "config", "path"],capture_output=True, text=True, timeout=120, cwd=cwd, env=env,+ check=False,)assert result.returncode == 0, result.stderrassert result.stdout.strip() == str(fake_home / ".x" / "config.yaml")@@ -157,6 +160,7 @@ def test_literal_tilde_hermes_home_expands_before_any_reader(tmp_path):probe = subprocess.run([sys.executable, "-c", "import hermes_cli.main, os; print(os.environ['HERMES_HOME'])"],capture_output=True, text=True, timeout=120, cwd=cwd, env=env,+ check=False,)assert probe.returncode == 0, probe.stderrassert probe.stdout.strip() == str(fake_home / ".x")@@ -200,6 +204,7 @@ def test_bootstrap_preserves_live_cwd_and_recovers_deleted_cwd(tmp_path, remove_[sys.executable, "-c", probe, str(cwd), "deleted" if remove_cwd else "live"],stdin=subprocess.DEVNULL, capture_output=True, text=True,timeout=60, cwd=REPO_ROOT, env=env,+ check=False,)assert result.returncode == 0, result.stderrassert result.stdout.strip() == str(REPO_ROOT if remove_cwd else cwd)diff --git a/tests/hermes_cli/test_stderr_timestamp.py b/tests/hermes_cli/test_stderr_timestamp.pyindex 565f391003d..1a0e776f97e 100644--- a/tests/hermes_cli/test_stderr_timestamp.py+++ b/tests/hermes_cli/test_stderr_timestamp.py@@ -93,6 +93,7 @@ def test_wrapper_timestamps_child_stdout_into_its_own_stdout(tmp_path):sys.executable, "-c", code],stdout=out,timeout=30,+ check=False,).returncodeassert rc == 7diff --git a/tests/hermes_cli/test_tag_fetch_partial_clone.py b/tests/hermes_cli/test_tag_fetch_partial_clone.pyindex 8f478484da5..c583b1711cd 100644--- a/tests/hermes_cli/test_tag_fetch_partial_clone.py+++ b/tests/hermes_cli/test_tag_fetch_partial_clone.py@@ -43,7 +43,7 @@ def _git(root: Path, *args: str) -> str:def _config_values(root: Path, key: str) -> list[str]:proc = subprocess.run(["git", "config", "--get-all", key], cwd=root,- capture_output=True, text=True, encoding="utf-8")+ capture_output=True, text=True, encoding="utf-8", check=False)return [line.strip() for line in proc.stdout.splitlines() if line.strip()]diff --git a/tests/hermes_cli/test_update_autostash.py b/tests/hermes_cli/test_update_autostash.pyindex f3239ebad2e..d877f6e8e77 100644--- a/tests/hermes_cli/test_update_autostash.py+++ b/tests/hermes_cli/test_update_autostash.py@@ -283,7 +283,8 @@ def test_bootstrap_marker_not_autostashed_by_update(tmp_path):)# It must not even register as a dirty/untracked change.status = subprocess.run(- ["git", "status", "--porcelain"], cwd=tmp_path, capture_output=True, text=True+ ["git", "status", "--porcelain"], cwd=tmp_path, capture_output=True, text=True,+ check=False,).stdoutassert ".hermes-bootstrap-complete" not in statusdiff --git a/tests/hermes_cli/test_update_completion_process.py b/tests/hermes_cli/test_update_completion_process.pyindex 4bbffedd01d..e8bf9bf5ecd 100644--- a/tests/hermes_cli/test_update_completion_process.py+++ b/tests/hermes_cli/test_update_completion_process.py@@ -227,6 +227,7 @@ def test_old_process_new_git_tree_completes_in_fresh_python(transition, tmp_path[sys.executable, "-c", driver, update_completion.__file__, new, json.dumps(request)],cwd=root, env={**os.environ, "PYTHONPATH": str(root), "HERMES_HOME": request["home"]},capture_output=True, text=True, timeout=30,+ check=False,)assert result.returncode == 0, result.stdout + result.stderrresponse = json.loads(result.stdout.split("RESULT=")[1])diff --git a/tests/hermes_cli/test_update_custody.py b/tests/hermes_cli/test_update_custody.pyindex cb7f48d5d8a..cb1fca94ef0 100644--- a/tests/hermes_cli/test_update_custody.py+++ b/tests/hermes_cli/test_update_custody.py@@ -203,7 +203,7 @@ def _assert_fetch_dies_with_killed_owner(repo, tmp_path, prelude: str) -> None:owner.kill()blocker_pid = Path(f"{started}.self")if blocker_pid.exists():- subprocess.run(["kill", "-9", blocker_pid.read_text(encoding="utf-8-sig").strip()], capture_output=True)+ subprocess.run(["kill", "-9", blocker_pid.read_text(encoding="utf-8-sig").strip()], capture_output=True, check=False)def _state(pid: int) -> str:diff --git a/tests/hermes_cli/test_update_eol_churn.py b/tests/hermes_cli/test_update_eol_churn.pyindex a73322734e1..ec05a8b7f13 100644--- a/tests/hermes_cli/test_update_eol_churn.py+++ b/tests/hermes_cli/test_update_eol_churn.py@@ -92,6 +92,7 @@ def _autocrlf(repo: Path) -> str:cwd=repo,capture_output=True,text=True,+ check=False,)return out.stdout.strip()diff --git a/tests/hermes_cli/test_update_finish.py b/tests/hermes_cli/test_update_finish.pyindex a23296c6d0b..ef0c2d1c29a 100644--- a/tests/hermes_cli/test_update_finish.py+++ b/tests/hermes_cli/test_update_finish.py@@ -87,7 +87,7 @@ def completion(tmp_path, monkeypatch):NPM_CONFIG_OFFLINE="true", NPM_CONFIG_CACHE=str(tmp_path / "npm-cache"))probe = subprocess.run([str(python), "-I", "-c","import importlib.util; assert importlib.util.find_spec('yaml') is None"],- env=env, capture_output=True, text=True)+ env=env, capture_output=True, text=True, check=False)assert probe.returncode == 0, probe.stderrrequest = {"root": str(source), "desktop": False, "assume_yes": True, "gateway_mode": False,@@ -243,7 +243,7 @@ def completion(tmp_path, monkeypatch):'''))def run(fault=""):return subprocess.run([str(python), "-I", "-B", str(runner), str(context), str(result), fault],- cwd=tmp_path, env=env, capture_output=True, text=True, timeout=90)+ cwd=tmp_path, env=env, capture_output=True, text=True, timeout=90, check=False)return source, home / ".hermes", request, context, result, run@@ -379,7 +379,7 @@ def _npm_graph(source):assert node, "source completion acceptance requires Node and npm"for name in ("esbuild", "typescript", "vite"):probe = subprocess.run([node, "-p", f"require.resolve('{name}/package.json')"],- cwd=ROOT, capture_output=True, text=True)+ cwd=ROOT, capture_output=True, text=True, check=False)if probe.returncode:# The Python lane runs without `npm ci`. The real completion path runs in the# install E2E workflow (source updates rebuild the products there).diff --git a/tests/hermes_cli/test_update_host_obligation.py b/tests/hermes_cli/test_update_host_obligation.pyindex 0a27e8526fa..a146504286f 100644--- a/tests/hermes_cli/test_update_host_obligation.py+++ b/tests/hermes_cli/test_update_host_obligation.py@@ -243,7 +243,7 @@ def test_one_installs_completed_restart_never_erases_another_installs_debt(tmp_pcode = (f"import sys\nsys.path.insert(0, {str(roots[install])!r})\n""from hermes_cli.update_host_obligation import *\n" + body)child = subprocess.run([sys.executable, "-I", "-S", "-B", "-c", code], env=env, capture_output=True,- text=True, encoding="utf-8", stdin=subprocess.DEVNULL, timeout=60)+ text=True, encoding="utf-8", stdin=subprocess.DEVNULL, timeout=60, check=False)assert child.returncode == 0, child.stdout + child.stderrreturn child.stdout.strip()diff --git a/tests/hermes_cli/test_update_interrupted_pull.py b/tests/hermes_cli/test_update_interrupted_pull.pyindex 17d044ffb09..3205abb9c04 100644--- a/tests/hermes_cli/test_update_interrupted_pull.py+++ b/tests/hermes_cli/test_update_interrupted_pull.py@@ -190,7 +190,7 @@ def test_restore_runs_the_installers_store_git_when_path_has_none(checkout, monkrepo = os.path.realpath(Path(er.__file__).parent.parent)for entry in ("hermes_cli.main", "agent.legacy_cli", "run_agent", "acp_adapter.entry"):run = subprocess.run([sys.executable, "-c", _ENTRY_SPY, entry], cwd=repo, capture_output=True, text=True,- encoding="utf-8", env={**os.environ, "PYTHONPATH": repo}, timeout=120)+ encoding="utf-8", env={**os.environ, "PYTHONPATH": repo}, timeout=120, check=False)assert run.stdout.strip().splitlines()[-1:] == ["[]"], (entry, run.stdout[-500:], run.stderr[-2000:])@@ -212,7 +212,7 @@ def test_restore_never_touches_user_work_when_git_wrote_nothing(checkout, capsysstale = f"pid=0\npre={_git(root, 'rev-parse', 'HEAD')}\ntarget={b}\nstash=\n"marker.write_text(stale, encoding="utf-8", newline="")merge = subprocess.run(["git", "-C", str(root), "merge", "origin/main"],- capture_output=True, text=True, encoding="utf-8")+ capture_output=True, text=True, encoding="utf-8", check=False)assert (root / ".git" / "MERGE_HEAD").exists(), merge.stdout + merge.stderr(root / "utils.py").write_text("OLD = 1 # resolved by hand\n", encoding="utf-8", newline="")before = _git(root, "status", "--porcelain", "--untracked-files=all")@@ -470,7 +470,7 @@ def test_a_launch_that_cannot_get_the_repair_claim_never_continues_from_the_torn[sys.executable, "-c", "import sys; from pathlib import Path; from hermes_cli import _early_recovery as er; ""er._RESTORE_CLAIM_WAIT_SECONDS = 0.2; er.restore_interrupted_pull(Path(sys.argv[1]))", str(root)],cwd=Path(er.__file__).resolve().parent.parent, capture_output=True, text=True, encoding="utf-8",- timeout=60)+ timeout=60, check=False)finally:er._lock_fd(fd, False)os.close(fd)@@ -951,7 +951,7 @@ def test_a_gone_target_retires_its_marker_only_over_a_clean_pre_tree(tmp_path, t_git(root, "reset", "-q", "--hard", pre)_git(root, "reflog", "expire", "--expire=now", "--all")_git(root, "gc", "-q", "--prune=now")- assert subprocess.run(["git", "-C", str(root), "cat-file", "-e", target]).returncode != 0 # gone+ assert subprocess.run(["git", "-C", str(root), "cat-file", "-e", target], check=False).returncode != 0 # goneif torn:(root / "module.py").write_text("def broken(:\n", encoding="utf-8", newline="")marker = er.interrupted_pull_marker(root)diff --git a/tests/hermes_cli/test_update_launch_completion.py b/tests/hermes_cli/test_update_launch_completion.pyindex 8b75f3ef6f1..9ef11faa8c3 100644--- a/tests/hermes_cli/test_update_launch_completion.py+++ b/tests/hermes_cli/test_update_launch_completion.py@@ -300,7 +300,7 @@ def test_relaunch_keeps_invocation_and_checkout_imports(tmp_path, mode):argv[0] = "-c"orig = [sys.executable, "-c", "import entry", *argv[1:]]command = venv_sync.relaunch_command(Path(sys.executable), root, argv, orig, module)- result = subprocess.run(command, cwd=tmp_path, capture_output=True, text=True, timeout=30)+ result = subprocess.run(command, cwd=tmp_path, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stderrassert json.loads(result.stdout) == ["from checkout", argv[1:]]@@ -376,7 +376,7 @@ def test_relaunch_runs_zip_launchers_and_preserves_interpreter_options(tmp_path)archive.writestr("__main__.py", "import json,sys; print(json.dumps([sys.argv[1:], sys.stdout.write_through, sys.flags.utf8_mode]))")original = [sys.executable, "-u", "-X", "utf8", str(launcher), "arg with spaces"]command = venv_sync.relaunch_command(Path(sys.executable), tmp_path, [str(launcher), "arg with spaces"], original, "__main__")- result = subprocess.run(command, capture_output=True, text=True, timeout=30)+ result = subprocess.run(command, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stderrassert json.loads(result.stdout) == [["arg with spaces"], True, 1]diff --git a/tests/hermes_cli/test_update_lock.py b/tests/hermes_cli/test_update_lock.pyindex f3df6eb1057..67276fad005 100644--- a/tests/hermes_cli/test_update_lock.py+++ b/tests/hermes_cli/test_update_lock.py@@ -756,6 +756,7 @@ class TestAncestryHandoff:result = subprocess.run([sys.executable, "-I", "-B", "-c", middle],capture_output=True, text=True, timeout=120,+ check=False,)assert result.returncode == 0, result.stderrassert "ADOPTED" in result.stdout@@ -793,6 +794,7 @@ class TestAncestryHandoff:result = subprocess.run([sys.executable, "-I", "-S", "-B", "-c", leaf],capture_output=True, text=True, timeout=120,+ check=False,)assert result.returncode == 0, result.stderrassert "REFUSED" in result.stdout@@ -941,6 +943,7 @@ def test_unwritable_lock_file_still_locks_the_checkout(tmp_path):"sys.exit(0 if UpdateLock(path=__import__('pathlib').Path(sys.argv[1]), install_root=sys.argv[2]).acquire() else 3)",str(tmp_path / "b" / ".hermes-update-in-progress"), str(root)],cwd=REPO_ROOT, env={**os.environ, "PYTHONPATH": str(REPO_ROOT)}, stdin=subprocess.DEVNULL, timeout=60,+ check=False,)first.release()assert second.returncode == 3, "a second update ran while the read-only-locked checkout was held"diff --git a/tests/hermes_cli/test_update_lock_windows_live.py b/tests/hermes_cli/test_update_lock_windows_live.pyindex de55be2cb15..95ff1bcb599 100644--- a/tests/hermes_cli/test_update_lock_windows_live.py+++ b/tests/hermes_cli/test_update_lock_windows_live.py@@ -39,7 +39,7 @@ time.sleep(300)def _alive(pid: int) -> bool:out = subprocess.run(["tasklist", "/FI", f"PID eq {pid}", "/NH"], text=True, encoding="utf-8", errors="replace",- capture_output=True).stdout+ capture_output=True, check=False).stdoutreturn str(pid) in out@@ -317,7 +317,7 @@ def test_a_git_child_the_job_refuses_never_runs_unfenced(tmp_path):outcome = _writer_fenced_or_refused(tmp_path, install, [_GIT_REFUSED_OWNER, str(REPO_ROOT), str(install), str(tmp_path / "m")])if outcome == "refused": # refused before it ran: the checkout is untouched- stash = subprocess.run(["git", "-C", str(install), "stash", "list"], capture_output=True)+ stash = subprocess.run(["git", "-C", str(install), "stash", "list"], capture_output=True, check=False)assert stash.stdout == b"", stash@@ -336,7 +336,7 @@ def test_a_refused_job_join_never_runs_the_command(tmp_path):launcher.write_text(_JOIN_JOB, encoding="utf-8")report = tmp_path / "report.txt"out = subprocess.run([sys.executable, "-I", "-S", str(launcher), "0", str(report), sys.executable, "-c", child],- capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=60)+ capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=60, check=False)assert out.returncode == _REFUSED_EXIT, outassert "built" not in out.stdoutassert _CUSTODY_UNAVAILABLE in out.stderr@@ -385,7 +385,7 @@ def _escaping_job_launch(tmp_path: Path, *, process_limit: int = 0):info.lpAttributeList = {"handle_list": [job]}out = subprocess.run([sys.executable, "-I", "-S", str(launcher), str(job), str(tmp_path / "report.txt"),sys.executable, "-c", "print('built')"], startupinfo=info, capture_output=True,- text=True, encoding="utf-8", errors="replace", timeout=60)+ text=True, encoding="utf-8", errors="replace", timeout=60, check=False)usage = _Accounting()assert kernel32.QueryInformationJobObject(job, 1, ctypes.byref(usage), ctypes.sizeof(usage), None), \ctypes.get_last_error()@@ -502,7 +502,7 @@ def test_a_refusal_the_readers_swallow_is_what_the_update_reports(tmp_path):out = subprocess.run([sys.executable, "-c", _SWALLOWING_OWNER.replace("REFUSE_JOBS", refuse), str(REPO_ROOT),str(install)], stdin=subprocess.DEVNULL, capture_output=True, text=True, encoding="utf-8",errors="replace", timeout=120,- env={**os.environ, "HERMES_HOME": str(home), "PYTHONUTF8": "1", "PYTHONIOENCODING": "utf-8"})+ env={**os.environ, "HERMES_HOME": str(home), "PYTHONUTF8": "1", "PYTHONIOENCODING": "utf-8"}, check=False)text = out.stdout + out.stderrassert out.returncode == 1, textassert "`hermes update` stopped: Windows would not put `git` in this update's process job" in text, text@@ -589,7 +589,7 @@ def test_a_build_descendant_left_by_its_leader_never_writes_after_a_normal_releaassert lock.acquire()try:with contained_command(leader, root=install) as (argv, custody):- done = subprocess.run(argv, stdin=subprocess.DEVNULL, capture_output=True, timeout=60, **custody)+ done = subprocess.run(argv, stdin=subprocess.DEVNULL, capture_output=True, timeout=60, **custody, check=False)finally:lock.release()assert done.returncode == 3, donediff --git a/tests/hermes_cli/test_update_narrow_clone_compare_ref.py b/tests/hermes_cli/test_update_narrow_clone_compare_ref.pyindex 3fa96c81b80..b0432a9e1f5 100644--- a/tests/hermes_cli/test_update_narrow_clone_compare_ref.py+++ b/tests/hermes_cli/test_update_narrow_clone_compare_ref.py@@ -24,6 +24,7 @@ git_cmd = ["git"]def _run(root: Path, *args: str) -> subprocess.CompletedProcess[str]:return subprocess.run(["git", *args], cwd=root, capture_output=True, text=True, encoding="utf-8", errors="replace",+ check=False,)diff --git a/tests/hermes_cli/test_update_narrow_clone_refspec.py b/tests/hermes_cli/test_update_narrow_clone_refspec.pyindex 222736e67fb..6b595164adc 100644--- a/tests/hermes_cli/test_update_narrow_clone_refspec.py+++ b/tests/hermes_cli/test_update_narrow_clone_refspec.py@@ -8,7 +8,8 @@ import pytestdef _git(repo: Path, *args: str) -> str:result = subprocess.run(- ["git", *args], cwd=str(repo), capture_output=True, text=True+ ["git", *args], cwd=str(repo), capture_output=True, text=True,+ check=False,)assert result.returncode == 0, result.stderrreturn result.stdout.strip()@@ -67,6 +68,7 @@ def test_check_fetch_materialises_tracking_ref_on_narrow_clone(unresolved = subprocess.run(["git", "-C", str(clone), "rev-parse", "--verify", "--quiet", "origin/main"],capture_output=True,+ check=False,)assert unresolved.returncode != 0diff --git a/tests/hermes_cli/test_update_pause_debt_windows_live.py b/tests/hermes_cli/test_update_pause_debt_windows_live.pyindex 3e39da19ccb..902e6a625af 100644--- a/tests/hermes_cli/test_update_pause_debt_windows_live.py+++ b/tests/hermes_cli/test_update_pause_debt_windows_live.py@@ -235,7 +235,7 @@ def test_a_launch_recovering_an_unready_service_keeps_the_debt_without_stalling(for _ in range(2):done = subprocess.run([sys.executable, "-c", _RECOVERING_LAUNCH], cwd=REPO, capture_output=True,text=True, encoding="utf-8", errors="replace", timeout=300,- env={**os.environ, "HERMES_HOME": str(home), "PYTHONPATH": str(REPO)})+ env={**os.environ, "HERMES_HOME": str(home), "PYTHONPATH": str(REPO)}, check=False)assert done.returncode == 0, done.stdout + done.stderrlaunches.append(json.loads(done.stdout.strip().splitlines()[-1]))finally:diff --git a/tests/hermes_cli/test_update_post_commit_safety.py b/tests/hermes_cli/test_update_post_commit_safety.pyindex bf5e466f5d3..fad22d8bfbe 100644--- a/tests/hermes_cli/test_update_post_commit_safety.py+++ b/tests/hermes_cli/test_update_post_commit_safety.py@@ -172,7 +172,7 @@ def _run_completion(tmp_path: Path, mode: str, *, sqlite: str | None = None) ->child = tmp_path / "child.py"child.write_text(_CHILD, encoding="utf-8")done = subprocess.run([sys.executable, "-B", str(child), str(ROOT), str(cell), mode],- env=env, cwd=tmp_path, capture_output=True, text=True, timeout=240)+ env=env, cwd=tmp_path, capture_output=True, text=True, timeout=240, check=False)assert done.returncode == 0, done.stdout + done.stderrsummary = json.loads((cell / "summary.json").read_text(encoding="utf-8-sig"))summary["output"] = done.stdout + done.stderr@@ -336,7 +336,7 @@ def test_zip_update_never_replays_a_refused_resume_after_the_commit_point(tmp_padriver = tmp_path / "zip_parent.py"driver.write_text(_ZIP_PARENT, encoding="utf-8")done = subprocess.run([sys.executable, "-B", str(driver), str(ROOT), str(cell)],- env=env, cwd=tmp_path, capture_output=True, text=True, timeout=240)+ env=env, cwd=tmp_path, capture_output=True, text=True, timeout=240, check=False)output = done.stdout + done.stderrassert done.returncode == 0, outputassert (home / ".update_exit_code").read_text().strip() == "0", output@@ -385,7 +385,7 @@ def test_old_schema_handoff_receipt_keeps_the_previous_runs_manual_serve_debt(tmdef run(*args):done = subprocess.run([sys.executable, "-B", str(child), str(ROOT), *args],- env=env, capture_output=True, text=True, timeout=120)+ env=env, capture_output=True, text=True, timeout=120, check=False)assert done.returncode == 0, done.stdout + done.stderrdef owed():diff --git a/tests/hermes_cli/test_update_receipt_durability.py b/tests/hermes_cli/test_update_receipt_durability.pyindex 11a8ead1b55..e5cff1a3461 100644--- a/tests/hermes_cli/test_update_receipt_durability.py+++ b/tests/hermes_cli/test_update_receipt_durability.py@@ -31,7 +31,7 @@ def _run(tmp_path: Path, body: str) -> dict:PYTHONPATH=os.pathsep.join([str(ROOT), *filter(None, sys.path)]),PYTHONDONTWRITEBYTECODE="1")done = subprocess.run([sys.executable, str(script), str(ROOT)], env=env, cwd=tmp_path,- text=True, capture_output=True, timeout=60)+ text=True, capture_output=True, timeout=60, check=False)assert done.returncode == 0, done.stdout + done.stderrreturn json.loads((tmp_path / "result.json").read_text(encoding="utf-8"))diff --git a/tests/hermes_cli/test_update_receipt_profile_store.py b/tests/hermes_cli/test_update_receipt_profile_store.pyindex b0cab31aa27..b840a648857 100644--- a/tests/hermes_cli/test_update_receipt_profile_store.py+++ b/tests/hermes_cli/test_update_receipt_profile_store.py@@ -48,7 +48,7 @@ def test_named_profile_sees_update_and_pm_receipts_in_both_directions(tmp_path):HERMES_RUNTIME_DIR=str(tmp_path / "tools"), PYTHONDONTWRITEBYTECODE="1",PYTHONPATH=os.pathsep.join([str(ROOT), *filter(None, sys.path)]))done = subprocess.run([sys.executable, str(script), str(ROOT), str(profile)], env=env, cwd=tmp_path,- text=True, capture_output=True, timeout=60)+ text=True, capture_output=True, timeout=60, check=False)assert done.returncode == 0, done.stdout + done.stderrresult = json.loads((tmp_path / "result.json").read_text(encoding="utf-8"))diff --git a/tests/hermes_cli/test_update_recovery_closure.py b/tests/hermes_cli/test_update_recovery_closure.pyindex 86c6f683e90..a46e3350f2d 100644--- a/tests/hermes_cli/test_update_recovery_closure.py+++ b/tests/hermes_cli/test_update_recovery_closure.py@@ -72,7 +72,7 @@ def _killed_mid_write(tmp_path: Path, rel: str, committed: dict[str, str] | None"from hermes_cli.update_cmd_commit import arm_tree_move; ""arm_tree_move([sys.argv[2]], Path(sys.argv[3]), pre=sys.argv[4], target=sys.argv[5], stash=None)",str(SOURCE), git_exe, str(root), pre, target], env=env, capture_output=True, text=True, encoding="utf-8",- errors="replace", timeout=60)+ errors="replace", timeout=60, check=False)assert armed.returncode == 0, armed.stderr # the updater that armed the move is gonegate = tmp_path / "filter-ready"@@ -120,7 +120,7 @@ def test_a_launch_repairs_a_move_killed_while_writing_the_repairs_own_code(tmp_pif not published:shutil.rmtree(root / ".git/hermes-update-recovery")launch = subprocess.run([str(launcher)], cwd=tmp_path, env=env, capture_output=True, text=True, encoding="utf-8",- errors="replace", timeout=60)+ errors="replace", timeout=60, check=False)assert launch.returncode == 0 and "APP_REACHED" in launch.stdout, launch.stderrassert (root / rel).read_bytes() == originalassert not (root / ".git/hermes-update-pull").exists()@@ -145,7 +145,7 @@ def test_the_published_repair_leaves_the_tree_to_a_live_writer_holding_the_checktry:assert holder.stdout is not None and holder.stdout.readline().strip() == "HELD"launch = subprocess.run([str(launcher)], cwd=tmp_path, env={**env, "PATH": os.pathsep + env["PATH"]},- capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=60)+ capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=60, check=False)assert launch.returncode != 0 and "Not repairing the checkout now" in launch.stderr, launch.stderr# One reason, not a "repairing it" banner followed by the import's traceback (m3).assert "Traceback" not in launch.stderr and "repairing it" not in launch.stderr, launch.stderr@@ -157,7 +157,7 @@ def test_the_published_repair_leaves_the_tree_to_a_live_writer_holding_the_checkholder.kill()holder.wait()launch = subprocess.run([str(launcher)], cwd=tmp_path, env=env, capture_output=True, text=True, encoding="utf-8",- errors="replace", timeout=60)+ errors="replace", timeout=60, check=False)assert launch.returncode == 0 and "APP_REACHED" in launch.stdout, launch.stderrassert (root / "hermes_bootstrap.py").read_bytes() == original@@ -174,7 +174,7 @@ def test_a_damaged_published_closure_is_rebuilt_from_git_objects_not_trusted(tmpmodule.write_bytes(b"" if damage == "truncated" elsemodule.read_bytes() + b"\nprint('NOT_PRE_CODE_RAN', file=__import__('sys').stderr)\n")launch = subprocess.run([str(launcher)], cwd=tmp_path, env=env, capture_output=True, text=True, encoding="utf-8",- errors="replace", timeout=60)+ errors="replace", timeout=60, check=False)assert launch.returncode == 0 and "APP_REACHED" in launch.stdout, launch.stderrassert "NOT_PRE_CODE_RAN" not in launch.stderr, launch.stderrassert (root / "hermes_bootstrap.py").read_bytes() == original@@ -198,7 +198,7 @@ def test_git_object_bytes_that_do_not_hash_to_pres_blob_never_run(tmp_path, corrobj.chmod(0o644)obj.write_bytes(zlib.compress(b"blob %d\0" % len(foreign) + foreign))launch = subprocess.run([str(launcher)], cwd=tmp_path, env=env, capture_output=True, text=True, encoding="utf-8",- errors="replace", timeout=60)+ errors="replace", timeout=60, check=False)assert not ran.exists(), launch.stderrassert (launch.returncode == 0) is not corrupt, launch.stderrassert (root / "hermes_bootstrap.py").exists() is not corrupt@@ -215,7 +215,7 @@ def test_a_stdlib_named_file_in_the_tree_never_runs_before_the_repair(tmp_path,shadow = {"shutil.py": f"open({str(ran)!r}, 'w').close()\nraise ImportError('shadow')\n"} if shadowed else {}root, env, original, launcher = _killed_mid_write(tmp_path, "hermes_bootstrap.py", shadow)launch = subprocess.run([str(launcher)], cwd=tmp_path, env=env, capture_output=True, text=True, encoding="utf-8",- errors="replace", timeout=60)+ errors="replace", timeout=60, check=False)assert not ran.exists(), launch.stderrassert launch.returncode == 0 and "APP_REACHED" in launch.stdout, launch.stderrassert (root / "hermes_bootstrap.py").read_bytes() == originaldiff --git a/tests/hermes_cli/test_update_recovery_custody.py b/tests/hermes_cli/test_update_recovery_custody.pyindex f9b056a3817..a0e4fca8640 100644--- a/tests/hermes_cli/test_update_recovery_custody.py+++ b/tests/hermes_cli/test_update_recovery_custody.py@@ -64,7 +64,7 @@ def test_torn_custody_modules_cannot_authorize_uncontained_repair(tmp_path, live(package / name).write_bytes(b'"""torn')result = subprocess.run([sys.executable, "-I", str(recovery_script), str(root)],cwd=tmp_path, env=env, capture_output=True, text=True,- encoding="utf-8", timeout=30)+ encoding="utf-8", timeout=30, check=False)assert (owner.poll() is None) == live_ownerassert payload.read_bytes() == b"after\n", "repair wrote without verifiable child custody"assert marker.exists(), "unverified custody must retain the interrupted-update record"diff --git a/tests/hermes_cli/test_update_secret_import_lock.py b/tests/hermes_cli/test_update_secret_import_lock.pyindex 32307b9dddc..be461288952 100644--- a/tests/hermes_cli/test_update_secret_import_lock.py+++ b/tests/hermes_cli/test_update_secret_import_lock.py@@ -58,6 +58,7 @@ secrets:timeout=120,cwd=REPO_ROOT,env={**os.environ, "HERMES_HOME": str(home), "BWS_ACCESS_TOKEN": ""},+ check=False,)assert result.returncode == 0, result.stderrline = next(@@ -132,6 +133,7 @@ def test_update_probe_children_skip_external_secret_sources(tmp_path):"print('PROBE=' + repr(_validate_critical_modules_import(__import__('os').getcwd())))"],capture_output=True, text=True, timeout=180, cwd=REPO_ROOT,env={**os.environ, "HERMES_HOME": str(home)},+ check=False,)assert result.returncode == 0, result.stderrassert "PROBE=(True, None, None)" in result.stdout, result.stdout + result.stderrdiff --git a/tests/hermes_cli/test_update_shallow_heal.py b/tests/hermes_cli/test_update_shallow_heal.pyindex 70d5bd0a0a7..ba4d328cabd 100644--- a/tests/hermes_cli/test_update_shallow_heal.py+++ b/tests/hermes_cli/test_update_shallow_heal.py@@ -19,7 +19,7 @@ from hermes_cli.gitlock import convert_treeless_checkout, heal_shallow_historydef _git(cwd: Path, *args: str) -> subprocess.CompletedProcess:return subprocess.run(["git", "-c", "user.email=t@t", "-c", "user.name=t", *args], cwd=cwd,- capture_output=True, text=True, encoding="utf-8", errors="replace")+ capture_output=True, text=True, encoding="utf-8", errors="replace", check=False)def _origin(tmp_path: Path, commits: int) -> Path:@@ -113,12 +113,12 @@ def test_treeless_checkout_gets_its_whole_history_once_so_walks_stay_offline(tmpcheck_out(clone)offline = dict(os.environ, GIT_NO_LAZY_FETCH="1")walk = ["git", "log", "--format=%H", "--", "f.txt"]- assert subprocess.run(walk, cwd=clone, env=offline, capture_output=True).returncode != 0+ assert subprocess.run(walk, cwd=clone, env=offline, capture_output=True, check=False).returncode != 0assert convert_treeless_checkout(clone) is Trueassert _git(clone, "config", "remote.origin.partialclonefilter").stdout.strip() == "blob:none"- walked = subprocess.run(walk, cwd=clone, env=offline, capture_output=True, text=True, encoding="utf-8")+ walked = subprocess.run(walk, cwd=clone, env=offline, capture_output=True, text=True, encoding="utf-8", check=False)assert walked.returncode == 0 and len(walked.stdout.split()) == historyassert convert_treeless_checkout(clone) is Falsediff --git a/tests/hermes_cli/test_update_zip_fallback_guards.py b/tests/hermes_cli/test_update_zip_fallback_guards.pyindex a41244213d9..66c7ae56aad 100644--- a/tests/hermes_cli/test_update_zip_fallback_guards.py+++ b/tests/hermes_cli/test_update_zip_fallback_guards.py@@ -290,6 +290,7 @@ def test_zip_overlay_flag_is_valid_against_real_git(tmp_path):status = subprocess.run(["git", "-C", str(tmp_path), "status", "--porcelain", "--untracked-files=all", "--ignored=matching"],capture_output=True, text=True,+ check=False,).stdoutassert update_cmd._zip_overlay_block_reason(tmp_path) is None, statusdiff --git a/tests/hermes_cli/test_update_zip_two_phase.py b/tests/hermes_cli/test_update_zip_two_phase.pyindex 8309b90c32e..e2cb2231ec0 100644--- a/tests/hermes_cli/test_update_zip_two_phase.py+++ b/tests/hermes_cli/test_update_zip_two_phase.py@@ -700,7 +700,7 @@ def test_a_backup_copy_killed_before_its_rename_is_cleared_by_the_recovery(tmp_p(extracted / "a.py").write_text("new\n", encoding="utf-8")repo = os.path.realpath(Path(update_cmd.__file__).parent.parent)killed = subprocess.run([sys.executable, "-c", _KILLED_BACKUP_COPY, str(live), str(extracted)], cwd=repo,- env={**os.environ, "PYTHONPATH": repo}, capture_output=True, text=True, timeout=120)+ env={**os.environ, "PYTHONPATH": repo}, capture_output=True, text=True, timeout=120, check=False)temps = list(live.glob("a.py.hermes-update-old.*.tmp"))assert killed.returncode == 9 and [p.read_bytes() for p in temps] == [b"ol"], (f"harness: not killed inside the backup copy: {killed.returncode} {killed.stderr[-2000:]}")diff --git a/tests/hermes_cli/test_venv_holder_windows_live.py b/tests/hermes_cli/test_venv_holder_windows_live.pyindex e9a3ee792d2..d891910cc72 100644--- a/tests/hermes_cli/test_venv_holder_windows_live.py+++ b/tests/hermes_cli/test_venv_holder_windows_live.py@@ -185,6 +185,7 @@ class TestAncestorExclusion:text=True,cwd=str(PROJECT_ROOT),timeout=120,+ check=False,)import jsondiff --git a/tests/hermes_cli/test_venv_sync.py b/tests/hermes_cli/test_venv_sync.pyindex 4c174428b8c..e282475e88c 100644--- a/tests/hermes_cli/test_venv_sync.py+++ b/tests/hermes_cli/test_venv_sync.py@@ -25,7 +25,7 @@ REPO_ROOT = Path(__file__).resolve().parents[2]def _run_bare(snippet: str) -> subprocess.CompletedProcess:program = f"import sys\nsys.path.insert(0, {str(REPO_ROOT)!r})\n" + textwrap.dedent(snippet)return subprocess.run([sys.executable, '-I', '-S', '-c', program],- capture_output=True, text=True, cwd=REPO_ROOT, timeout=120)+ capture_output=True, text=True, cwd=REPO_ROOT, timeout=120, check=False)def test_bare_import_and_passive_paths(tmp_path):@@ -155,6 +155,7 @@ class TestCliContract:capture_output=True,text=True,cwd=REPO_ROOT,+ check=False,)assert proc.returncode == 0, proc.stderr@@ -173,6 +174,7 @@ class TestCliContract:capture_output=True,text=True,cwd=REPO_ROOT,+ check=False,)assert proc.returncode == 1diff --git a/tests/hermes_cli/test_web_server_git.py b/tests/hermes_cli/test_web_server_git.pyindex c67c0e9718b..7e08ed24adf 100644--- a/tests/hermes_cli/test_web_server_git.py+++ b/tests/hermes_cli/test_web_server_git.py@@ -265,6 +265,7 @@ def test_worktree_add_from_origin_base_does_not_track(client, repo_with_remote):probe = subprocess.run(["git", "rev-parse", "--abbrev-ref", "fresh@{upstream}"],cwd=repo_with_remote, capture_output=True, text=True,+ check=False,)assert probe.returncode != 0@@ -327,6 +328,7 @@ def test_worktree_add_from_origin_base_on_tag_pinned_clone(tmp_path):upstream = subprocess.run(["git", "rev-parse", "--abbrev-ref", f"{added['branch']}@{{upstream}}"],cwd=clone, capture_output=True, text=True,+ check=False,)assert upstream.returncode != 0diff --git a/tests/hermes_cli/test_worktree.py b/tests/hermes_cli/test_worktree.pyindex 07a709a8ed2..6b937e6fab6 100644--- a/tests/hermes_cli/test_worktree.py+++ b/tests/hermes_cli/test_worktree.py@@ -16,31 +16,36 @@ def git_repo(tmp_path):"""Create a temporary git repo for testing."""repo = tmp_path / "test-repo"repo.mkdir()- subprocess.run(["git", "init"], cwd=repo, capture_output=True)+ subprocess.run(["git", "init"], cwd=repo, capture_output=True, check=False)subprocess.run(["git", "config", "user.email", "[email protected]"],cwd=repo, capture_output=True,+ check=False,)subprocess.run(["git", "config", "user.name", "Test"],cwd=repo, capture_output=True,+ check=False,)# Create initial commit (worktrees need at least one commit)(repo / "README.md").write_text("# Test Repo\n")- subprocess.run(["git", "add", "."], cwd=repo, capture_output=True)+ subprocess.run(["git", "add", "."], cwd=repo, capture_output=True, check=False)subprocess.run(["git", "commit", "-m", "Initial commit"],cwd=repo, capture_output=True,+ check=False,)subprocess.run(["git", "remote", "add", "origin", "https://example.com/test-repo.git"],cwd=repo, capture_output=True,+ check=False,)# Add a fake remote ref so cleanup logic sees the initial commit as# "pushed" when a remote is configured.subprocess.run(["git", "update-ref", "refs/remotes/origin/main", "HEAD"],cwd=repo, capture_output=True,+ check=False,)return repo@@ -50,20 +55,23 @@ def git_repo_no_remote(tmp_path):"""Create a temporary git repo with no configured remotes."""repo = tmp_path / "test-repo-no-remote"repo.mkdir()- subprocess.run(["git", "init"], cwd=repo, capture_output=True)+ subprocess.run(["git", "init"], cwd=repo, capture_output=True, check=False)subprocess.run(["git", "config", "user.email", "[email protected]"],cwd=repo, capture_output=True,+ check=False,)subprocess.run(["git", "config", "user.name", "Test"],cwd=repo, capture_output=True,+ check=False,)(repo / "README.md").write_text("# Test Repo\n")- subprocess.run(["git", "add", "."], cwd=repo, capture_output=True)+ subprocess.run(["git", "add", "."], cwd=repo, capture_output=True, check=False)subprocess.run(["git", "commit", "-m", "Initial commit"],cwd=repo, capture_output=True,+ check=False,)return repo@@ -101,7 +109,7 @@ def test_exit_cleanup_preserves_dirty_worktree(git_repo, tmp_path, monkeypatch,(git_repo / "README.md").write_text("# Test Repo\n")subprocess.run(["git", "add", "."], cwd=git_repo, capture_output=True, check=True)subprocess.run(["git", "commit", "-m", "Initial commit"], cwd=git_repo, capture_output=True, check=True)- subprocess.run(["git", "update-ref", "refs/remotes/origin/main", "HEAD"], cwd=git_repo, capture_output=True)+ subprocess.run(["git", "update-ref", "refs/remotes/origin/main", "HEAD"], cwd=git_repo, capture_output=True, check=False)include = "node_modules/\n"(git_repo / "node_modules").mkdir()(git_repo / "node_modules" / "dep.js").write_text("x\n")@@ -163,16 +171,18 @@ class TestWorktreeLockReaping:subprocess.run(["git", "worktree", "add", str(p), "-b", f"hermes/{name}", "HEAD"],cwd=repo, capture_output=True,+ check=False,)if pid is not None:subprocess.run(["git", "worktree", "lock", "--reason", f"hermes pid={pid}", str(p)],cwd=repo, capture_output=True,+ check=False,)if unpushed:(p / "work.txt").write_text("x")- subprocess.run(["git", "add", "work.txt"], cwd=p, capture_output=True)- subprocess.run(["git", "commit", "-m", "wip"], cwd=p, capture_output=True)+ subprocess.run(["git", "add", "work.txt"], cwd=p, capture_output=True, check=False)+ subprocess.run(["git", "commit", "-m", "wip"], cwd=p, capture_output=True, check=False)if dirty:(p / "dirty.txt").write_text("uncommitted")TestWorktreeLockReaping._age(p, age_h)@@ -226,10 +236,12 @@ class TestWorktreeLockPredicate:subprocess.run(["git", "worktree", "add", str(p), "-b", f"hermes/{name}", "HEAD"],cwd=repo, capture_output=True,+ check=False,)subprocess.run(["git", "worktree", "lock", "--reason", reason, str(p)],cwd=repo, capture_output=True,+ check=False,)return p@@ -239,6 +251,7 @@ class TestWorktreeLockPredicate:subprocess.run(["git", "worktree", "add", str(p), "-b", "hermes/hermes-x", "HEAD"],cwd=git_repo, capture_output=True,+ check=False,)assert worktree_ops._worktree_lock_is_live(str(git_repo), str(p)) is None@@ -276,15 +289,17 @@ class TestWidenedPruner:subprocess.run(["git", "worktree", "add", str(p), "-b", f"wt/{name}", "HEAD"],cwd=repo, capture_output=True,+ check=False,)sha = Noneif commit:(p / "work.txt").write_text(f"work for {name}\n")- subprocess.run(["git", "add", "work.txt"], cwd=p, capture_output=True)- subprocess.run(["git", "commit", "-m", "wip"], cwd=p, capture_output=True)+ subprocess.run(["git", "add", "work.txt"], cwd=p, capture_output=True, check=False)+ subprocess.run(["git", "commit", "-m", "wip"], cwd=p, capture_output=True, check=False)sha = subprocess.run(["git", "rev-parse", "HEAD"], cwd=p,capture_output=True, text=True,+ check=False,).stdout.strip()if dirty:(p / "dirty.txt").write_text("uncommitted")@@ -301,15 +316,18 @@ class TestWidenedPruner:["git", "-c", "[email protected]", "-c", "user.name=Merger","cherry-pick", sha],cwd=repo, capture_output=True,+ check=False,)new_head = subprocess.run(["git", "rev-parse", "HEAD"], cwd=repo,capture_output=True, text=True,+ check=False,).stdout.strip()assert new_head != shasubprocess.run(["git", "update-ref", "refs/remotes/origin/main", new_head],cwd=repo, capture_output=True,+ check=False,)# -- named (non hermes-*) directories are now covered ------------------@@ -355,13 +373,14 @@ class TestWidenedPruner:subprocess.run(["git", "worktree", "add", str(p), "-b", "wt/noremote", "HEAD"],cwd=repo, capture_output=True,+ check=False,)assert worktree_ops._worktree_commits_all_merged_upstream(str(p)) is Truetrunk = subprocess.run(["git", "branch", "--show-current"], cwd=repo, capture_output=True,- text=True).stdout.strip()- subprocess.run(["git", "checkout", "-q", "--detach"], cwd=repo, capture_output=True)- subprocess.run(["git", "branch", "-m", trunk, "scratch/not-a-trunk"], cwd=repo, capture_output=True)+ text=True, check=False).stdout.strip()+ subprocess.run(["git", "checkout", "-q", "--detach"], cwd=repo, capture_output=True, check=False)+ subprocess.run(["git", "branch", "-m", trunk, "scratch/not-a-trunk"], cwd=repo, capture_output=True, check=False)assert worktree_ops._worktree_merge_base_ref(str(p)) is Noneassert worktree_ops._worktree_commits_all_merged_upstream(str(p)) is Falseassert worktree_ops._worktree_has_unpushed_commits(str(p)) is True@@ -414,8 +433,8 @@ class TestMergeVerdictCache:# New local-only work lands in the worktree.(wt / "more.txt").write_text("unmerged work\n")- subprocess.run(["git", "add", "more.txt"], cwd=wt, capture_output=True)- subprocess.run(["git", "commit", "-m", "new work"], cwd=wt, capture_output=True)+ subprocess.run(["git", "add", "more.txt"], cwd=wt, capture_output=True, check=False)+ subprocess.run(["git", "commit", "-m", "new work"], cwd=wt, capture_output=True, check=False)assert worktree_ops._worktree_commits_all_merged_upstream(str(wt), cache=cache) is Falseassert set(cache) != key_after_merge, "moved HEAD must produce a new key"@@ -538,6 +557,7 @@ class TestShallowCloneDeepening:def _run(cmd, cwd):return subprocess.run(cmd, cwd=cwd, capture_output=True, text=True,+ check=False,)@classmethod@@ -565,6 +585,7 @@ class TestShallowCloneDeepening:subprocess.run(["git", "clone", "--depth", "1", f"file://{up}", str(clone)],capture_output=True, text=True,+ check=False,)cls._run(["git", "config", "user.email", "[email protected]"], clone)cls._run(["git", "config", "user.name", "Test"], clone)@@ -710,10 +731,11 @@ class TestPrMergedEscapeHatch:subprocess.run(["git", "worktree", "add", str(p), "-b", f"hermes/{name}", "HEAD"],cwd=repo, capture_output=True,+ check=False,)(p / "salvaged.txt").write_text("diff that was reworked during salvage\n")- subprocess.run(["git", "add", "salvaged.txt"], cwd=p, capture_output=True)- subprocess.run(["git", "commit", "-m", "salvaged work"], cwd=p, capture_output=True)+ subprocess.run(["git", "add", "salvaged.txt"], cwd=p, capture_output=True, check=False)+ subprocess.run(["git", "commit", "-m", "salvaged work"], cwd=p, capture_output=True, check=False)TestPrMergedEscapeHatch._age(p, age_h)return pdiff --git a/tests/hermes_cli/test_worktree_gc.py b/tests/hermes_cli/test_worktree_gc.pyindex 705d0362170..bd1c370f0c0 100644--- a/tests/hermes_cli/test_worktree_gc.py+++ b/tests/hermes_cli/test_worktree_gc.py@@ -34,6 +34,7 @@ def _git(args, cwd, env=None):e.update(env)result = subprocess.run(["git", *args], capture_output=True, text=True, cwd=str(cwd), env=e,+ check=False,)assert result.returncode == 0, f"git {args} failed: {result.stderr}"return result.stdout.strip()@@ -209,6 +210,7 @@ class TestReclaim:probe = subprocess.run(["git", "rev-parse", "--verify", "--quiet", branch],capture_output=True, text=True, cwd=str(repo),+ check=False,)assert probe.returncode != 0, "branch should be gone with its tree"diff --git a/tests/hermes_cli/test_worktree_pushed_tier.py b/tests/hermes_cli/test_worktree_pushed_tier.pyindex 2d3d333a5c2..d95680db3d5 100644--- a/tests/hermes_cli/test_worktree_pushed_tier.py+++ b/tests/hermes_cli/test_worktree_pushed_tier.py@@ -21,7 +21,8 @@ from hermes_cli import worktree_opsdef _run(args, cwd):return subprocess.run(- args, cwd=cwd, capture_output=True, text=True, encoding="utf-8"+ args, cwd=cwd, capture_output=True, text=True, encoding="utf-8",+ check=False,)diff --git a/tests/hermes_cli/test_worktree_sync_base.py b/tests/hermes_cli/test_worktree_sync_base.pyindex f3fbfecfcab..216c8c13809 100644--- a/tests/hermes_cli/test_worktree_sync_base.py+++ b/tests/hermes_cli/test_worktree_sync_base.py@@ -23,7 +23,7 @@ import clidef _run(args, cwd):- return subprocess.run(args, cwd=cwd, capture_output=True, text=True, timeout=30)+ return subprocess.run(args, cwd=cwd, capture_output=True, text=True, timeout=30, check=False)def _commit(repo, name, msg):diff --git a/tests/hermes_state/test_isolation_marker_env.py b/tests/hermes_state/test_isolation_marker_env.pyindex 85d5320ebbe..9353eec4d32 100644--- a/tests/hermes_state/test_isolation_marker_env.py+++ b/tests/hermes_state/test_isolation_marker_env.py@@ -48,6 +48,7 @@ def _spawn_probe(env: dict) -> dict:text=True,env=env,timeout=60,+ check=False,)assert proc.returncode == 0, proc.stderrreturn json.loads(proc.stdout.strip().splitlines()[-1])diff --git a/tests/hermes_state/test_live_db_guard_ancestry.py b/tests/hermes_state/test_live_db_guard_ancestry.pyindex a904a914f18..fedb78d6f9f 100644--- a/tests/hermes_state/test_live_db_guard_ancestry.py+++ b/tests/hermes_state/test_live_db_guard_ancestry.py@@ -79,6 +79,7 @@ def _run_probe(env):text=True,cwd=str(REPO_ROOT),timeout=120,+ check=False,)verdict = result.stdout.strip().splitlines()[-1] if result.stdout.strip() else ""if verdict == "NO-ROOT":diff --git a/tests/hermes_state/test_live_db_isolation_guard.py b/tests/hermes_state/test_live_db_isolation_guard.pyindex 6ebd1f31d7f..d7061dd24ce 100644--- a/tests/hermes_state/test_live_db_isolation_guard.py+++ b/tests/hermes_state/test_live_db_isolation_guard.py@@ -166,6 +166,7 @@ class TestSubprocessChildCovered:text=True,env=env,timeout=120,+ check=False,)assert proc.returncode != 0assert "live-system guard" in proc.stderr@@ -192,6 +193,7 @@ class TestSubprocessChildCovered:text=True,env=env,timeout=120,+ check=False,)assert proc.returncode == 0, proc.stderrassert "OK" in proc.stdoutdiff --git a/tests/hermes_state/test_sqlite_lock_safe_inspection.py b/tests/hermes_state/test_sqlite_lock_safe_inspection.pyindex 92978296740..c4fa58238c3 100644--- a/tests/hermes_state/test_sqlite_lock_safe_inspection.py+++ b/tests/hermes_state/test_sqlite_lock_safe_inspection.py@@ -59,6 +59,7 @@ def _external_writer_can_break_in(db_path) -> bool:capture_output=True,text=True,timeout=60,+ check=False,)return "ACQUIRED" in result.stdoutdiff --git a/tests/hermes_state/test_state_db_repair_loop_mtime.py b/tests/hermes_state/test_state_db_repair_loop_mtime.pyindex 08e8e74775b..4fca00cc6d5 100644--- a/tests/hermes_state/test_state_db_repair_loop_mtime.py+++ b/tests/hermes_state/test_state_db_repair_loop_mtime.py@@ -347,6 +347,7 @@ def test_live_connection_keeps_its_write_lock_across_a_repair_pass(tmp_path):capture_output=True,text=True,timeout=60,+ check=False,).stdout.strip()assert out in {"WROTE", "BLOCKED"}, f"unexpected peer output: {out!r}"return out == "WROTE"diff --git a/tests/install/e2e-assets/launch-capture/pm-launch.py b/tests/install/e2e-assets/launch-capture/pm-launch.pyindex 14d04fd2cfa..9551ff92f19 100644--- a/tests/install/e2e-assets/launch-capture/pm-launch.py+++ b/tests/install/e2e-assets/launch-capture/pm-launch.py@@ -28,7 +28,7 @@ def main() -> int:command[3] = f"import runpy; runpy.run_path({str(capture)!r}); " + command[3]env = os.environ.copy()env["HERMES_E2E_CAPTURE_LAUNCH"] = spec- return subprocess.run(command, env=env).returncode+ return subprocess.run(command, env=env, check=False).returncodeif __name__ == "__main__":diff --git a/tests/installation/test_installer_common.py b/tests/installation/test_installer_common.pyindex ffc2e4ca1f8..c98c568fe3b 100644--- a/tests/installation/test_installer_common.py+++ b/tests/installation/test_installer_common.py@@ -44,7 +44,7 @@ arm_source_redirect "$2" "$3" "$4"def run(body):return subprocess.run(["bash", "-c", setup + body, "bash", str(HELPER), str(repo), str(work), str(serve), old, new],- env=env, text=True, capture_output=True, timeout=30)+ env=env, text=True, capture_output=True, timeout=30, check=False)result = run('''[ "$(git -C "$2" remote get-url origin)" = 'https://github.com/NousResearch/hermes-agent.git' ]git clone -q https://github.com/NousResearch/hermes-agent.git "$3/clone"diff --git a/tests/integration/test_local_runtime_pm_download.py b/tests/integration/test_local_runtime_pm_download.pyindex 2edc07a16ec..3dba634e2c8 100644--- a/tests/integration/test_local_runtime_pm_download.py+++ b/tests/integration/test_local_runtime_pm_download.py@@ -97,7 +97,7 @@ def test_live_pinned_cuda_download_pause_resume_and_execute(tmp_path, monkeypatc"artifacts": pinned, "binary": str(engine.binary), "commands": {}}for argument in ("--version", "--list-devices"):run = subprocess.run([str(engine.binary), argument], cwd=engine.binary.parent,- capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=60)+ capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=60, check=False)assert run.returncode == 0, run.stdout + run.stderrreceipt["commands"][argument] = run.stdout + run.stderrdlls = sorted(engine.binary.parent.glob("*.dll"))diff --git a/tests/plugins/browser/check_parity_vs_main.py b/tests/plugins/browser/check_parity_vs_main.pyindex 1ef61df180e..d9b379ab38c 100644--- a/tests/plugins/browser/check_parity_vs_main.py+++ b/tests/plugins/browser/check_parity_vs_main.py@@ -195,6 +195,7 @@ def _run_scenario(repo_path: Path, label: str, config_yaml: str, env: dict) -> dcapture_output=True,text=True,timeout=30,+ check=False,)if out.returncode != 0:return {diff --git a/tests/plugins/image_gen/check_parity_vs_main.py b/tests/plugins/image_gen/check_parity_vs_main.pyindex ca40cb5e13d..d5f316d5395 100644--- a/tests/plugins/image_gen/check_parity_vs_main.py+++ b/tests/plugins/image_gen/check_parity_vs_main.py@@ -191,6 +191,7 @@ def _run_scenario(repo_path: Path, label: str, config_yaml: str, env: dict) -> dcapture_output=True,text=True,timeout=60,+ check=False,)if out.returncode != 0:return {diff --git a/tests/plugins/test_kanban_dashboard_plugin.py b/tests/plugins/test_kanban_dashboard_plugin.pyindex 41235ecc999..2c0a1e57866 100644--- a/tests/plugins/test_kanban_dashboard_plugin.py+++ b/tests/plugins/test_kanban_dashboard_plugin.py@@ -1123,6 +1123,7 @@ def test_touch_card_tap_opens_instead_of_dragging():result = subprocess.run([node, str(probe), str(bundle)],capture_output=True, text=True, timeout=30,+ check=False,)assert result.returncode == 0, f"stdout={result.stdout!r} stderr={result.stderr!r}"assert "PASS" in result.stdoutdiff --git a/tests/plugins/transcription/check_parity_vs_main.py b/tests/plugins/transcription/check_parity_vs_main.pyindex c6ad8370bcf..499082f17ac 100644--- a/tests/plugins/transcription/check_parity_vs_main.py+++ b/tests/plugins/transcription/check_parity_vs_main.py@@ -317,6 +317,7 @@ def _run_scenario(repo_path: Path, label: str, config_yaml: str, env: dict, plugcapture_output=True,text=True,timeout=60,+ check=False,)if out.returncode != 0:return {diff --git a/tests/plugins/tts/check_parity_vs_main.py b/tests/plugins/tts/check_parity_vs_main.pyindex b3dcf87cecc..fdca53ce234 100644--- a/tests/plugins/tts/check_parity_vs_main.py+++ b/tests/plugins/tts/check_parity_vs_main.py@@ -231,6 +231,7 @@ def _run_scenario(repo_path: Path, label: str, config_yaml: str, env: dict, plugcapture_output=True,text=True,timeout=60,+ check=False,)if out.returncode != 0:return {diff --git a/tests/pm/_fixtures.py b/tests/pm/_fixtures.pyindex 730e6fbbb77..a15f7f166b1 100644--- a/tests/pm/_fixtures.py+++ b/tests/pm/_fixtures.py@@ -56,7 +56,7 @@ def stage_host_python(python: Path) -> Path:def _run(command, *, cwd: Path, env: dict) -> str:- result = subprocess.run(command, cwd=cwd, env=env, capture_output=True, text=True, timeout=60)+ result = subprocess.run(command, cwd=cwd, env=env, capture_output=True, text=True, timeout=60, check=False)assert result.returncode == 0, result.stderrreturn result.stdout.strip()diff --git a/tests/pm/activation_support.py b/tests/pm/activation_support.pyindex 7c9f9bb7247..3821b4ab2a1 100644--- a/tests/pm/activation_support.py+++ b/tests/pm/activation_support.py@@ -99,6 +99,7 @@ def can_spawn(python: Path) -> bool:text=True,timeout=30,env=child_env(),+ check=False,)return r.returncode == 0except Exception:diff --git a/tests/pm/test_activate_fish.py b/tests/pm/test_activate_fish.pyindex 52325a6bd42..687249e50fe 100644--- a/tests/pm/test_activate_fish.py+++ b/tests/pm/test_activate_fish.py@@ -26,6 +26,7 @@ def _fish(root: Path, env: dict, script: str, tmp_path: Path) -> subprocess.Compreturn subprocess.run(["fish", "--no-config", "-c", script.replace("@ACTIVATE@", posix(root / "activate.fish"))],cwd=tmp_path, env=env, capture_output=True, text=True, timeout=60,+ check=False,)diff --git a/tests/pm/test_activate_scripts.py b/tests/pm/test_activate_scripts.pyindex 26ed40d1bbd..e30afee3cab 100644--- a/tests/pm/test_activate_scripts.py+++ b/tests/pm/test_activate_scripts.py@@ -21,7 +21,8 @@ from tests.pm.activation_support import (def test_bash_scripts_pass_syntax_check():for script in (ACTIVATE, SETUP_HERMES_SH):result = subprocess.run(- [bash(), "-n", posix(script)], capture_output=True, text=True, env=child_env()+ [bash(), "-n", posix(script)], capture_output=True, text=True, env=child_env(),+ check=False,)assert result.returncode == 0, f"{script.name}: {result.stderr}"@@ -41,6 +42,7 @@ def test_source_activate_exports_the_pm_env(tmp_path: Path):text=True,cwd=posix(tmp_path),env=bash_env(store),+ check=False,)assert result.returncode == 0, result.stderrassert result.stdout == "env-ok"@@ -66,6 +68,7 @@ def test_activate_exports_the_sentinel_to_child_processes(tmp_path: Path):text=True,cwd=posix(tmp_path),env=bash_env(store),+ check=False,)assert result.returncode == 0, result.stderrassert result.stdout.strip() == "exported-then-cleared"@@ -88,6 +91,7 @@ def test_deactivate_restores_the_prior_shell(tmp_path: Path):text=True,cwd=posix(tmp_path),env=bash_env(store),+ check=False,)assert result.returncode == 0, result.stderrassert result.stdout.strip() == "restored"@@ -114,6 +118,7 @@ def test_activate_leaves_the_shell_paths_in_posix_form(tmp_path: Path):text=True,cwd=posix(tmp_path),env=bash_env(store),+ check=False,)assert result.returncode == 0, result.stderrassert result.stdout.strip() == "posix"@@ -132,6 +137,7 @@ def test_activate_fails_cleanly_without_a_store(tmp_path: Path):text=True,cwd=posix(tmp_path),env=env,+ check=False,)# Without any provisioned python the source must refuse — never# silently no-op with a half-activated shell.@@ -159,6 +165,7 @@ def test_powershell_scripts_parse():],capture_output=True,text=True,+ check=False,)assert result.returncode == 0, f"{script.name}: {result.stdout}{result.stderr}"@@ -181,6 +188,7 @@ def test_powershell_activate_exports_and_deactivates(tmp_path: Path):"Write-Output ('active=' + $env:PYTHONPATH); deactivate; ""Write-Output ('after=' + $env:PYTHONPATH)"],capture_output=True, text=True, cwd=str(tmp_path), env=env, timeout=40,+ check=False,)assert result.returncode == 0, result.stdout + result.stderr# Nothing is committed, so the checkout alone: the bootstrap .venv's packages never leak in.diff --git a/tests/pm/test_activation_runtime.py b/tests/pm/test_activation_runtime.pyindex 28c1aed1e88..5df19de7ea3 100644--- a/tests/pm/test_activation_runtime.py+++ b/tests/pm/test_activation_runtime.py@@ -53,7 +53,7 @@ def test_bash_cold_sync_changed_input_and_warm_noop(tmp_path, canary):! declare -F deactivate >/dev/null'''run = subprocess.run([bash(), "-c", script], cwd=tmp_path, env=env,- capture_output=True, text=True, timeout=40)+ capture_output=True, text=True, timeout=40, check=False)assert run.returncode == 0, run.stdout + run.stderrfirst, second, warm = run.stdout.splitlines()assert first.startswith(str(root) + os.pathsep) and "/first/venv/" in first@@ -86,7 +86,7 @@ def test_bash_setup_failure_preserves_caller(tmp_path, already_active):printf preserved'''run = subprocess.run([bash(), "-c", script], cwd=tmp_path, env=env,- capture_output=True, text=True, timeout=40)+ capture_output=True, text=True, timeout=40, check=False)assert run.returncode == 0, run.stdout + run.stderrassert run.stdout == "preserved"calls = (root / "calls.jsonl").read_text(encoding="utf-8").splitlines()@@ -130,7 +130,7 @@ def test_powershell_cold_sync_changed_input_warm_and_failure(tmp_path):$env:PYTHONHOME -ne 'caller-home' -or $env:VIRTUAL_ENV -ne 'caller-venv') {{ throw 'restore failed' }}''', encoding="utf-8")run = subprocess.run([ps, "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-File", str(script)],- cwd=tmp_path, env=env, capture_output=True, text=True, timeout=90)+ cwd=tmp_path, env=env, capture_output=True, text=True, timeout=90, check=False)assert run.returncode == 0, run.stdout + run.stderrselected = [line.removeprefix("selection=") for line in run.stdout.splitlines() if line.startswith("selection=")]assert len(selected) == 3diff --git a/tests/pm/test_activation_setup.py b/tests/pm/test_activation_setup.pyindex fd5d298e9cf..dafdbbe9014 100644--- a/tests/pm/test_activation_setup.py+++ b/tests/pm/test_activation_setup.py@@ -99,6 +99,7 @@ def test_activation_real_setup_pm_lifecycle(tmp_path, served):locked = subprocess.run([uv, "lock", "--offline", "--python", interpreter], cwd=core, env=env,capture_output=True, text=True, timeout=60,+ check=False,)assert locked.returncode == 0, locked.stdout + locked.stderrdependency_lock = (core / "uv.lock").read_bytes()@@ -119,6 +120,7 @@ def test_activation_real_setup_pm_lifecycle(tmp_path, served):"project=Path(sys.argv[1]) / 'pm', offline=False)",str(core), uv, interpreter, str(seed)],cwd=tmp_path, env=seed_env, capture_output=True, text=True, timeout=180,+ check=False,)assert seeded.returncode == 0, seeded.stdout + seeded.stderrshutil.rmtree(seed)@@ -184,6 +186,7 @@ test "${PYTHONPATH-}" = "$prior_pythonpath" || exit 96result = subprocess.run([bash, "--noprofile", "--norc", "-c", script, "activation-test", str(core)],cwd=tmp_path, env=env, capture_output=True, text=True, timeout=90,+ check=False,)assert _snapshot(protected) == untouched, result.stdout + result.stderrassert (result.returncode == 0) is succeeds, result.stdout + result.stderrdiff --git a/tests/pm/test_bootstrap_import_closure.py b/tests/pm/test_bootstrap_import_closure.pyindex 5b24464460c..3c1f794ff46 100644--- a/tests/pm/test_bootstrap_import_closure.py+++ b/tests/pm/test_bootstrap_import_closure.py@@ -33,7 +33,7 @@ assert facts.path.is_file()print(root)"""result = subprocess.run([sys.executable, "-S", "-c", script], cwd=stage, env=env,- capture_output=True, text=True, timeout=15)+ capture_output=True, text=True, timeout=15, check=False)assert result.returncode == 0, result.stdout + result.stderrassert Path(result.stdout.strip()) == store@@ -52,7 +52,7 @@ assert callable(sign_managed_python)"""result = subprocess.run([sys.executable, "-S", "-c", script], cwd=repo,env=dict(os.environ, HERMES_HOME=str(tmp_path / "home")),- capture_output=True, text=True, timeout=15)+ capture_output=True, text=True, timeout=15, check=False)assert result.returncode == 0, result.stderr@@ -81,5 +81,5 @@ assert result.returncode == 0, result"""result = subprocess.run([sys.executable, "-S", "-c", script], cwd=repo,env=dict(os.environ, HERMES_HOME=str(tmp_path / "home")),- capture_output=True, text=True, timeout=60)+ capture_output=True, text=True, timeout=60, check=False)assert result.returncode == 0, result.stdout + result.stderrdiff --git a/tests/pm/test_cold_runtime_e2e.py b/tests/pm/test_cold_runtime_e2e.pyindex 0c07cd983bd..6d54429edbd 100644--- a/tests/pm/test_cold_runtime_e2e.py+++ b/tests/pm/test_cold_runtime_e2e.py@@ -37,7 +37,7 @@ class _ArchiveHandler(SimpleHTTPRequestHandler):def _run(command, *, cwd, env, expected=0, timeout=240):result = subprocess.run(command, cwd=cwd, env=env, capture_output=True,- text=True, timeout=timeout)+ text=True, timeout=timeout, check=False)assert result.returncode == expected, (f"{command!r}\nexit={result.returncode}\n{result.stdout}\n{result.stderr}")diff --git a/tests/pm/test_environment_script.py b/tests/pm/test_environment_script.pyindex 29775961462..0c2ac373d91 100644--- a/tests/pm/test_environment_script.py+++ b/tests/pm/test_environment_script.py@@ -43,7 +43,7 @@ def _shell(dialect: str) -> list[str]:@pytest.mark.parametrize("dialect", ["sh", "fish"])def test_a_real_shell_reads_every_value_back_unchanged(dialect):script = shell_exports(NASTY, dialect) + "\n" + PROBE- run = subprocess.run([*_shell(dialect), script], capture_output=True, text=True, timeout=30)+ run = subprocess.run([*_shell(dialect), script], capture_output=True, text=True, timeout=30, check=False)assert run.returncode == 0, run.stderrassert run.stdout.split("\0")[:-1] == list(NASTY.values())@@ -54,6 +54,7 @@ def test_fish_keeps_path_variables_as_lists():run = subprocess.run([*_shell("fish"), script + "\nprintf '%s ' (count $PATH) (count $PYTHONPATH)"],capture_output=True, text=True, timeout=30,+ check=False,)assert run.returncode == 0, run.stderrassert run.stdout.split() == ["2", "2"]@@ -63,7 +64,7 @@ def test_fish_keeps_path_variables_as_lists():def test_fish_read_only_variables_do_not_abort_the_script():script = shell_exports({"PWD": "/elsewhere", "SHLVL": "9", "AFTER": "reached"}, "fish")run = subprocess.run([*_shell("fish"), script + "\nprintf %s $AFTER"],- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert run.returncode == 0 and run.stderr == "", run.stderrassert run.stdout == "reached"diff --git a/tests/pm/test_install_state_permissions.py b/tests/pm/test_install_state_permissions.pyindex 2faffb737a5..cb1f118b4b6 100644--- a/tests/pm/test_install_state_permissions.py+++ b/tests/pm/test_install_state_permissions.py@@ -40,6 +40,7 @@ import hermes_bootstrap[sys.executable, "-S", "-c", code, str(target), phase],env={**os.environ, "PYTHONPATH": str(root)},capture_output=True, text=True, timeout=30,+ check=False,)assert result.returncode == 1, result.stderrassert result.stderr.count("hermes: ") == 1@@ -71,6 +72,7 @@ raise SystemExit(main(["repair"]))[sys.executable, "-c", code, str(target)],env={**os.environ, "PYTHONPATH": str(root)},capture_output=True, text=True, timeout=30,+ check=False,)assert result.returncode == 1, result.stderrassert "install state is not writable by this user" in result.stderrdiff --git a/tests/pm/test_no_lazy_deps.py b/tests/pm/test_no_lazy_deps.pyindex fe95f5c823a..339aaa62e89 100644--- a/tests/pm/test_no_lazy_deps.py+++ b/tests/pm/test_no_lazy_deps.py@@ -62,6 +62,7 @@ def _run_checker(root: Path) -> subprocess.CompletedProcess:capture_output=True,text=True,timeout=120,+ check=False,)diff --git a/tests/pm/test_node_resolution.py b/tests/pm/test_node_resolution.pyindex 93b7b1491eb..9a3caf71de1 100644--- a/tests/pm/test_node_resolution.py+++ b/tests/pm/test_node_resolution.py@@ -374,7 +374,7 @@ def test_lsp_node_server_inherits_pm_runtime_and_preserves_overrides(node_store,assert server is not Nonespec = server.build_spawn(str(tmp_path), ctx)assert spec is not None- child = subprocess.run(spec.command, env=spec.env, capture_output=True, text=True, timeout=10)+ child = subprocess.run(spec.command, env=spec.env, capture_output=True, text=True, timeout=10, check=False)assert child.returncode == 0, child.stderrobserved = json.loads(child.stdout)assert shutil.which("node", path=observed["path"]) == str(node)diff --git a/tests/pm/test_pm_authority.py b/tests/pm/test_pm_authority.pyindex bbc836da476..3a9d42ce802 100644--- a/tests/pm/test_pm_authority.py+++ b/tests/pm/test_pm_authority.py@@ -258,6 +258,7 @@ def test_killed_replacement_recovers_on_next_install(pm_env, route, interruptionchild = subprocess.run([sys.executable, "-c", code, str(env["lockfile_path"]), route, interruption],env=dict(os.environ), capture_output=True, text=True, timeout=30,+ check=False,)assert child.returncode == 17, child.stderrassert Facts(paths.facts_path()).get("faketool") == old_factdiff --git a/tests/pm/test_receipt.py b/tests/pm/test_receipt.pyindex f7fadc7f86b..be97826700c 100644--- a/tests/pm/test_receipt.py+++ b/tests/pm/test_receipt.py@@ -106,6 +106,7 @@ print(json.dumps(row))child = subprocess.run([sys.executable, "-S", "-c", code], cwd=repo, env=dict(os.environ),capture_output=True, text=True, encoding="utf-8", timeout=30,+ check=False,)assert child.returncode == 0, child.stdout + child.stderrrow = json.loads(child.stdout)diff --git a/tests/pm/test_runtime.py b/tests/pm/test_runtime.pyindex 1fc3164d500..426875f25ad 100644--- a/tests/pm/test_runtime.py+++ b/tests/pm/test_runtime.py@@ -40,7 +40,7 @@ assert importlib.util.find_spec("yaml") is Noneprint(json.dumps({{"prefix": sys.prefix, "yaml": importlib.util.find_spec("ruamel.yaml").origin}}))"""result = subprocess.run([str(python), "-I", "-B", "-c", code], env=env,- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stdout + result.stderrreport = json.loads(result.stdout)assert Path(report["yaml"]).is_relative_to(Path(report["prefix"]))@@ -50,7 +50,7 @@ print(json.dumps({{"prefix": sys.prefix, "yaml": importlib.util.find_spec("ruamerepaired = prepare_runtime(Path(uv), Path(sys.executable), tmp_path / "runtime", offline=True)assert repaired != pythonchecked = subprocess.run([str(repaired), "-I", "-B", "-c", code], env=env,- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert checked.returncode == 0, checked.stdout + checked.stderr@@ -131,7 +131,7 @@ def test_sealed_worker_command_uses_only_its_recorded_site(tmp_path, monkeypatchscript.write_text("import sys,json; print(json.dumps(sys.path))")monkeypatch.setattr(paths, "repo_root", lambda: repo)command = runtime_command(script)- result = subprocess.run(command, cwd=tmp_path, capture_output=True, text=True, timeout=30)+ result = subprocess.run(command, cwd=tmp_path, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stderrentries = json.loads(result.stdout)assert str(site) in entriesdiff --git a/tests/pm/test_runtime_bootstrap_tls.py b/tests/pm/test_runtime_bootstrap_tls.pyindex 4c3c561ef18..943e45da557 100644--- a/tests/pm/test_runtime_bootstrap_tls.py+++ b/tests/pm/test_runtime_bootstrap_tls.py@@ -54,12 +54,12 @@ print(result.stdout)probe = tmp_path / "probe.py"probe.write_text("import json, truststore; print(json.dumps({'tls': truststore.__file__}))")command = [sys.executable, "-I", "-S", "-c", code, str(stage), str(probe)]- result = subprocess.run(command, cwd=tmp_path, env=env, capture_output=True, text=True, timeout=180)+ result = subprocess.run(command, cwd=tmp_path, env=env, capture_output=True, text=True, timeout=180, check=False)assert result.returncode == 0, result.stdout + result.stderrassert Path(json.loads(result.stdout)["tls"]).is_relative_to(home)assert "Preparing the isolated Hermes runtime" in result.stderrassert "must-not-fetch.invalid" not in result.stderr- warm = subprocess.run(command, cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30)+ warm = subprocess.run(command, cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30, check=False)assert warm.returncode == 0, warm.stdout + warm.stderrassert "Preparing the isolated Hermes runtime" not in warm.stderrassert warm.stdout == result.stdout@@ -161,13 +161,13 @@ raise SystemExit(module['main']())command = [str(python), "-I", "-B", "-c", driver, str(tmp_path / "missing-ca"),str(repo / "pm" / "launch.py"), str(repo), "install", "tls-test"]rejected = subprocess.run(command, cwd=tmp_path, env=env,- capture_output=True, text=True, timeout=60)+ capture_output=True, text=True, timeout=60, check=False)assert rejected.returncode == 1, rejected.stdout + rejected.stderrassert "CERTIFICATE_VERIFY_FAILED" in rejected.stdout + rejected.stderrassert not list((home / "tools").glob("tls-test-*/payload.txt"))command[5] = str(bundle)result = subprocess.run(command, cwd=tmp_path, env=env,- capture_output=True, text=True, timeout=60)+ capture_output=True, text=True, timeout=60, check=False)assert result.returncode == 0, result.stdout + result.stderrinstalled = list((home / "tools").glob("tls-test-*/payload.txt"))assert len(installed) == 1, result.stdout + result.stderr@@ -271,7 +271,7 @@ Download([Source(sys.argv[2], dest, sys.argv[4])], partials_dir=dest.parent / "pf"https://127.0.0.1:{server.server_port}/tool", str(dest),hashlib.sha256(payload).hexdigest()],env={**env, "SSL_CERT_FILE": str(tmp_path / f"{name}.pem")},- capture_output=True, text=True, timeout=60)+ capture_output=True, text=True, timeout=60, check=False)finally:server.shutdown()server.server_close()diff --git a/tests/pm/test_runtime_selection.py b/tests/pm/test_runtime_selection.pyindex c867fedfbe3..da1547d567b 100644--- a/tests/pm/test_runtime_selection.py+++ b/tests/pm/test_runtime_selection.py@@ -59,7 +59,7 @@ def test_boot_uses_one_selected_dependency_tree_in_fresh_process(tmp_path, monke"print(importlib.util.find_spec('base_only') is None)")process = subprocess.run([sys.executable, "-c", code, str(root), str(site_of(base))],- env=dict(os.environ), text=True, capture_output=True, timeout=30)+ env=dict(os.environ), text=True, capture_output=True, timeout=30, check=False)assert process.returncode == 0, process.stderrassert process.stdout.splitlines() == ["new", "True"]@@ -95,7 +95,7 @@ def test_boot_puts_the_checkout_launcher_ahead_of_the_venvs_own_console_script(t"activate_dependencies(Path(sys.argv[1])); print(os.environ.get('PATH', ''))")process = subprocess.run([sys.executable, "-c", code, str(root)],- env=dict(os.environ), text=True, capture_output=True, timeout=30)+ env=dict(os.environ), text=True, capture_output=True, timeout=30, check=False)assert process.returncode == 0, process.stderrentries = process.stdout.strip().split(os.pathsep)assert entries.index(str(checkout_bin)) < entries.index(str(venv_bin))@@ -116,7 +116,7 @@ def test_broken_environment_keeps_explicit_repair_entry_reachable(tmp_path, monkrecord.write_text(json.dumps({"packages": {"venv": {"environment": str(tmp_path / "missing")}}}))code = "import sys; sys.argv = ['hermes', *sys.argv[1:]]; import hermes_bootstrap; print('bootstrap-ready')"result = subprocess.run([sys.executable, "-c", code, *command], env=dict(os.environ),- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert (result.returncode == 0) is allowed, result.stderrif not allowed:assert "hermes pm repair" in result.stderr@@ -142,7 +142,7 @@ def test_manual_repair_bypasses_damaged_generation_activation(tmp_path, monkeypa}}}), encoding="utf-8")env = {**os.environ, "PYTHONPATH": str(repo)}result = subprocess.run([sys.executable, "-S", "-m", "hermes_cli.main", "pm", "repair", "--help"],- cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30)+ cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stderrassert "hermes pm repair" in result.stdout@@ -183,7 +183,7 @@ def test_boot_never_activates_the_pre_pm_venv(tmp_path, monkeypatch, interpreter"print('legacy importable:', importlib.util.find_spec('legacy_only') is not None)")result = subprocess.run([python, "-I", "-c", code, str(repo), str(root)], env=dict(os.environ),- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stderrexpected = ("refused: no dependency environment is committed" if interpreter == "store"else "legacy importable: False")diff --git a/tests/pm/test_runtime_wheelhouse.py b/tests/pm/test_runtime_wheelhouse.pyindex 9988a263c5b..b2390cf29bd 100644--- a/tests/pm/test_runtime_wheelhouse.py+++ b/tests/pm/test_runtime_wheelhouse.py@@ -98,6 +98,7 @@ print(json.dumps({canonicalize_name(d.metadata['Name']): d.version[str(runtime / marker["python"]), "-I", "-S", "-B", "-c", probe,str(runtime / marker["sitePackages"])],cwd=tmp_path, env=runtime_environment(), capture_output=True, text=True, timeout=30,+ check=False,)assert result.returncode == 0, result.stderrassert json.loads(result.stdout) == versionsdiff --git a/tests/pm/test_setup_lock_format.py b/tests/pm/test_setup_lock_format.pyindex 02896afa986..404fec92112 100644--- a/tests/pm/test_setup_lock_format.py+++ b/tests/pm/test_setup_lock_format.py@@ -86,6 +86,7 @@ def test_setup_reads_pins_independent_of_indentation(tmp_path, served, indent, bresult = subprocess.run([bash, str(core / "setup-hermes.sh"), "--runtime-only"], cwd=tmp_path,env=env, capture_output=True, text=True, timeout=30,+ check=False,)assert result.returncode == 0, result.stdout + result.stderrassert (runtime / f"uv-{uv_version}-{target}" / "uv").read_text() == uv_scriptdiff --git a/tests/pm/test_shell_discovery.py b/tests/pm/test_shell_discovery.pyindex a2129da1caf..afbcf245af9 100644--- a/tests/pm/test_shell_discovery.py+++ b/tests/pm/test_shell_discovery.py@@ -31,6 +31,7 @@ def test_local_transport_finds_conventional_bash_without_path(monkeypatch, tmp_pchild = subprocess.run([selected, "--noprofile", "--norc", "-c", "printf shell-ready"],cwd=tmp_path, capture_output=True, text=True, timeout=10,+ check=False,)assert child.returncode == 0, child.stderrassert child.stdout == "shell-ready"diff --git a/tests/pm/test_source_launcher_stages.py b/tests/pm/test_source_launcher_stages.pyindex 020d589b194..29d9a850fd0 100644--- a/tests/pm/test_source_launcher_stages.py+++ b/tests/pm/test_source_launcher_stages.py@@ -78,7 +78,7 @@ exit 0env['PATHEXT'] = '.COM;.EXE;.BAT;.CMD'env.pop('UV_PYTHON_INSTALL_DIR', None)result = subprocess.run([str(powershell), '-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Bypass', '-File', str(wrapper)],- cwd=tmp_path, env=env, capture_output=True, timeout=90)+ cwd=tmp_path, env=env, capture_output=True, timeout=90, check=False)assert result.returncode == 0, result.stdout + result.stderrassert b'REACHED_PATH_PUBLICATION' in result.stdoutassert calls.read_text(encoding='utf-8-sig').splitlines() == [@@ -89,7 +89,7 @@ exit 0child_env = dict(env)child_env.pop('HERMES_HOME', None)child = subprocess.run([str(command), 'from-powershell'], cwd=tmp_path, env=child_env,- capture_output=True, text=True, encoding='utf-8', timeout=30)+ capture_output=True, text=True, encoding='utf-8', timeout=30, check=False)assert child.returncode == 7, child.stdout + child.stderrwitness = json.loads(child.stdout)assert witness['value'] == 11 and witness['argv'] == ['from-powershell']diff --git a/tests/pm/test_source_update_launch.py b/tests/pm/test_source_update_launch.pyindex 4f2c28c83a3..7d16ba8be13 100644--- a/tests/pm/test_source_update_launch.py+++ b/tests/pm/test_source_update_launch.py@@ -124,7 +124,7 @@ def test_source_python_pin_update_survives_real_gc(source_launch, tmp_path, monkcommand = _launchers.installation_command(root, module="source_probe")(site_packages(selected_venv(root)) / "selected_probe.py").write_text("VALUE = 'A'\n")child_env = {**os.environ, "HERMES_DISABLE_LAZY_INSTALLS": "1"}- before = subprocess.run(command, env=child_env, capture_output=True, text=True, timeout=30)+ before = subprocess.run(command, env=child_env, capture_output=True, text=True, timeout=30, check=False)assert before.returncode == 0, before.stderrassert json.loads(before.stdout)["executable"] == str(old_python)@@ -175,7 +175,7 @@ def test_source_python_pin_update_survives_real_gc(source_launch, tmp_path, monkassert cmd_gc(None) == 0assert not old_python.exists(), "real PM GC did not remove the superseded Python"assert new_python.is_file()- after = subprocess.run(command, env=child_env, capture_output=True, text=True, timeout=30)+ after = subprocess.run(command, env=child_env, capture_output=True, text=True, timeout=30, check=False)assert after.returncode == 0, after.stderrassert json.loads(after.stdout) == {"executable": str(new_python), "value": "B"}@@ -223,6 +223,7 @@ def _fact(root):probe = subprocess.run([str(selected / "bin" / "python"), "-I", "-c", "import json,sys; print(json.dumps(sys.prefix))"],capture_output=True, text=True, timeout=30,+ check=False,)assert probe.returncode == 0, probe.stderrassert Path(json.loads(probe.stdout)) == selected@@ -417,6 +418,7 @@ def test_real_bootstrap_reexecs_before_app_imports(source_launch, tmp_path, isol"from pathlib import Path; from pm.environments import activate_dependencies; "f"activate_dependencies(Path({str(root)!r}))"],capture_output=True, text=True, timeout=30,+ check=False,)assert activation_probe.returncode == 0, activation_probe.stderrassert activated_old.is_file(), "positive control did not execute the old activation hook"@@ -432,6 +434,7 @@ def test_real_bootstrap_reexecs_before_app_imports(source_launch, tmp_path, isolresult = subprocess.run([str(isolated_python), *invocation, *args], cwd=root,env=dict(os.environ), capture_output=True, text=True, timeout=60,+ check=False,)assert result.returncode == 0, result.stderroutput = json.loads(result.stdout)@@ -486,6 +489,7 @@ def test_failed_launch_completion_degrades_to_a_warning(source_launch, tmp_path,result = subprocess.run([str(isolated_python), str(entry), *argv], cwd=root,env=dict(os.environ), capture_output=True, text=True, timeout=60,+ check=False,)assert result.returncode == 0, result.stderrdiff --git a/tests/pm/test_startup_recovery.py b/tests/pm/test_startup_recovery.pyindex 3a2e8a87d7e..567cea4d31f 100644--- a/tests/pm/test_startup_recovery.py+++ b/tests/pm/test_startup_recovery.py@@ -147,6 +147,7 @@ def test_bootstrap_repairs_before_dependency_activation(tmp_path, monkeypatch, mcontrol = subprocess.run([sys.executable, "-S", "-c", f"import site; site.addsitedir({str(old_site)!r}); import startup_dep"],cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30,+ check=False,)assert control.returncode != 0 and "No module named 'startup_dep'" in control.stderrif old_site.is_dir():@@ -159,6 +160,7 @@ def test_bootstrap_repairs_before_dependency_activation(tmp_path, monkeypatch, mrefused = subprocess.run([sys.executable, "-S", str(launcher)], cwd=tmp_path,env=env, capture_output=True, text=True, timeout=90,+ check=False,)assert refused.returncode != 0assert "retry limit reached" in refused.stderr@@ -166,13 +168,14 @@ def test_bootstrap_repairs_before_dependency_activation(tmp_path, monkeypatch, massert marker.exists()assert set(receipts.glob("pm_*.json")) == before_receiptsrepaired = subprocess.run([sys.executable, "-S", "-m", "pm.cli", "repair"], cwd=tmp_path,- env=env, capture_output=True, text=True, timeout=90)+ env=env, capture_output=True, text=True, timeout=90, check=False)assert repaired.returncode == 0, repaired.stdout + repaired.stderrassert not marker.exists()result = subprocess.run([sys.executable, "-S", str(launcher)], cwd=tmp_path,env=env, capture_output=True, text=True,encoding="utf-8", timeout=90,+ check=False,)assert result.returncode == 0, result.stdout + result.stderroutput = json.loads(result.stdout)@@ -205,6 +208,7 @@ def test_bootstrap_repairs_before_dependency_activation(tmp_path, monkeypatch, magain = subprocess.run([sys.executable, "-S", str(launcher)], cwd=tmp_path,env=env, capture_output=True, text=True, encoding="utf-8", timeout=90,+ check=False,)assert again.returncode == 0, again.stdout + again.stderrassert json.loads(again.stdout) == outputdiff --git a/tests/pm/test_takeover_preparation.py b/tests/pm/test_takeover_preparation.pyindex 35886cee3e2..e6a045672d4 100644--- a/tests/pm/test_takeover_preparation.py+++ b/tests/pm/test_takeover_preparation.py@@ -80,7 +80,7 @@ def test_fresh_takeover_prepares_generation_and_runs_selected_python(tmp_path):context, result = tmp_path / "context.json", tmp_path / "result.json"context.write_text(json.dumps({"root": str(root), "home": str(home)}), encoding="utf-8")completed = subprocess.run([sys.executable, "-I", "-S", "-B", str(root / "hermes_cli/_update_takeover.py"), str(context), str(result)],- env=env, cwd=tmp_path, capture_output=True, text=True, timeout=120)+ env=env, cwd=tmp_path, capture_output=True, text=True, timeout=120, check=False)assert completed.returncode == 0, completed.stdout + completed.stderroutput = json.loads(result.read_text())assert Path(output['python']).is_relative_to(store)@@ -106,7 +106,7 @@ def test_fresh_takeover_prepares_generation_and_runs_selected_python(tmp_path):with (root / "uv.lock").open("a", encoding="utf-8") as changed:changed.write("\n# changed source inputs\n")repaired = subprocess.run([sys.executable, "-I", "-S", "-B", str(root / "hermes_cli/_update_takeover.py"), str(context), str(result)],- env=env, cwd=tmp_path, capture_output=True, text=True, timeout=120)+ env=env, cwd=tmp_path, capture_output=True, text=True, timeout=120, check=False)assert repaired.returncode == 0, repaired.stdout + repaired.stderrassert json.loads(facts.read_text())["packages"]["venv"]["stamp"] != first_stampremaining_generations = {path.resolve() for path in generations.iterdir() if path.is_dir()}@@ -118,7 +118,7 @@ def test_fresh_takeover_prepares_generation_and_runs_selected_python(tmp_path):(root / "hermes_cli/update_finish.py").write_text("raise SystemExit(7)\n", encoding="utf-8")result.unlink()crashed = subprocess.run([sys.executable, "-I", "-S", "-B", str(root / "hermes_cli/_update_takeover.py"), str(context), str(result)],- env=env, cwd=tmp_path, capture_output=True, text=True, timeout=120)+ env=env, cwd=tmp_path, capture_output=True, text=True, timeout=120, check=False)assert crashed.returncode == 7assert json.loads(result.read_text())["receipt_handled"]crash_receipt = json.loads((home / "logs/update_receipts/latest.json").read_text())@@ -131,7 +131,7 @@ def test_fresh_takeover_prepares_generation_and_runs_selected_python(tmp_path):(root / "uv.lock").write_text("not valid TOML [", encoding="utf-8")result.unlink()failed = subprocess.run([sys.executable, "-I", "-S", "-B", str(root / "hermes_cli/_update_takeover.py"), str(context), str(result)],- env=env, cwd=tmp_path, capture_output=True, text=True, timeout=120)+ env=env, cwd=tmp_path, capture_output=True, text=True, timeout=120, check=False)assert failed.returncode != 0assert facts.read_bytes() == beforefailure = json.loads(result.read_text())diff --git a/tests/pm/test_tree_digest_links.py b/tests/pm/test_tree_digest_links.pyindex f11ac1ab866..0649d7be39d 100644--- a/tests/pm/test_tree_digest_links.py+++ b/tests/pm/test_tree_digest_links.py@@ -70,6 +70,7 @@ def test_junctions_bind_target_text_without_walking_outside(tmp_path, monkeypatcresult = subprocess.run([command, "/d", "/c", "mklink", "/J", str(junction), str(target)],capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=15,+ check=False,)assert result.returncode == 0, result.stdout + result.stderrdiff --git a/tests/pm/test_venv_command.py b/tests/pm/test_venv_command.pyindex af86424b286..25e18b82ccb 100644--- a/tests/pm/test_venv_command.py+++ b/tests/pm/test_venv_command.py@@ -62,7 +62,7 @@ def _payload(root: Path, python: str) -> Path:def _run(command: list[str], cwd: Path) -> list:result = subprocess.run(command, cwd=cwd, capture_output=True, text=True, timeout=60,- env={k: v for k, v in os.environ.items() if k not in ("PYTHONPATH", "PYTHONHOME")})+ env={k: v for k, v in os.environ.items() if k not in ("PYTHONPATH", "PYTHONHOME")}, check=False)assert result.returncode == 0, result.stderrreturn json.loads(result.stdout)diff --git a/tests/pm/test_venv_sync_ambient_config.py b/tests/pm/test_venv_sync_ambient_config.pyindex 24f846b1eb7..c0f74aeb78e 100644--- a/tests/pm/test_venv_sync_ambient_config.py+++ b/tests/pm/test_venv_sync_ambient_config.py@@ -40,7 +40,7 @@ def test_ambient_uv_config_does_not_affect_pm_venv_sync(tmp_path, monkeypatch):monkeypatch.setenv(key, value)before = dict(os.environ)raw = subprocess.run([uv, "lock", "--check"], cwd=project,- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert raw.returncode != 0, "negative control: raw poisoned environment must fail"environment = managed_environment(tmp_path / "candidate", offline=True)environment.create()diff --git a/tests/pm/test_windows_build_deps.py b/tests/pm/test_windows_build_deps.pyindex 099d761db3d..cc1288c5b51 100644--- a/tests/pm/test_windows_build_deps.py+++ b/tests/pm/test_windows_build_deps.py@@ -26,6 +26,7 @@ def _powershell(script, *args, env=None):[shell, "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass","-File", str(script), *map(str, args)],capture_output=True, text=True, encoding="utf-8", errors="replace", env=env, timeout=180,+ check=False,)diff --git a/tests/pm/test_worker.py b/tests/pm/test_worker.pyindex 97c65c4896b..c10d63086cd 100644--- a/tests/pm/test_worker.py+++ b/tests/pm/test_worker.py@@ -542,7 +542,7 @@ def test_cold_manager_build_does_not_bootstrap_a_worker(client, tmp_path, monkeypython = pm.stage_manager_runtime(python=Path(sys.executable), destination=tmp_path / "manager",project=project, wheelhouse=wheels, offline=True)result = subprocess.run([str(python), "-I", "-c", "import packaging, tomli_w, truststore; from ruamel.yaml import YAML"],- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stderrwith pytest.raises(FileExistsError):pm.stage_manager_runtime(python=Path(sys.executable), destination=python.parent.parent)@@ -563,7 +563,7 @@ def test_worker_side_environment_reuses_and_keeps_selection_on_failed_tool(clienassert environment_python("proof", root=root) is Noneexecutable = client.ensure_python_tool("proof", requirements, "side-proof", root=root, explicit=True)assert python_tool("proof", "side-proof", root=root) == executable- result = subprocess.run([str(executable)], capture_output=True, text=True, timeout=30)+ result = subprocess.run([str(executable)], capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stderrassert result.stdout.strip() == "real side dependency"selected = environment_python("proof", root=root)@@ -599,7 +599,7 @@ def test_unknown_worker_operation_is_not_dispatched(client, monkeypatch, tmp_patworker = Path(client.__file__).with_name("worker.py")result = subprocess.run(client.runtime_command(worker), input=json.dumps(request) + "\n",capture_output=True, text=True, encoding="utf-8", timeout=30,- env=client.runtime_environment())+ env=client.runtime_environment(), check=False)assert result.returncode == 0, result.stderrresponse = json.loads(result.stdout)assert response["error"]["type"] == "KeyError", responsediff --git a/tests/pm/test_worker_publication.py b/tests/pm/test_worker_publication.pyindex cb2bd8375b7..8655f6fb61b 100644--- a/tests/pm/test_worker_publication.py+++ b/tests/pm/test_worker_publication.py@@ -95,7 +95,7 @@ def test_staged_plugin_publication_uses_installed_identity_and_local_dependencieif active:python = selected / ("Scripts/python.exe" if os.name == "nt" else "bin/python")probe = subprocess.run([str(python), "-I", "-c", "import publication_dep; print(publication_dep.__version__)"],- text=True, capture_output=True, timeout=30)+ text=True, capture_output=True, timeout=30, check=False)assert probe.returncode == 0, probe.stderrassert probe.stdout.strip() == "1.0"facts = (install_state_dir(project) / "facts.json").read_bytes()@@ -256,7 +256,7 @@ def test_worker_death_recovers_at_each_durable_publication_boundary(f"project = Path({str(project)!r})\n""activate_dependencies(project)\nactivate_dependencies(project)\n")recovery = subprocess.run([sys.executable, "-I", "-S", "-c", program], capture_output=True, text=True,- env=dict(os.environ), timeout=30)+ env=dict(os.environ), timeout=30, check=False)assert recovery.returncode == 0, recovery.stderrcommitted = phase == "commit"assert (selected_venv(project) != before_env) is (committed and rebuild)diff --git a/tests/pm/test_worker_registry.py b/tests/pm/test_worker_registry.pyindex 43820a336ca..f1416c04676 100644--- a/tests/pm/test_worker_registry.py+++ b/tests/pm/test_worker_registry.py@@ -100,6 +100,7 @@ def _child(definitions, code, *, setup=""):return subprocess.run([sys.executable, "-I", "-B", "-c", script],input=json.dumps(definitions), capture_output=True, text=True, timeout=30,+ check=False,)diff --git a/tests/providers/test_auth_registry_import_order.py b/tests/providers/test_auth_registry_import_order.pyindex 4747efc1fb8..76b1633e3e1 100644--- a/tests/providers/test_auth_registry_import_order.py+++ b/tests/providers/test_auth_registry_import_order.py@@ -64,6 +64,7 @@ def test_tui_import_exposes_auth_registry_to_provider_plugins(tmp_path):capture_output=True,text=True,timeout=30,+ check=False,)assert probe.returncode == 0, probe.stdout + probe.stderrdiff --git a/tests/providers/test_auth_registry_mid_discovery.py b/tests/providers/test_auth_registry_mid_discovery.pyindex 95f6fa44dc5..33974720aee 100644--- a/tests/providers/test_auth_registry_mid_discovery.py+++ b/tests/providers/test_auth_registry_mid_discovery.py@@ -67,6 +67,7 @@ def _run_probe(hermes_home: Path, code: str) -> subprocess.CompletedProcess:capture_output=True,text=True,timeout=60,+ check=False,)diff --git a/tests/scripts/desktop_update/legacy_desktop_reader.py b/tests/scripts/desktop_update/legacy_desktop_reader.pyindex 49cf52c7314..0310ca90239 100644--- a/tests/scripts/desktop_update/legacy_desktop_reader.py+++ b/tests/scripts/desktop_update/legacy_desktop_reader.py@@ -22,6 +22,6 @@ def legacy_read(home: Path) -> dict:"const live = readLiveUpdateMarker(process.argv[1]); ""console.log(JSON.stringify({ live, kept: fs.existsSync(process.argv[1] + '/.hermes-update-in-progress') }))")out = subprocess.run([node, "--input-type=module", "-e", code, str(home)], capture_output=True, text=True,- encoding="utf-8", timeout=60)+ encoding="utf-8", timeout=60, check=False)assert out.returncode == 0, out.stderrreturn json.loads(out.stdout.strip().splitlines()[-1])diff --git a/tests/scripts/desktop_update/test_desktop_update_mac_swap_interrupt.py b/tests/scripts/desktop_update/test_desktop_update_mac_swap_interrupt.pyindex a4159db3e8c..7a5e80f2517 100644--- a/tests/scripts/desktop_update/test_desktop_update_mac_swap_interrupt.py+++ b/tests/scripts/desktop_update/test_desktop_update_mac_swap_interrupt.py@@ -52,6 +52,7 @@ def test_killed_app_swap_recovers_to_a_complete_bundle(tmp_path: Path) -> None:capture_output=True,text=True,timeout=240,+ check=False,)report = proc.stdout + proc.stderrassert proc.returncode == 0, reportdiff --git a/tests/scripts/desktop_update/test_desktop_update_posix_handoff_protocol.py b/tests/scripts/desktop_update/test_desktop_update_posix_handoff_protocol.pyindex f0d770045c9..95e965e8bea 100644--- a/tests/scripts/desktop_update/test_desktop_update_posix_handoff_protocol.py+++ b/tests/scripts/desktop_update/test_desktop_update_posix_handoff_protocol.py@@ -52,7 +52,7 @@ def _env(tmp_path: Path, home: Path, **extra: str) -> dict:def _helper(tmp_path: Path, home: Path, install: Path, op: str, *args: str) -> str:out = subprocess.run(["bash", str(POSIX), "--marker-op", op, "--install-root", str(install), *args],- env=_env(tmp_path, home), capture_output=True, text=True, timeout=60)+ env=_env(tmp_path, home), capture_output=True, text=True, timeout=60, check=False)assert out.returncode == 0, out.stderrreturn out.stdout.strip()@@ -176,7 +176,7 @@ def test_reparented_live_launcher_is_adopted_only_with_the_handoff_started_at(tmlauncher = (f'printf "%s\\n{started}\\n" $$ > {shlex.quote(str(marker))}; 'f'HERMES_UPDATE_STARTED_AT={started if env_matches else started - 7} bash {shlex.quote(str(POSIX))} --daemonized --no-ui 'f'--self-test-marker --install-root {shlex.quote(str(install))} --desktop-pid {desktop.pid}; echo "rc=$?" > {shlex.quote(str(report))}')- x = subprocess.run(["bash", "-c", launcher], env=_env(tmp_path, home), timeout=60)+ x = subprocess.run(["bash", "-c", launcher], env=_env(tmp_path, home), timeout=60, check=False)assert x.returncode == 0rc = report.read_text(encoding="utf-8-sig").strip()body = marker.read_text(encoding="utf-8-sig").splitlines()@@ -204,7 +204,7 @@ def test_handoff_run_adopts_only_the_matching_live_bridge(tmp_path, procs, bridgresult = subprocess.run(["bash", str(POSIX), "--daemonized", "--no-ui", "--self-test-marker", "--install-root", str(install),"--desktop-pid", str(desktop.pid), "--handoff-run", arg_run],- env=_env(tmp_path, home), capture_output=True, text=True, timeout=60)+ env=_env(tmp_path, home), capture_output=True, text=True, timeout=60, check=False)if adopted:assert result.returncode == 0, result.stdout + result.stderr@@ -261,7 +261,7 @@ def test_adopt_withdraw_and_taken_need_an_exact_identity(tmp_path, procs, blind_def run(body: str, script: str) -> str:code = _sourced(marker, desktop.pid, "desk-7", body, blind_ct=blind_ct) + script- return subprocess.run(["bash", "-c", code], capture_output=True, text=True, encoding="utf-8", timeout=30).stdout.strip()+ return subprocess.run(["bash", "-c", code], capture_output=True, text=True, encoding="utf-8", timeout=30, check=False).stdout.strip()adopt = run(bridge, 'marker_locked marker_claim_locked; echo "rc=$?"')assert adopt.splitlines()[-1] == ("rc=1" if blind_ct else "rc=0"), adopt@@ -351,7 +351,7 @@ def test_an_unreadable_checkout_lock_counts_as_held(tmp_path, tool):probe = (f"log() {{ :; }}; MARKER=/dev/null INSTALL_ROOT={shlex.quote(str(install))} MARKER_LOCK_TOOL={tool}; "f". {shlex.quote(str(MARKER_SH))}; checkout_lock_held && echo held || echo free")def held() -> str:- return subprocess.run(["bash", "-c", probe], capture_output=True, text=True, timeout=30).stdout.strip()+ return subprocess.run(["bash", "-c", probe], capture_output=True, text=True, timeout=30, check=False).stdout.strip()assert held() == "free" # absentlock.touch(); lock.chmod(0)try:@@ -528,7 +528,7 @@ def test_timed_out_probe_is_killed_with_its_whole_process_tree(tmp_path, perl):env["PATH"] = str(bin_dir)code = (f"log() {{ :; }}\n{run_bounded}\n"f"run_bounded 1 bash -c 'sleep 60 & echo $! > {shlex.quote(str(pidfile))}; wait'; echo \"rc=$?\"")- out = subprocess.run([shutil.which("bash"), "-c", code], env=env, capture_output=True, text=True, encoding="utf-8", timeout=30)+ out = subprocess.run([shutil.which("bash"), "-c", code], env=env, capture_output=True, text=True, encoding="utf-8", timeout=30, check=False)assert "rc=124" in out.stdout, outgrandchild = int(pidfile.read_text(encoding="utf-8-sig"))time.sleep(0.2)@@ -546,7 +546,7 @@ def test_json_escape_round_trips_every_control_character(locale):text = "".join(chr(c) for c in range(1, 128)) + " \u00e9 \u2713 & \\& \x1b[31mred\x1b[0m"env = {**os.environ, "LC_ALL": locale}out = subprocess.run([shutil.which("bash"), "-c", found.group(0) + 'json_escape "$1"', "json_escape", text],- env=env, capture_output=True, text=True, encoding="utf-8", timeout=30)+ env=env, capture_output=True, text=True, encoding="utf-8", timeout=30, check=False)assert json.loads(f'"{out.stdout}"') == text, out.stdout@@ -557,7 +557,7 @@ def test_line_two_is_refreshed_only_while_the_claim_is_still_ours(tmp_path, procf". {shlex.quote(str(MARKER_SH))}; marker_now() {{ echo 1999999999; }}; ")ours = (run + 'MY_CT="$(proc_ct $$)"; printf "%s\\n100\\nct:%s\\ndelegate:4242 ct:5.000\\nrun:desk-1-a-0001\\n" $$ "$MY_CT" > "$MARKER"; ''marker_locked marker_refresh_locked; cat "$MARKER"')- out = subprocess.run(["bash", "-c", ours], capture_output=True, text=True, encoding="utf-8", timeout=30).stdout.splitlines()+ out = subprocess.run(["bash", "-c", ours], capture_output=True, text=True, encoding="utf-8", timeout=30, check=False).stdout.splitlines()assert out[1] == "1999999999" and out[3] == "run:desk-1-a-0001" and len(out) == 4 # dead delegate droppedother = subprocess.Popen(["sleep", "60"]); procs.append(other)foreign = f"{other.pid}\n100\nct:{_ct(other.pid)}\n"@@ -611,7 +611,7 @@ def test_old_desktop_stays_parked_after_the_orchestrator_is_killed_while_the_updassert time.monotonic() < deadlinetime.sleep(0.05)probe = subprocess.run([bash, "-c", f"log() {{ :; }}; MARKER=/dev/null INSTALL_ROOT={shlex.quote(str(install))}; "- f". {shlex.quote(str(MARKER_SH))}; checkout_lock_held"], timeout=30)+ f". {shlex.quote(str(MARKER_SH))}; checkout_lock_held"], timeout=30, check=False)assert probe.returncode == 0, "the survivor should still hold the checkout lock"finally:hold.touch(); completion.touch()diff --git a/tests/scripts/desktop_update/test_desktop_update_posix_marker.py b/tests/scripts/desktop_update/test_desktop_update_posix_marker.pyindex 9cfe62fa675..92503a958c8 100644--- a/tests/scripts/desktop_update/test_desktop_update_posix_marker.py+++ b/tests/scripts/desktop_update/test_desktop_update_posix_marker.py@@ -110,7 +110,7 @@ def _run(tmp_path: Path, home: Path, install: Path, *args: str, **env: str) -> sfull_env.pop(key, None)full_env.update(env)return subprocess.run(["bash", str(POSIX), "--daemonized", "--no-ui", "--install-root", str(install), *args],- env=full_env, cwd=tmp_path, capture_output=True, text=True, timeout=120)+ env=full_env, cwd=tmp_path, capture_output=True, text=True, timeout=120, check=False)def _calls(tmp_path: Path) -> list[str]:diff --git a/tests/scripts/desktop_update/test_desktop_update_runtime_unicode.py b/tests/scripts/desktop_update/test_desktop_update_runtime_unicode.pyindex 541bd0972bc..22d2d026d97 100644--- a/tests/scripts/desktop_update/test_desktop_update_runtime_unicode.py+++ b/tests/scripts/desktop_update/test_desktop_update_runtime_unicode.py@@ -65,7 +65,7 @@ def _run_helper(script: str, home: Path, env_extra: dict[str, str], out: Path) -"""result = subprocess.run(['powershell', '-NoProfile', '-Command', f"$out = '{out}'; " + script],env={**os.environ, 'HERMES_HOME': str(home), **env_extra},- capture_output=True, timeout=120)+ capture_output=True, timeout=120, check=False)assert result.returncode == 0, (result.stdout + result.stderr).decode('utf-8', 'replace')return out.read_text(encoding='utf-8-sig').splitlines()diff --git a/tests/scripts/desktop_update/test_desktop_update_tcc_heal.py b/tests/scripts/desktop_update/test_desktop_update_tcc_heal.pyindex a661319a958..faacdb4a00d 100644--- a/tests/scripts/desktop_update/test_desktop_update_tcc_heal.py+++ b/tests/scripts/desktop_update/test_desktop_update_tcc_heal.py@@ -96,6 +96,7 @@ def run_selftest(root: Path) -> str:"--install-root", str(root)],capture_output=True, text=True, encoding="utf-8",errors="replace", timeout=60,+ check=False,)assert proc.returncode == 0, proc.stderrreturn proc.stdout.strip().splitlines()[-1]@@ -236,11 +237,11 @@ class TestHandoffSurvivesBrickAB:hermes = self._make_hermes(root)# BEFORE the heal: the entrypoint dies exactly like the field logs.before = subprocess.run([str(hermes)], capture_output=True,- text=True, encoding="utf-8", errors="replace")+ text=True, encoding="utf-8", errors="replace", check=False)assert before.returncode == 1assert "No module named 'encodings'" in before.stderr# Heal (real posix.sh function), then the same entrypoint boots.assert "state=healed-aliases" in run_selftest(root)after = subprocess.run([str(hermes)], capture_output=True,- text=True, encoding="utf-8", errors="replace")+ text=True, encoding="utf-8", errors="replace", check=False)assert after.returncode == 0diff --git a/tests/scripts/desktop_update/test_desktop_update_windows_commit_outcome.py b/tests/scripts/desktop_update/test_desktop_update_windows_commit_outcome.pyindex f661ed919f8..313d4b57cda 100644--- a/tests/scripts/desktop_update/test_desktop_update_windows_commit_outcome.py+++ b/tests/scripts/desktop_update/test_desktop_update_windows_commit_outcome.py@@ -92,7 +92,7 @@ def _handoff(tmp_path: Path, *args: str, verify: str = 'pass\n', timeout: int =try:out, _ = proc.communicate(timeout=timeout)except subprocess.TimeoutExpired:- subprocess.run(['taskkill', '/T', '/F', '/PID', str(proc.pid)], capture_output=True)+ subprocess.run(['taskkill', '/T', '/F', '/PID', str(proc.pid)], capture_output=True, check=False)out, _ = proc.communicate()pytest.fail(f'hand-off did not finish within {timeout}s: {out}')argv = [json.loads(line) for line in calls.read_text(encoding='utf-8-sig').splitlines()] if calls.exists() else []@@ -194,7 +194,7 @@ def test_marker_with_a_live_delegate_is_handed_to_it_at_finish(tmp_path: Path) -assert marker[2].startswith('ct:') and marker[3:] == [''], markerfinally:if pid_file.exists():- subprocess.run(['taskkill', '/F', '/PID', pid_file.read_text(encoding='utf-8-sig')], capture_output=True)+ subprocess.run(['taskkill', '/F', '/PID', pid_file.read_text(encoding='utf-8-sig')], capture_output=True, check=False)@pytest.mark.platforms('windows')diff --git a/tests/scripts/desktop_update/test_desktop_update_windows_handoff_lineage.py b/tests/scripts/desktop_update/test_desktop_update_windows_handoff_lineage.pyindex 8c2a5538151..32e54e4e742 100644--- a/tests/scripts/desktop_update/test_desktop_update_windows_handoff_lineage.py+++ b/tests/scripts/desktop_update/test_desktop_update_windows_handoff_lineage.py@@ -170,7 +170,7 @@ def test_launcher_lineage_rule_matches_the_shared_table(tmp_path: Path) -> None:harness.write_text(_RULE_HARNESS, encoding='utf-8')proc = subprocess.run([POWERSHELL, '-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', str(harness),'-MarkerPs1', str(MARKER_PS1), '-Marker', str(tmp_path / MARKER), '-Cases', str(cases)],- capture_output=True, text=True, timeout=120)+ capture_output=True, text=True, timeout=120, check=False)assert proc.returncode == 0, proc.stdout + proc.stderrgot = dict(line.split('=') for line in proc.stdout.split())want = {c['id']: '1' if c['expect'] else '0' for c in RULE_CASES}diff --git a/tests/scripts/desktop_update/test_desktop_update_windows_marker.py b/tests/scripts/desktop_update/test_desktop_update_windows_marker.pyindex 84154759415..41bd6926a66 100644--- a/tests/scripts/desktop_update/test_desktop_update_windows_marker.py+++ b/tests/scripts/desktop_update/test_desktop_update_windows_marker.py@@ -96,7 +96,7 @@ def _run(home: Path, *args: str, install: Path | None = None, timeout: int = 120try:out, _ = proc.communicate(timeout=timeout)except subprocess.TimeoutExpired:- subprocess.run(['taskkill', '/T', '/F', '/PID', str(proc.pid)], capture_output=True)+ subprocess.run(['taskkill', '/T', '/F', '/PID', str(proc.pid)], capture_output=True, check=False)out, _ = proc.communicate()pytest.fail(f'hand-off did not finish within {timeout}s: {out}')return proc.pid, proc.returncode, out@@ -264,6 +264,7 @@ def test_ui_profile_sweep_keeps_dirs_of_live_handoffs(tmp_path: Path, sleeper: scwd=tmp_path, env={**os.environ, 'HERMES_HOME': str(home), 'TEMP': str(tmp_path),'HERMES_SELFTEST_HOLD_SECONDS': '0'},capture_output=True, text=True, timeout=120,+ check=False,)assert result.returncode == 0, result.stdout + result.stderrassert live.exists(), 'another live hand-off lost its browser profile'@@ -364,6 +365,7 @@ def test_script_killed_right_after_spawning_the_update_leaves_a_live_marker(tmp_deadline = time.monotonic() + 60while time.monotonic() < deadline and subprocess.run(['tasklist', '/FI', f'PID eq {delegate}', '/NH'], capture_output=True, text=True,+ check=False,).stdout.find(str(delegate)) >= 0:time.sleep(0.2)while marker.exists(): # the custodian releases once the delegate is gone@@ -375,5 +377,5 @@ def test_script_killed_right_after_spawning_the_update_leaves_a_live_marker(tmp_finally:hold.touch()if script.poll() is None:- subprocess.run(['taskkill', '/T', '/F', '/PID', str(script.pid)], capture_output=True)+ subprocess.run(['taskkill', '/T', '/F', '/PID', str(script.pid)], capture_output=True, check=False)script.wait()diff --git a/tests/scripts/desktop_update/test_desktop_update_windows_marker_corpus.py b/tests/scripts/desktop_update/test_desktop_update_windows_marker_corpus.pyindex 2dfc43be5a8..a86fb8b273a 100644--- a/tests/scripts/desktop_update/test_desktop_update_windows_marker_corpus.py+++ b/tests/scripts/desktop_update/test_desktop_update_windows_marker_corpus.py@@ -71,6 +71,7 @@ def run_corpus(powershell: str, work: Path) -> dict[tuple[str, str], dict]:[powershell, '-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', str(harness),'-Corpus', str(CORPUS), '-MarkerPs1', str(MARKER_PS1), '-Work', str(work)],capture_output=True, text=True, encoding='utf-8', errors='replace', timeout=300,+ check=False,)assert proc.returncode == 0, proc.stdout + proc.stderrrows = [json.loads(line) for line in proc.stdout.splitlines() if line.strip()]diff --git a/tests/scripts/desktop_update/test_desktop_update_windows_marker_lock.py b/tests/scripts/desktop_update/test_desktop_update_windows_marker_lock.pyindex 4e41051941a..c29f39b8a0d 100644--- a/tests/scripts/desktop_update/test_desktop_update_windows_marker_lock.py+++ b/tests/scripts/desktop_update/test_desktop_update_windows_marker_lock.py@@ -90,7 +90,7 @@ def test_a7_concurrent_claimants_over_a_dead_marker_yield_one_owner(tmp_path: Patry:c.wait(timeout=120)except subprocess.TimeoutExpired:- subprocess.run(['taskkill', '/T', '/F', '/PID', str(c.pid)], capture_output=True)+ subprocess.run(['taskkill', '/T', '/F', '/PID', str(c.pid)], capture_output=True, check=False)assert running[0].returncode == 0assert not marker.exists()@@ -135,7 +135,7 @@ def test_script_killed_before_publishing_the_delegate_runs_no_update(tmp_path: Plock = _HeldLock(home) # after the claim, before the delegate publicationchild = subprocess.run([POWERSHELL, '-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', str(finder),'-Parent', str(script.pid), '-Seconds', '60'],- capture_output=True, text=True, timeout=90)+ capture_output=True, text=True, timeout=90, check=False)assert child.returncode == 0, 'the update child never appeared'child_pid = int(child.stdout)subprocess.run(['taskkill', '/F', '/PID', str(script.pid)], capture_output=True, check=True)@@ -151,7 +151,7 @@ def test_script_killed_before_publishing_the_delegate_runs_no_update(tmp_path: Plock.release()hold.touch()if script.poll() is None:- subprocess.run(['taskkill', '/T', '/F', '/PID', str(script.pid)], capture_output=True)+ subprocess.run(['taskkill', '/T', '/F', '/PID', str(script.pid)], capture_output=True, check=False)script.wait()deadline = time.monotonic() + 60 # the custodian releases the marker once the lock is freewhile (verdict := _op(home, '-MarkerOp', 'reclaim')[1]).startswith('live '):diff --git a/tests/scripts/desktop_update/test_desktop_update_windows_marker_ops.py b/tests/scripts/desktop_update/test_desktop_update_windows_marker_ops.pyindex 0f570aba0f9..9023ba3de68 100644--- a/tests/scripts/desktop_update/test_desktop_update_windows_marker_ops.py+++ b/tests/scripts/desktop_update/test_desktop_update_windows_marker_ops.py@@ -116,7 +116,7 @@ def _harness(tmp_path: Path, body: str, action: str, *extra: str) -> tuple[str,proc = subprocess.run([POWERSHELL, '-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', str(harness),'-MarkerPs1', str(MARKER_PS1), '-Marker', str(tmp_path / MARKER),'-Body', body, '-Action', action, *extra],- capture_output=True, text=True, timeout=120)+ capture_output=True, text=True, timeout=120, check=False)assert proc.returncode == 0, proc.stdout + proc.stderrpid, ct = proc.stdout.split()return pid, ctdiff --git a/tests/scripts/desktop_update/test_desktop_update_windows_pipe_drain.py b/tests/scripts/desktop_update/test_desktop_update_windows_pipe_drain.pyindex 00e79daa10d..a17cbebe32b 100644--- a/tests/scripts/desktop_update/test_desktop_update_windows_pipe_drain.py+++ b/tests/scripts/desktop_update/test_desktop_update_windows_pipe_drain.py@@ -133,6 +133,7 @@ def test_update_step_survives_pipe_leak_flood_and_live_child_stall(timeout=300,env=env,cwd=str(REPO_ROOT),+ check=False,)# Keep the real flood output on disk instead of flooding the CI log on failure.diff --git a/tests/scripts/desktop_update/test_desktop_update_windows_progress.py b/tests/scripts/desktop_update/test_desktop_update_windows_progress.pyindex 7a027d6833f..dfecd71aca7 100644--- a/tests/scripts/desktop_update/test_desktop_update_windows_progress.py+++ b/tests/scripts/desktop_update/test_desktop_update_windows_progress.py@@ -140,5 +140,6 @@ def test_progress_advances_while_the_orchestrator_blocks(tmp_path: Path) -> Nonesubprocess.run(["taskkill", "/PID", str(process.pid), "/T", "/F"],stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, timeout=15,+ check=False,)process.wait(timeout=15)diff --git a/tests/scripts/desktop_update/test_desktop_update_windows_python_handoff.py b/tests/scripts/desktop_update/test_desktop_update_windows_python_handoff.pyindex 6b161549553..538ea6b7360 100644--- a/tests/scripts/desktop_update/test_desktop_update_windows_python_handoff.py+++ b/tests/scripts/desktop_update/test_desktop_update_windows_python_handoff.py@@ -58,6 +58,7 @@ def test_pm_handoff_reports_update_and_gateway_results('HANDOFF_CALLS': str(calls), 'HANDOFF_EXIT': str(code),'GATEWAY_EXIT': str(gateway_code)},capture_output=True, text=True, timeout=120,+ check=False,)assert result.returncode == code, result.stdout + result.stderrexpected = [{'argv': ['update', '--yes'] + ([] if no_gateway else ['--gateway'])@@ -96,6 +97,7 @@ def test_update_killed_by_idle_watchdog_after_completing_is_a_success('HANDOFF_CALLS': str(calls), 'HANDOFF_EXIT': '0', 'HANDOFF_HANG': output,'HERMES_UPDATE_STEP_IDLE_SECONDS': '3', 'PYTHONIOENCODING': 'utf-8'},capture_output=True, text=True, timeout=180,+ check=False,)assert result.returncode == code, result.stdout + result.stderrargv = [json.loads(line)['argv'][:2] for line in calls.read_text(encoding='utf-8-sig').splitlines()]@@ -121,7 +123,7 @@ def test_earlier_pm_userbin_launcher_is_identity_checked(tmp_path: Path) -> Nonescript = f". '{helper}'; try {{ @(Get-HermesRuntimeCommand -InstallRoot '{target}') | ConvertTo-Json -Compress }} catch {{ exit 1 }}"result = subprocess.run(['powershell', '-NoProfile', '-Command', script],env={**os.environ, 'HERMES_HOME': str(home)},- capture_output=True, text=True, timeout=45)+ capture_output=True, text=True, timeout=45, check=False)assert result.returncode == expected_code, result.stdout + result.stderrif expected_code == 0:assert json.loads(result.stdout) == str(external)@@ -141,7 +143,7 @@ def test_command_file_launcher_probe_runs_through_cmd_exe_explicitly(tmp_path: Pscript = (f". '{helper}'; try {{ $r = Invoke-HermesProbe '{target}' @('--version', '{argument}'); ""[Console]::Out.Write(\"code=$($r.Code)`n$($r.Output)\") } catch { [Console]::Out.Write('refused'); exit 3 }")return subprocess.run(['powershell', '-NoProfile', '-Command', script],- capture_output=True, text=True, timeout=60)+ capture_output=True, text=True, timeout=60, check=False)ok = probe('two words')assert ok.returncode == 0, ok.stdout + ok.stderrdiff --git a/tests/scripts/desktop_update/test_desktop_update_windows_timestamp.py b/tests/scripts/desktop_update/test_desktop_update_windows_timestamp.pyindex 6bf77d26767..59ca76dddac 100644--- a/tests/scripts/desktop_update/test_desktop_update_windows_timestamp.py+++ b/tests/scripts/desktop_update/test_desktop_update_windows_timestamp.py@@ -27,7 +27,7 @@ def test_windows_update_writes_locale_independent_marker_and_result(tmp_path, mostarted = int(time.time())result = subprocess.run([shell, "-NoProfile", "-ExecutionPolicy", "Bypass", "-Command", command],env={**os.environ, "HERMES_TIMESTAMP_TEST_SCRIPT": str(script)},- capture_output=True, text=True, timeout=60)+ capture_output=True, text=True, timeout=60, check=False)finished = int(time.time())assert result.returncode == 0, result.stdout + result.stderrmarker = (tmp_path / ".hermes-update-in-progress").read_text(encoding="utf-8-sig").splitlines()diff --git a/tests/scripts/desktop_update/test_desktop_update_windows_ui_delivery.py b/tests/scripts/desktop_update/test_desktop_update_windows_ui_delivery.pyindex 0e2136fe7a1..2cc30294c11 100644--- a/tests/scripts/desktop_update/test_desktop_update_windows_ui_delivery.py+++ b/tests/scripts/desktop_update/test_desktop_update_windows_ui_delivery.py@@ -54,6 +54,7 @@ def _server(tmp_path: Path, *, failed: bool = False):subprocess.run(["taskkill", "/PID", str(process.pid), "/T", "/F"],stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, timeout=15,+ check=False,)process.wait(timeout=15)diff --git a/tests/scripts/desktop_update/test_handoff_delegate_publication.py b/tests/scripts/desktop_update/test_handoff_delegate_publication.pyindex ed0a4088f42..1555898fabe 100644--- a/tests/scripts/desktop_update/test_handoff_delegate_publication.py+++ b/tests/scripts/desktop_update/test_handoff_delegate_publication.py@@ -29,7 +29,7 @@ def test_delegate_publication_refuses_without_our_claim(tmp_path, claim):"DESKTOP_PID=0 HANDOFF_RUN='' MARKER_CLAIMED=1; "f". {shlex.quote(str(POSIX.with_name('marker.sh')))}; "f"marker_add_delegate {child.pid}")- result = subprocess.run(["bash", "-c", prelude], cwd=tmp_path, timeout=20)+ result = subprocess.run(["bash", "-c", prelude], cwd=tmp_path, timeout=20, check=False)assert result.returncode != 0, "a missing/foreign claim is not a published delegate"assert (marker.read_bytes() if marker.exists() else None) == originalfinally:diff --git a/tests/scripts/desktop_update/test_handoff_result_identity.py b/tests/scripts/desktop_update/test_handoff_result_identity.pyindex 6055094cafa..630434876a4 100644--- a/tests/scripts/desktop_update/test_handoff_result_identity.py+++ b/tests/scripts/desktop_update/test_handoff_result_identity.py@@ -54,6 +54,7 @@ Remove-PSBreakpoint $breakpointenv={**os.environ, "HOME": str(home), "HERMES_HOME": str(home),"TEMP": str(tmp_path), "TMP": str(tmp_path)},capture_output=True, text=True, timeout=60,+ check=False,)receipt = json.loads((home / ".hermes-update-result.json").read_text(encoding="utf-8"))assert receipt["ok"] is False, (receipt, result.stdout, result.stderr)diff --git a/tests/scripts/desktop_update/windows_handoff_support.py b/tests/scripts/desktop_update/windows_handoff_support.pyindex 9834f48981e..d0b7a86a79e 100644--- a/tests/scripts/desktop_update/windows_handoff_support.py+++ b/tests/scripts/desktop_update/windows_handoff_support.py@@ -49,7 +49,7 @@ def _creation_time(pid: int) -> str:def _alive(pid: int) -> bool:return str(pid) in subprocess.run(['tasklist', '/FI', f'PID eq {pid}', '/NH'],- capture_output=True, text=True).stdout+ capture_output=True, text=True, check=False).stdoutdef _dead_pid() -> int:@@ -73,7 +73,7 @@ def _finish(proc: subprocess.Popen, timeout: int = 120) -> tuple[int, str]:try:out, _ = proc.communicate(timeout=timeout)except subprocess.TimeoutExpired:- subprocess.run(['taskkill', '/T', '/F', '/PID', str(proc.pid)], capture_output=True)+ subprocess.run(['taskkill', '/T', '/F', '/PID', str(proc.pid)], capture_output=True, check=False)out, _ = proc.communicate()pytest.fail(f'hand-off did not finish within {timeout}s: {out}')return proc.returncode, out@@ -83,7 +83,7 @@ def _op(home: Path, *args: str) -> tuple[int, str, str]:proc = subprocess.run([POWERSHELL, '-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Bypass', '-File', str(SCRIPT),'-InstallRoot', str(home / 'hermes-agent'), *args],- cwd=home, env=_env(home), capture_output=True, text=True, timeout=120)+ cwd=home, env=_env(home), capture_output=True, text=True, timeout=120, check=False)return proc.returncode, proc.stdout, proc.stderrdiff --git a/tests/scripts/install/test_dmg_install_driver.py b/tests/scripts/install/test_dmg_install_driver.pyindex 34e9b92cbcd..db6adbe8ed3 100644--- a/tests/scripts/install/test_dmg_install_driver.py+++ b/tests/scripts/install/test_dmg_install_driver.py@@ -75,6 +75,7 @@ def test_dmg_driver_requires_complete_pm_source_install(tmp_path, missing, expec"--install-timeout-secs", "2", "--proof-dir", str(tmp_path / "proof")],env=dict(os.environ, HOME=str(home), PATH=f"{mocks}:{os.environ['PATH']}"),capture_output=True, text=True, timeout=15,+ check=False,)assert (result.returncode == 0) is expected, result.stdout + result.stderrassert ("install landed:" in result.stdout) is expected, result.stdoutdiff --git a/tests/scripts/install/test_install_clone_throttle_fallback.py b/tests/scripts/install/test_install_clone_throttle_fallback.pyindex 3543993a018..c044d67274b 100644--- a/tests/scripts/install/test_install_clone_throttle_fallback.py+++ b/tests/scripts/install/test_install_clone_throttle_fallback.py@@ -40,7 +40,7 @@ git() {{}}stage_repository'''- result = subprocess.run(["bash", "-c", script], env=env, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=30)+ result = subprocess.run(["bash", "-c", script], env=env, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=30, check=False)calls = attempts.read_text(encoding="utf-8-sig").splitlines()assert len(calls) > 1assert "--no-checkout" in calls[-1]@@ -61,7 +61,7 @@ def _run_repository_stage(installer: str, tmp_path: Path, install: Path, origin_HERMES_INSTALL_DIR=install.as_posix(), HERMES_REPO_URL=origin_url)if installer == "sh":script = f"source {shlex.quote((ROOT / 'scripts/install.sh').as_posix())} --manifest\nstage_repository\n"- return subprocess.run(["bash", "-c", script], env=env, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=60)+ return subprocess.run(["bash", "-c", script], env=env, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=60, check=False)if os.name != "nt":# pwsh on POSIX cannot run the Windows-only pinned Git: seed its PM store slot with host git.version = json.loads((ROOT / "pm" / "lock.json").read_text(encoding="utf-8-sig"))["packages"]["git"]["version"]@@ -73,7 +73,7 @@ def _run_repository_stage(installer: str, tmp_path: Path, install: Path, origin_return subprocess.run([POWERSHELL, "-NoProfile", "-File", str(ROOT / "scripts" / "install.ps1"),"-Stage", "repository", "-NonInteractive", "-InstallDir", str(install),"-HermesHome", str(tmp_path / "home")],- env=env, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=240)+ env=env, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=240, check=False)@pytest.mark.live_system_guard_bypassdiff --git a/tests/scripts/install/test_install_desktop_product_present.py b/tests/scripts/install/test_install_desktop_product_present.pyindex 04b353e623d..a542b82d3f9 100644--- a/tests/scripts/install/test_install_desktop_product_present.py+++ b/tests/scripts/install/test_install_desktop_product_present.py@@ -28,7 +28,7 @@ def _desktop_product_present(tmp_path: Path) -> int:env = dict(os.environ, HOME=tmp_path.as_posix(), HERMES_HOME=(tmp_path / "home").as_posix(),HERMES_INSTALL_DIR=(tmp_path / "install").as_posix())script = f"source {shlex.quote(INSTALL_SH.as_posix())} --manifest >/dev/null\ndesktop_product_present\n"- return subprocess.run(["bash", "-c", script], env=env, capture_output=True, text=True, timeout=30).returncode+ return subprocess.run(["bash", "-c", script], env=env, capture_output=True, text=True, timeout=30, check=False).returncode@pytest.mark.parametrize("unpacked", UNPACKED_DIRS)diff --git a/tests/scripts/install/test_install_diverged_rescue_ref.py b/tests/scripts/install/test_install_diverged_rescue_ref.pyindex b6da914a40a..40dac94fe88 100644--- a/tests/scripts/install/test_install_diverged_rescue_ref.py+++ b/tests/scripts/install/test_install_diverged_rescue_ref.py@@ -80,6 +80,7 @@ def test_install_sh_repository_stage_parks_local_commits_before_reset(tmp_path:result = subprocess.run(["bash", str(INSTALL_SH), "--stage", "repository", "--non-interactive"],cwd=tmp_path, env=env, capture_output=True, text=True,+ check=False,)assert result.returncode == 0, result.stderr@@ -118,6 +119,7 @@ def test_install_ps1_repository_stage_parks_local_commits_before_reset(tmp_path:"-HermesHome", str(tmp_path / "hermes-home"),],cwd=tmp_path, env=env, capture_output=True, text=True,+ check=False,)assert result.returncode == 0, result.stdout + result.stderrdiff --git a/tests/scripts/install/test_install_ps1_execution_policy.py b/tests/scripts/install/test_install_ps1_execution_policy.pyindex 7da92978124..2a0542ff932 100644--- a/tests/scripts/install/test_install_ps1_execution_policy.py+++ b/tests/scripts/install/test_install_ps1_execution_policy.py@@ -39,7 +39,7 @@ def test_installed_hermes_runs_under_restricted_policy(tmp_path):"Invoke-InstalledHermes @('setup')")result = subprocess.run([powershell, "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass","-Command", command],- cwd=tmp_path, stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=60)+ cwd=tmp_path, stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=60, check=False)output = result.stdout + result.stderrassert "running scripts is disabled" not in output, outputassert f"runtime-from {helper.parents[2]} setup" in result.stdout, output@@ -75,6 +75,7 @@ def test_installer_runs_runtime_command_from_apostrophe_account_path(tmp_path):[powershell, "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-Command", command],cwd=tmp_path, env=env, stdin=subprocess.DEVNULL,capture_output=True, text=True, timeout=60,+ check=False,)output = result.stdout + result.stderrassert result.returncode == 0, outputdiff --git a/tests/scripts/install/test_install_ps1_iex_failure.py b/tests/scripts/install/test_install_ps1_iex_failure.pyindex d63b453e910..8ca7b8d8e78 100644--- a/tests/scripts/install/test_install_ps1_iex_failure.py+++ b/tests/scripts/install/test_install_ps1_iex_failure.py@@ -39,7 +39,7 @@ def test_failed_iex_install_reports_and_returns_to_the_callers_session(tmp_path)command = (f"iex (Get-Content -Raw -LiteralPath '{INSTALLER}'); ""Write-Output \"session alive: $LASTEXITCODE\"")result = subprocess.run([_powershell(), "-NoProfile", "-ExecutionPolicy", "Bypass", "-Command", command],- env=_failing_install_env(tmp_path), capture_output=True, text=True, timeout=60)+ env=_failing_install_env(tmp_path), capture_output=True, text=True, timeout=60, check=False)assert REFUSAL in result.stdoutassert "session alive: 1" in result.stdout, result.stdout + result.stderrassert (tmp_path / "home" / "hermes-agent" / "user-file").read_text(encoding="utf-8") == "preserve me"@@ -47,6 +47,6 @@ def test_failed_iex_install_reports_and_returns_to_the_callers_session(tmp_path)def test_failed_file_install_still_exits_nonzero(tmp_path):result = subprocess.run([_powershell(), "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", str(INSTALLER)],- env=_failing_install_env(tmp_path), capture_output=True, text=True, timeout=60)+ env=_failing_install_env(tmp_path), capture_output=True, text=True, timeout=60, check=False)assert REFUSAL in result.stdoutassert result.returncode == 1diff --git a/tests/scripts/install/test_install_ps1_json_failure_frame.py b/tests/scripts/install/test_install_ps1_json_failure_frame.pyindex 53dc33bd7ef..5c40eb10ce2 100644--- a/tests/scripts/install/test_install_ps1_json_failure_frame.py+++ b/tests/scripts/install/test_install_ps1_json_failure_frame.py@@ -24,7 +24,7 @@ def test_fail_inside_a_stage_emits_one_json_frame_with_the_reason(tmp_path):result = subprocess.run([powershell, "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", str(INSTALLER),"-Stage", "repository", "-Json", "-InstallDir", str(install_dir)],- env=env, capture_output=True, text=True, timeout=240)+ env=env, capture_output=True, text=True, timeout=240, check=False)frames = [json.loads(line) for line in result.stdout.splitlines() if line.startswith("{")]assert result.returncode == 1assert len(frames) == 1, result.stdoutdiff --git a/tests/scripts/install/test_install_ps1_managed_python_provenance.py b/tests/scripts/install/test_install_ps1_managed_python_provenance.pyindex bd521ec0f71..c0233f74596 100644--- a/tests/scripts/install/test_install_ps1_managed_python_provenance.py+++ b/tests/scripts/install/test_install_ps1_managed_python_provenance.py@@ -71,7 +71,7 @@ exit $LASTEXITCODErun = subprocess.run([powershell, "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-File", str(wrapper),"-Installer", str(INSTALLER), "-InstallDir", str(install), "-HomeDir", str(tmp_path / "home"), "-Log", str(log)],cwd=tmp_path, env=env, stdin=subprocess.DEVNULL,- capture_output=True, text=True, timeout=120)+ capture_output=True, text=True, timeout=120, check=False)assert (run.returncode == 0) == (exit_code == 0), run.stdout + run.stderrfrom hermes_platform.host.facts import native_archdiff --git a/tests/scripts/install/test_install_ps1_native_calls.py b/tests/scripts/install/test_install_ps1_native_calls.pyindex f7078e37f95..346771b083e 100644--- a/tests/scripts/install/test_install_ps1_native_calls.py+++ b/tests/scripts/install/test_install_ps1_native_calls.py@@ -27,7 +27,7 @@ def _powershell() -> str:def _dot_sourced(body: str) -> subprocess.CompletedProcess:script = f'$ErrorActionPreference = "Stop"; . "{INSTALLER}"; {body}'return subprocess.run([_powershell(), "-NoProfile", "-ExecutionPolicy", "Bypass", "-Command", script],- capture_output=True, text=True, timeout=120)+ capture_output=True, text=True, timeout=120, check=False)def test_native_stderr_under_stop_leaves_the_exit_code_to_the_caller():@@ -56,7 +56,7 @@ def _stage(origin: Path, home: Path, *extra: str, **env_extra: str) -> tuple[subenv = dict(os.environ, HERMES_REPO_URL=str(origin), HERMES_HOME=str(home), **env_extra)result = subprocess.run([_powershell(), "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", str(INSTALLER),"-Stage", "repository", "-Json", *extra],- env=env, capture_output=True, text=True, timeout=180)+ env=env, capture_output=True, text=True, timeout=180, check=False)frames = [json.loads(line) for line in result.stdout.splitlines() if line.startswith("{")]assert len(frames) == 1, result.stdout + result.stderrreturn result, frames[0]diff --git a/tests/scripts/install/test_install_ps1_pinned_git_extract.py b/tests/scripts/install/test_install_ps1_pinned_git_extract.pyindex a5cafefa698..317667f5c06 100644--- a/tests/scripts/install/test_install_ps1_pinned_git_extract.py+++ b/tests/scripts/install/test_install_ps1_pinned_git_extract.py@@ -41,6 +41,7 @@ def test_pinned_git_extracts_without_a_bzip2_capable_tar(tmp_path):["powershell", "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass","-File", str(driver)],capture_output=True, timeout=900,+ check=False,)out = (result.stdout + result.stderr).decode("utf-8", errors="replace")assert result.returncode == 0, outdiff --git a/tests/scripts/install/test_install_ps1_script_suites.py b/tests/scripts/install/test_install_ps1_script_suites.pyindex a98e53b60a3..4f8fa3e6fe2 100644--- a/tests/scripts/install/test_install_ps1_script_suites.py+++ b/tests/scripts/install/test_install_ps1_script_suites.py@@ -28,5 +28,5 @@ def _shell(name: str) -> str:def test_suite_passes(shell, suite):result = subprocess.run([_shell(shell), "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass","-File", str(SUITES / suite)],- capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=300)+ capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=300, check=False)assert result.returncode == 0, result.stdout + result.stderrdiff --git a/tests/scripts/install/test_install_ps1_skipsetup_alias.py b/tests/scripts/install/test_install_ps1_skipsetup_alias.pyindex 2f3a3721afb..03414b445c0 100644--- a/tests/scripts/install/test_install_ps1_skipsetup_alias.py+++ b/tests/scripts/install/test_install_ps1_skipsetup_alias.py@@ -33,6 +33,7 @@ def test_skipsetup_still_binds(tmp_path):"-File", str(INSTALLER), "-SkipSetup", "-NonInteractive", "-ShowResolvedPaths","-HermesHome", str(tmp_path / "home"), "-InstallDir", str(tmp_path / "install")],capture_output=True, text=True, timeout=120,+ check=False,)assert result.returncode == 0, ("-SkipSetup failed to bind:\n" + result.stderr + result.stdout)@@ -54,6 +55,7 @@ def test_skipsetup_alone_skips_needs_input_stage(tmp_path):"-File", str(INSTALLER), "-SkipSetup", "-Stage", "setup", "-Json","-HermesHome", str(tmp_path / "home"), "-InstallDir", str(tmp_path / "install")],capture_output=True, text=True, timeout=120,+ check=False,)assert result.returncode == 0, ("-SkipSetup -Stage setup failed:\n" + result.stderr + result.stdout)diff --git a/tests/scripts/install/test_install_ps1_staged_git.py b/tests/scripts/install/test_install_ps1_staged_git.pyindex 4cbafc4fabb..1906341fb29 100644--- a/tests/scripts/install/test_install_ps1_staged_git.py+++ b/tests/scripts/install/test_install_ps1_staged_git.py@@ -36,7 +36,7 @@ def test_stage_processes_restore_pinned_git_and_never_fall_back(tmp_path):def stage(name):result = subprocess.run([powershell, "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass","-File", str(INSTALLER), "-Stage", name, "-Json"],- env=env, capture_output=True, text=True, timeout=240)+ env=env, capture_output=True, text=True, timeout=240, check=False)frames = [json.loads(line) for line in result.stdout.splitlines() if line.startswith("{")]assert result.returncode == 0 and len(frames) == 1 and frames[0]["ok"], result.stdout + result.stderr@@ -61,5 +61,5 @@ def test_stage_processes_restore_pinned_git_and_never_fall_back(tmp_path):"$script:GitPinFiles.Remove(('win32-' + (Get-WindowsArch))); ""if (Ensure-Git) { exit 1 } else { exit 0 }")refused = subprocess.run([powershell, "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass",- "-Command", probe], env=env, capture_output=True, text=True, timeout=240)+ "-Command", probe], env=env, capture_output=True, text=True, timeout=240, check=False)assert refused.returncode == 0, refused.stdout + refused.stderrdiff --git a/tests/scripts/install/test_install_sh_existing_destination.py b/tests/scripts/install/test_install_sh_existing_destination.pyindex 6958f00fbb4..dfb0f428b0c 100644--- a/tests/scripts/install/test_install_sh_existing_destination.py+++ b/tests/scripts/install/test_install_sh_existing_destination.py@@ -26,7 +26,7 @@ def _stage_repository(tmp_path: Path, dest: Path) -> subprocess.CompletedProcessenv = dict(os.environ, HOME=tmp_path.as_posix(), HERMES_HOME=(tmp_path / "home").as_posix(),HERMES_INSTALL_DIR=dest.as_posix(), HERMES_REPO_URL=_origin(tmp_path).as_posix())script = f"source {shlex.quote((ROOT / 'scripts/install.sh').as_posix())} --manifest\nstage_repository\n"- return subprocess.run(["bash", "-c", script], env=env, capture_output=True, text=True, timeout=30)+ return subprocess.run(["bash", "-c", script], env=env, capture_output=True, text=True, timeout=30, check=False)@pytest.mark.parametrize("shape", ["non-empty-dir", "file"])diff --git a/tests/scripts/install/test_install_sh_output.py b/tests/scripts/install/test_install_sh_output.pyindex 4987555eadb..5d609edcaa0 100644--- a/tests/scripts/install/test_install_sh_output.py+++ b/tests/scripts/install/test_install_sh_output.py@@ -62,7 +62,7 @@ def test_terminal_run_keeps_output_in_the_log_and_shows_it_only_on_failure(tmp_pdef test_ci_streams_every_line_and_writes_no_log(tmp_path):result = subprocess.run(["bash", "-c", _script(0)], env=_env(tmp_path, CI="true"),- stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=30)+ stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stdout + result.stderrassert "noisy-first" in result.stdout and "noisy-second" in result.stderrassert "Noisy step" in result.stdoutdiff --git a/tests/scripts/install/test_install_sh_repository_stage.py b/tests/scripts/install/test_install_sh_repository_stage.pyindex 506d16ce7a8..a5cc90ac878 100644--- a/tests/scripts/install/test_install_sh_repository_stage.py+++ b/tests/scripts/install/test_install_sh_repository_stage.py@@ -39,7 +39,7 @@ def _run(tmp_path: Path, body: str, *, env: dict | None = None, **kwargs) -> subscript = f"source {shlex.quote(INSTALL_SH.as_posix())} --manifest\nsleep() {{ :; }}\n{body}\n"full_env = dict(os.environ, HOME=tmp_path.as_posix(), HERMES_HOME=(tmp_path / "home").as_posix(),HERMES_INSTALL_DIR=(tmp_path / "install").as_posix(), **(env or {}))- return subprocess.run(["bash", "-c", script], env=full_env, capture_output=True, text=True, timeout=60, **kwargs)+ return subprocess.run(["bash", "-c", script], env=full_env, capture_output=True, text=True, timeout=60, **kwargs) # noqa: PLW1510 -- forwarding wrapper: callers pass subprocess kwargs via **kwargs (check may arrive through it); an explicit check=False would raise TypeErrordef _stage(tmp_path: Path, origin: Path, *, commit: str = "", extra_env: dict | None = None,@@ -51,7 +51,7 @@ def _stage(tmp_path: Path, origin: Path, *, commit: str = "", extra_env: dict |def test_piped_one_liner_runs_the_installer():"""`curl ... | bash` has an empty BASH_SOURCE; under `set -u` the entry guard must still run main."""result = subprocess.run(["bash", "-s", "--", "--manifest"], input=INSTALL_SH.read_bytes(),- capture_output=True, timeout=30)+ capture_output=True, timeout=30, check=False)assert result.returncode == 0, result.stderr.decode()assert json.loads(result.stdout)["protocol_version"] == 1@@ -168,7 +168,7 @@ def test_unmerged_index_is_cleared_then_stashed(tmp_path):_git(install, "checkout", "-q", "main")_commit(install, "ours")subprocess.run(["git", "-C", str(install), "-c", "user.email=t@t", "-c", "user.name=t", "merge", "conflict"],- capture_output=True)+ capture_output=True, check=False)assert _git(install, "ls-files", "--unmerged")_commit(origin, "two")result = _stage(tmp_path, origin)diff --git a/tests/scripts/install/test_install_sh_reuse_supported_python.py b/tests/scripts/install/test_install_sh_reuse_supported_python.pyindex 32ce4a3dd94..6db8b373612 100644--- a/tests/scripts/install/test_install_sh_reuse_supported_python.py+++ b/tests/scripts/install/test_install_sh_reuse_supported_python.py@@ -25,7 +25,7 @@ pytestmark = pytest.mark.platforms("posix")@pytest.mark.parametrize("suffix", [[], ["--manifest"], [""]])def test_missing_value_fails_before_any_install_work(option: str, suffix: list[str]) -> None:result = subprocess.run(["bash", str(INSTALL_SH), option, *suffix],- capture_output=True, text=True, timeout=10)+ capture_output=True, text=True, timeout=10, check=False)assert result.returncode == 2assert result.stderr.strip() == f"{option} needs a value"assert not result.stdout@@ -51,7 +51,7 @@ def test_browser_skip_becomes_the_pm_opt_out(tmp_path: Path, flags: list[str], e'printf "noninteractive=%s\\n" "$NON_INTERACTIVE"')result = subprocess.run([bash, "-c", script, "test", str(INSTALL_SH), str(tmp_path), str(boot), *flags],env={**os.environ, "HERMES_HOME": str(tmp_path / "home")},- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stdout + result.stderrassert record.read_text(encoding="utf-8").splitlines() == expectedassert "noninteractive=false" in result.stdout@@ -98,7 +98,7 @@ def test_supported_base_python_is_reused_offline(tmp_path: Path, activated: boolscript = ('source "$1" --manifest; INSTALL_DIR="$2"; UV_CMD="$3"; bootstrap_python; ''"$boot_py" -I -c "import sys; print(sys.prefix == sys.base_prefix)"')result = subprocess.run([bash, "-c", script, "test", str(INSTALL_SH), str(core), str(bin_dir / "uv")],- env=env, cwd=core, capture_output=True, text=True, timeout=30)+ env=env, cwd=core, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stdout + result.stderrassert result.stdout.strip() == "True", result.stdout + result.stderrassert not Path(env["UV_PYTHON_INSTALL_DIR"]).exists()@@ -132,7 +132,7 @@ def test_bootstrap_failure_has_no_success_frame(tmp_path: Path, failure: str) ->uv.chmod(0o755)result = subprocess.run([bash, str(INSTALL_SH), "--dir", str(core),"--stage", "venv", "--json", "--non-interactive"],- env=env, cwd=core, capture_output=True, text=True, timeout=30)+ env=env, cwd=core, capture_output=True, text=True, timeout=30, check=False)assert result.returncode != 0, result.stdout + result.stderrframe = json.loads(result.stdout.splitlines()[-1])assert frame["stage"] == "venv" and frame["ok"] is False, framediff --git a/tests/scripts/install/test_install_sh_shell_path.py b/tests/scripts/install/test_install_sh_shell_path.pyindex fb7f6935c5b..103cc70ceac 100644--- a/tests/scripts/install/test_install_sh_shell_path.py+++ b/tests/scripts/install/test_install_sh_shell_path.py@@ -57,7 +57,7 @@ def _wire(home: Path, runs: int = 1) -> None:NO_COLOR="1", TERM="dumb", CI="true")script = f"source {shlex.quote(INSTALL_SH.as_posix())} --manifest\n" + "wire_shell_path\n" * runsresult = subprocess.run(["bash", "-c", script], env=env, stdin=subprocess.DEVNULL,- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stdout + result.stderr@@ -65,7 +65,7 @@ def _login_path(home: Path) -> list[str]:# Absolute path: the pinned PATH below has no bash on hosts like NixOS.result = subprocess.run([shutil.which("bash"), "-lc", 'printf %s "$PATH"'],env={"HOME": str(home), "PATH": "/usr/local/bin:/usr/bin:/bin"},- stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=30)+ stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stderrreturn result.stdout.split(":")diff --git a/tests/scripts/install/test_install_sh_termux_refusal.py b/tests/scripts/install/test_install_sh_termux_refusal.pyindex d42c4646b27..7fa564b9119 100644--- a/tests/scripts/install/test_install_sh_termux_refusal.py+++ b/tests/scripts/install/test_install_sh_termux_refusal.py@@ -14,7 +14,7 @@ def test_termux_host_is_refused_before_any_stage_with_apt_hint(tmp_path, marker)env.update(marker, HOME=tmp_path.as_posix(), HERMES_HOME=(tmp_path / "home").as_posix(),HERMES_INSTALL_DIR=(tmp_path / "install").as_posix())result = subprocess.run(["bash", INSTALL_SH.as_posix(), "--stage", "prerequisites"],- env=env, capture_output=True, text=True, timeout=30)+ env=env, capture_output=True, text=True, timeout=30, check=False)assert result.returncode != 0assert "pkg install hermes-agent" in result.stderrassert not (tmp_path / "install").exists()@@ -25,5 +25,5 @@ def test_plain_linux_host_passes_platform_check(tmp_path):env.update(HOME=tmp_path.as_posix(), HERMES_HOME=(tmp_path / "home").as_posix(),HERMES_INSTALL_DIR=(tmp_path / "install").as_posix())result = subprocess.run(["bash", INSTALL_SH.as_posix(), "--stage", "prerequisites"],- env=env, capture_output=True, text=True, timeout=30)+ env=env, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stderrdiff --git a/tests/scripts/install/test_pm_desktop_launch_capture.py b/tests/scripts/install/test_pm_desktop_launch_capture.pyindex 2b6376a3e2b..428f50cadc7 100644--- a/tests/scripts/install/test_pm_desktop_launch_capture.py+++ b/tests/scripts/install/test_pm_desktop_launch_capture.py@@ -61,7 +61,7 @@ def test_isolated_pm_launch_captures_only_final_electron_spawn(tmp_path, packageenv = {**os.environ, "PATH": str(tmp_path) + os.pathsep + os.environ["PATH"],"PYTHONPATH": str(evil)}result = subprocess.run([sys.executable, "-I", str(helper), str(launcher), str(spec)],- cwd=tmp_path, env=env, capture_output=True, text=True)+ cwd=tmp_path, env=env, capture_output=True, text=True, check=False)assert result.returncode == 0, result.stderrassert (tmp_path / "build-ran").is_file()assert not (tmp_path / "ambient-hook-ran").exists()diff --git a/tests/scripts/test_agent_build.py b/tests/scripts/test_agent_build.pyindex 55c1286cff9..3e06d91fdfc 100644--- a/tests/scripts/test_agent_build.py+++ b/tests/scripts/test_agent_build.py@@ -64,6 +64,7 @@ def build_cli(data, out, tmp_path):cwd=tmp_path, env={"PATH": os.environ["PATH"], "HOME": str(home),"HERMES_HOME": str(home / ".hermes"), "PYTHONPATH": str(ROOT)},capture_output=True, text=True, timeout=30,+ check=False,)@@ -90,7 +91,7 @@ def test_contained_cli_assembly_runs_after_move_and_preserves_prepared_state(tmprun = subprocess.run([str(moved / manifest["runtime"]["commands"]["probe"]), "two words", "$(no)", ""],cwd=tmp_path, env={"PATH": os.environ["PATH"], "HOME": str(tmp_path / "home"),"PYTHONPATH": "/foreign", "PYTHONHOME": "/foreign"},- text=True, capture_output=True, timeout=30)+ text=True, capture_output=True, timeout=30, check=False)assert run.returncode == 7, run.stderrassert json.loads(run.stdout) == [["two words", "$(no)", ""], "prepared", "1.2.3", "resource"]assert before == {p.relative_to(data["code"]): p.read_bytes() for p in Path(data["code"]).rglob("*") if p.is_file()}@@ -157,7 +158,7 @@ def test_fixed_root_keeps_privilege_shim_and_resolves_venv_command_symlink(tmp_plink.symlink_to("../../libexec/probe")run = subprocess.run([str(link), "ok"], cwd=tmp_path,env={"PATH": os.environ["PATH"], "HOME": str(tmp_path / "home")},- text=True, capture_output=True)+ text=True, capture_output=True, check=False)assert run.returncode == 7, run.stderrassert json.loads(run.stdout)[0] == ["ok"]@@ -255,23 +256,23 @@ def test_payload_smoke_uses_relocated_manifest_commands(tmp_path):shutil.rmtree(source)env = dict(os.environ, PYTHONPATH="/foreign", PYTHONHOME="/foreign", HERMES_PYTHON="/foreign")command = ["bash", str(ROOT / "scripts/smoke-payload.sh"), str(out)]- result = subprocess.run(command, cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30)+ result = subprocess.run(command, cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stdout + result.stderrassert '"prepared"' in result.stdoutassert out.is_dir(), "smoke must restore the artifact for packaging"assert "harness ok" in result.stdoutshutil.rmtree(harness)- no_harness = subprocess.run(command, cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30)+ no_harness = subprocess.run(command, cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30, check=False)assert no_harness.returncode != 0assert "browser-harness failed" in no_harness.stdout + no_harness.stderrdependency = Path(data['site_packages']) / 'dependency.py'dependency.unlink()- missing_dep = subprocess.run(command, cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30)+ missing_dep = subprocess.run(command, cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30, check=False)assert missing_dep.returncode != 0assert 'SMOKE OK' not in missing_dep.stdout# A broken published command cannot be rescued by importing raw Python.(out / "libexec/hermes").unlink()- failed = subprocess.run(command, cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30)+ failed = subprocess.run(command, cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30, check=False)assert failed.returncode != 0assert "SMOKE OK" not in failed.stdoutassert out.is_dir(), "failed smoke must also restore the artifact"@@ -283,7 +284,7 @@ def test_payload_smoke_uses_relocated_manifest_commands(tmp_path):for path in (external, 'libexec/hermes'):manifest['runtime']['commands']['hermes'] = path(out / 'manifest.json').write_text(json.dumps(manifest), encoding='utf-8')- escaped = subprocess.run(command, cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30)+ escaped = subprocess.run(command, cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30, check=False)assert escaped.returncode != 0, escaped.stdoutassert 'SMOKE OK' not in escaped.stdout@@ -322,7 +323,7 @@ def test_prepared_environment_python_imports_app_from_unrelated_script(tmp_path)script.write_text("import entry\nfrom importlib.metadata import version\nprint(version('assembly-fixture'))\n", encoding="utf-8")run = subprocess.run([str(python), "-I", str(script)], cwd=tmp_path,env={"PATH": os.environ["PATH"], "HOME": str(tmp_path / "home"), "PYTHONDONTWRITEBYTECODE": "1"},- capture_output=True, text=True)+ capture_output=True, text=True, check=False)assert run.returncode == 0, run.stderrassert run.stdout.strip() == "1.2.3"diff --git a/tests/scripts/test_bootstrap_mirror.py b/tests/scripts/test_bootstrap_mirror.pyindex 2360f36e822..66bfeea6b5b 100644--- a/tests/scripts/test_bootstrap_mirror.py+++ b/tests/scripts/test_bootstrap_mirror.py@@ -64,7 +64,7 @@ def test_windows_download_uses_only_verified_candidates(tmp_path, server, mode):encoding="utf-8",)result = subprocess.run(["powershell", "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-File", str(script)],- capture_output=True, text=True, timeout=60)+ capture_output=True, text=True, timeout=60, check=False)if mode in ("primary", "missing"):assert result.returncode == 0, result.stdout + result.stderrassert destination.read_bytes() == body@@ -91,7 +91,7 @@ def test_windows_bootstrap_rejects_corrupt_bytes_before_extract(tmp_path, serverencoding="utf-8",)result = subprocess.run(["powershell", "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-File", str(script)],- capture_output=True, text=True, timeout=60)+ capture_output=True, text=True, timeout=60, check=False)assert result.returncode != 0assert "digest mismatch" in result.stdout + result.stderrassert server[0].requests == ["/primary"]@@ -121,7 +121,7 @@ uv_bootstrap_pin() {{ UV_PIN_VERSION=fixture; UV_PIN_URL='{primary}'; UV_PIN_MIRensure_uv"""env = {**os.environ, "HERMES_HOME": str(tmp_path / "home"), "HOME": str(tmp_path / "home"), "HERMES_RUNTIME_DIR": str(tmp_path / "tools")}- result = subprocess.run(["bash", "-c", script], cwd=tmp_path, env=env, capture_output=True, text=True, timeout=60)+ result = subprocess.run(["bash", "-c", script], cwd=tmp_path, env=env, capture_output=True, text=True, timeout=60, check=False)assert (result.returncode == 0) == (mode in ("primary", "missing")), result.stdout + result.stderrif mode == "corrupt":assert "digest mismatch" in result.stderr@@ -139,7 +139,7 @@ def test_generated_windows_pins_match_the_shared_authority(tmp_path):"@{uv=$script:UvPinFiles; git=$script:GitPinFiles} | ConvertTo-Json -Depth 5 -Compress\n",encoding="utf-8",)- result = subprocess.run(["powershell", "-NoProfile", "-NonInteractive", "-File", str(script)], capture_output=True, text=True, timeout=30)+ result = subprocess.run(["powershell", "-NoProfile", "-NonInteractive", "-File", str(script)], capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stderremitted = json.loads(result.stdout)lock = json.loads((ROOT / "pm/lock.json").read_text(encoding="utf-8"))["packages"]@@ -166,6 +166,6 @@ def test_dev_setup_reaches_the_same_mirror_without_python(tmp_path, server):"python": {"version": "3.14.7"},}}, indent=2, sort_keys=True), encoding="utf-8")env = {**os.environ, "HERMES_HOME": str(tmp_path / "home"), "HOME": str(tmp_path / "home"), "HERMES_RUNTIME_DIR": str(tmp_path / "tools")}- result = subprocess.run(["bash", str(repo / "setup-hermes.sh")], cwd=repo, env=env, text=True, capture_output=True, timeout=60)+ result = subprocess.run(["bash", str(repo / "setup-hermes.sh")], cwd=repo, env=env, text=True, capture_output=True, timeout=60, check=False)assert result.returncode == 73, result.stdout + result.stderr # stop at the bootstrap interpreter boundaryassert http.requests == ["/missing.tar.gz", "/archive/" + digest]diff --git a/tests/scripts/test_bootstrap_pins_fragment.py b/tests/scripts/test_bootstrap_pins_fragment.pyindex f6344fb77bb..746f876f01a 100644--- a/tests/scripts/test_bootstrap_pins_fragment.py+++ b/tests/scripts/test_bootstrap_pins_fragment.py@@ -9,5 +9,6 @@ def test_fragments_match_the_pin_table():result = subprocess.run([sys.executable, str(root / "scripts/gen-bootstrap-pins.py"), "--check"],cwd=root, capture_output=True, text=True, timeout=60,+ check=False,)assert result.returncode == 0, result.stdout + result.stderrdiff --git a/tests/scripts/test_bundle_native.py b/tests/scripts/test_bundle_native.pyindex fc27d595c02..deca7222d7b 100644--- a/tests/scripts/test_bundle_native.py+++ b/tests/scripts/test_bundle_native.py@@ -285,14 +285,14 @@ def test_bundle_stages_git_tree_and_runs_native_children_before_manifest(tmp_patmoved = tmp_path / "installed elsewhere"output.rename(moved)try:- run = subprocess.run([str(moved / command)], cwd=tmp_path, capture_output=True, text=True, timeout=30)+ run = subprocess.run([str(moved / command)], cwd=tmp_path, capture_output=True, text=True, timeout=30, check=False)assert run.returncode == 7, run.stderrassert run.stdout.strip() == "1.0"from pm import runtime as runtime_api, pathswith monkeypatch.context() as patch:patch.setattr(paths, "repo_root", lambda: moved / "hermes-agent")run = subprocess.run(runtime_api.runtime_command(moved / "hermes-agent/pm/launch.py", ["status"]),- cwd=tmp_path, env=runtime_api.runtime_environment(), capture_output=True, text=True, timeout=30)+ cwd=tmp_path, env=runtime_api.runtime_environment(), capture_output=True, text=True, timeout=30, check=False)assert run.returncode == 0, run.stderrassert "no pm sync receipt" in run.stdoutfinally:@@ -509,16 +509,19 @@ def test_staged_cache_ships_full_wheel_set_and_rebuilds_offline(tmp_path):"--no-deps", "--index-url", index_url,"cache-proof==1.0.0", "wheel-proof==1.0"],env=env, cwd=tmp_path, capture_output=True, text=True, timeout=60,+ check=False,)assert warm.returncode == 0, warm.stderr + warm.stdoutlocked = subprocess.run([uv, "lock", "--python", sys.executable, "--index-url", index_url],env=env, cwd=project, capture_output=True, text=True, timeout=60,+ check=False,)assert locked.returncode == 0, locked.stderrwarmed = subprocess.run([uv, "sync", "--python", sys.executable, "--frozen", "--index-url", index_url],env=env, cwd=project, capture_output=True, text=True, timeout=60,+ check=False,)assert warmed.returncode == 0, warmed.stderr@@ -543,6 +546,7 @@ def test_staged_cache_ships_full_wheel_set_and_rebuilds_offline(tmp_path):[uv, "sync", "--python", sys.executable, "--frozen", "--offline"],env={**env, "UV_CACHE_DIR": str(shipped)}, cwd=project,capture_output=True, text=True, timeout=60,+ check=False,)assert result.returncode == 0, result.stderrassert "Building" not in result.stderr and "Built" not in result.stdout, result.stderr + result.stdoutdiff --git a/tests/scripts/test_bundle_npm.py b/tests/scripts/test_bundle_npm.pyindex 3164b1ef673..6d3656db46e 100644--- a/tests/scripts/test_bundle_npm.py+++ b/tests/scripts/test_bundle_npm.py@@ -26,7 +26,7 @@ def test_bundle_npm_runs_workspace_from_unrelated_directory(tmp_path):npm_config_offline="true")result = subprocess.run([*npm_command(node), "--prefix", str(workspace),"run", "--silent", "build", "--", "two words", "$(literal)"],- cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30)+ cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 7, result.stdout + result.stderrchild = json.loads(result.stdout)assert child["args"] == ["two words", "$(literal)"]diff --git a/tests/scripts/test_bundle_payload.py b/tests/scripts/test_bundle_payload.pyindex 07d0b2f14ed..9add8ab5d35 100644--- a/tests/scripts/test_bundle_payload.py+++ b/tests/scripts/test_bundle_payload.py@@ -65,6 +65,6 @@ def test_both_launchers_keep_active_home_and_call_declared_function(tmp_path, talauncher = root / "bin/custom"launcher.write_text(posix_launcher("custom", "entry:run", python="python", repo="app", site="deps", target=target), encoding="utf-8")result = subprocess.run(["sh", str(launcher), "two words", "$(nope)", ""], cwd=tmp_path,- env={**os.environ, "HERMES_HOME": str(tmp_path / "custom/profiles/memory")}, capture_output=True, text=True)+ env={**os.environ, "HERMES_HOME": str(tmp_path / "custom/profiles/memory")}, capture_output=True, text=True, check=False)assert result.returncode == 7, result.stderrassert json.loads(result.stdout) == [str(tmp_path / "custom/profiles/memory"), ["two words", "$(nope)", ""]]diff --git a/tests/scripts/test_case_collision_check.py b/tests/scripts/test_case_collision_check.pyindex 4546919b9ec..e792e595130 100644--- a/tests/scripts/test_case_collision_check.py+++ b/tests/scripts/test_case_collision_check.py@@ -39,6 +39,7 @@ def _run_check(*args, root=None):timeout=60,stdin=subprocess.DEVNULL,cwd=REPO_ROOT,+ check=False,)diff --git a/tests/scripts/test_channel_build_versions.py b/tests/scripts/test_channel_build_versions.pyindex 0c57f1c1dcc..9ca548f0d63 100644--- a/tests/scripts/test_channel_build_versions.py+++ b/tests/scripts/test_channel_build_versions.py@@ -74,7 +74,7 @@ def test_prepare_cli_accepts_request_path_but_refuses_mismatched_checkout_beforerepo = Path(__file__).resolve().parents[2]result = subprocess.run([sys.executable, str(repo / "scripts/bundles/desktop.py"),"--prepare-only", "--repo", str(source), "--channel-request", str(path)],- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert result.returncode != 0assert "unrecognized arguments" not in result.stderrassert "checkout" in result.stderrdiff --git a/tests/scripts/test_commit_bundle_entrypoints.py b/tests/scripts/test_commit_bundle_entrypoints.pyindex 5ddb3bed1cd..659a60a3dbd 100644--- a/tests/scripts/test_commit_bundle_entrypoints.py+++ b/tests/scripts/test_commit_bundle_entrypoints.py@@ -105,7 +105,7 @@ def test_termux_commit_args_reach_prerequisite_checks_without_mutation(tmp_path)if script.name == "build_deb.sh":args += ["--payload", str(tmp_path / "absent")]result = subprocess.run([_BASH, str(script), *args], env=env, cwd=tmp_path,- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 1, result.stdout + result.stderrassert "usage:" not in result.stderrassert not out.exists()diff --git a/tests/scripts/test_commit_stamp_identity.py b/tests/scripts/test_commit_stamp_identity.pyindex 45396118783..041d7241d7e 100644--- a/tests/scripts/test_commit_stamp_identity.py+++ b/tests/scripts/test_commit_stamp_identity.py@@ -50,7 +50,7 @@ def test_stamp_uses_built_commit_even_with_dispatch_sha_and_refuses_mismatch(tmpdef run(*args, override=None):return subprocess.run([*command, *args], cwd=tmp_path, env={**env, **(override or {})},- capture_output=True, text=True, encoding='utf-8', timeout=30)+ capture_output=True, text=True, encoding='utf-8', timeout=30, check=False)result = run()assert result.returncode == 0, result.stderrdiff --git a/tests/scripts/test_contributor_map.py b/tests/scripts/test_contributor_map.pyindex bc40db46be7..b12d230886b 100644--- a/tests/scripts/test_contributor_map.py+++ b/tests/scripts/test_contributor_map.py@@ -102,6 +102,7 @@ def test_cli_entrypoint_end_to_end(tmp_path):[sys.executable, str(scripts / "add_contributor.py"),"[email protected]", "cliperson", "via subprocess"],cwd=tmp_path, capture_output=True, text=True,+ check=False,)assert proc.returncode == 0, proc.stderrout = (tmp_path / "contributors" / "emails" / "[email protected]").read_text(encoding="utf-8")diff --git a/tests/scripts/test_desktop_build_cache.py b/tests/scripts/test_desktop_build_cache.pyindex 831275f568e..aa5da232dad 100644--- a/tests/scripts/test_desktop_build_cache.py+++ b/tests/scripts/test_desktop_build_cache.py@@ -43,6 +43,7 @@ def describe(source, cache, tmp_path, *extra):cwd=tmp_path, env={**os.environ, "GITHUB_OUTPUT": str(output),"GITHUB_RUN_ID": "123", "GITHUB_RUN_ATTEMPT": "2", "GITHUB_JOB": "desktop"},capture_output=True, text=True, encoding="utf-8", timeout=30,+ check=False,)assert result.returncode == 0, result.stdout + result.stderrreturn json.loads(result.stdout), dict(line.split("=", 1) for line in output.read_text(encoding="utf-8-sig").splitlines())@@ -165,6 +166,7 @@ def test_composite_transports_only_and_uses_the_restore_key_for_save(tmp_path):["bash", "-e", "-c", describe_step["run"]], cwd=tmp_path,env={**os.environ, **env, "GITHUB_OUTPUT": str(output), "RUNNER_OS": "Linux"},capture_output=True, text=True, encoding="utf-8", timeout=30,+ check=False,)return result@@ -256,7 +258,7 @@ def test_direct_snapshot_preserves_node_receipt_and_excludes_job_secrets(tmp_patdef npm(*args):return subprocess.run([node, str(owner), *args], cwd=source, env=env,- capture_output=True, text=True, encoding="utf-8", timeout=30)+ capture_output=True, text=True, encoding="utf-8", timeout=30, check=False)locked = npm("--npm", "install", "--package-lock-only", "--ignore-scripts", "--no-audit", "--no-fund")assert locked.returncode == 0, locked.stdout + locked.stderrdiff --git a/tests/scripts/test_desktop_cli_wrapper.py b/tests/scripts/test_desktop_cli_wrapper.pyindex 507e2ecd0ca..ac8e1aedb44 100644--- a/tests/scripts/test_desktop_cli_wrapper.py+++ b/tests/scripts/test_desktop_cli_wrapper.py@@ -231,5 +231,5 @@ def test_rendered_wrapper_dispatches_to_the_entry_module(tmp_path):env = {k: v for k, v in os.environ.items() if k not in ("PYTHONPATH", "PYTHONHOME", "PYTHONPYCACHEPREFIX")}env["LOCALAPPDATA"] = str(tmp_path / "lad")python = Path(sys.base_prefix) / "python.exe" if sys.platform == "win32" else sys.executable- proc = subprocess.run([str(python), str(wrapper), "--version"], capture_output=True, text=True, env=env)+ proc = subprocess.run([str(python), str(wrapper), "--version"], capture_output=True, text=True, env=env, check=False)assert proc.returncode == 7, proc.stderrdiff --git a/tests/scripts/test_desktop_preparation.py b/tests/scripts/test_desktop_preparation.pyindex b2ccb74de0d..082b01407f5 100644--- a/tests/scripts/test_desktop_preparation.py+++ b/tests/scripts/test_desktop_preparation.py@@ -167,7 +167,7 @@ def test_prepared_cli_rejects_missing_result_without_provisioning(tmp_path):source = Path(__file__).resolve().parents[2]absent = tmp_path / "absent" / "prepared.json"result = subprocess.run([sys.executable, str(source / "scripts/bundles/desktop.py"), "--prepared", str(absent)],- cwd=tmp_path, capture_output=True, text=True, timeout=30)+ cwd=tmp_path, capture_output=True, text=True, timeout=30, check=False)assert result.returncode != 0assert "preparation" in result.stderr.lower()assert "unrecognized arguments" not in result.stderr@@ -227,9 +227,9 @@ def test_checkout_lock_excludes_a_second_build_process(tmp_path):)command = [sys.executable, "-I", "-c", probe, str(project), str(source)]with build_lock(source):- blocked = subprocess.run(command, capture_output=True, text=True, timeout=30)+ blocked = subprocess.run(command, capture_output=True, text=True, timeout=30, check=False)assert blocked.returncode != 0 and "another desktop" in blocked.stderr- released = subprocess.run(command, capture_output=True, text=True, timeout=30)+ released = subprocess.run(command, capture_output=True, text=True, timeout=30, check=False)assert released.returncode == 0, released.stderrassert released.stdout.strip() == "acquired"diff --git a/tests/scripts/test_desktop_update_target.py b/tests/scripts/test_desktop_update_target.pyindex c9452a6a4f9..5f2a1a94af4 100644--- a/tests/scripts/test_desktop_update_target.py+++ b/tests/scripts/test_desktop_update_target.py@@ -127,6 +127,7 @@ def _run_handoff(tmp_path, target, *, windows=False, inherited_home=True, moderntext=True,encoding="utf-8",timeout=90,+ check=False,)calls = ([json.loads(line) for line in capture.read_text(encoding="utf-8").splitlines()]diff --git a/tests/scripts/test_dev_sandbox.py b/tests/scripts/test_dev_sandbox.pyindex 1e1dbfdfea6..3d132b177b0 100644--- a/tests/scripts/test_dev_sandbox.py+++ b/tests/scripts/test_dev_sandbox.py@@ -28,7 +28,7 @@ def test_ephemeral_sandbox_preserves_command_and_removes_state(tmp_path, entry,env = {key: value for key, value in os.environ.items() if not key.startswith("HERMES_DEV_SANDBOX_")}result = subprocess.run(["bash", str(root / "scripts" / entry), "--", sys.executable,str(probe), str(output), "argument with spaces"], cwd=checkout,- env=env, stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=20)+ env=env, stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=20, check=False)assert result.returncode == 7, result.stderrobserved = json.loads(output.read_text(encoding="utf-8-sig"))home = Path(observed["env"]["HERMES_HOME"])diff --git a/tests/scripts/test_dmgbuild_diagnostics.py b/tests/scripts/test_dmgbuild_diagnostics.pyindex 912de4190c1..ffc70588e4e 100644--- a/tests/scripts/test_dmgbuild_diagnostics.py+++ b/tests/scripts/test_dmgbuild_diagnostics.py@@ -117,7 +117,7 @@ def test_diagnostic_entrypoint_preserves_cli_arguments_and_failure(tmp_path):result = subprocess.run([sys.executable, str(Path(diagnostics.__file__)), *args],cwd=tmp_path, env={**os.environ, "PYTHONPATH": str(tmp_path)},stdout=subprocess.PIPE, stderr=subprocess.STDOUT,- text=True, encoding="utf-8", timeout=60)+ text=True, encoding="utf-8", timeout=60, check=False)assert result.returncode == 16assert json.dumps(args) in result.stdoutassert result.stdout.index("[dmg-detach]") < result.stdout.index("fixture native detach -force")@@ -133,7 +133,7 @@ def test_native_busy_image_reports_the_process_holding_its_file(tmp_path):def native(command, *args, plist=True):argv = ["/usr/bin/hdiutil", command, *args, *(["-plist"] if plist else [])]- result = subprocess.run(argv, capture_output=True, timeout=60)+ result = subprocess.run(argv, capture_output=True, timeout=60, check=False)output = plistlib.loads(result.stdout) if plist and result.returncode == 0 else (result.stdout + result.stderr).decode()return result.returncode, output@@ -156,4 +156,4 @@ def test_native_busy_image_reports_the_process_holding_its_file(tmp_path):assert "COMMAND" in report and "PID" in reportfinally:if device:- subprocess.run(["/usr/bin/hdiutil", "detach", "-force", device], capture_output=True, timeout=60)+ subprocess.run(["/usr/bin/hdiutil", "detach", "-force", device], capture_output=True, timeout=60, check=False)diff --git a/tests/scripts/test_fresh_source_install.py b/tests/scripts/test_fresh_source_install.pyindex 59ca6f0004f..3bd17b97578 100644--- a/tests/scripts/test_fresh_source_install.py+++ b/tests/scripts/test_fresh_source_install.py@@ -57,7 +57,7 @@ def test_current_installer_publishes_real_dependencies_and_warm_path(tmp_path, senv[key] = os.environ[key]def run(argv, *, cwd=tmp_path, expected=0):- result = subprocess.run(argv, cwd=cwd, env=env, capture_output=True, text=True, timeout=180)+ result = subprocess.run(argv, cwd=cwd, env=env, capture_output=True, text=True, timeout=180, check=False)assert result.returncode == expected, result.stdout + result.stderrreturn resultdiff --git a/tests/scripts/test_icon_flavors.py b/tests/scripts/test_icon_flavors.pyindex f5d75551abf..d22d6d3b517 100644--- a/tests/scripts/test_icon_flavors.py+++ b/tests/scripts/test_icon_flavors.py@@ -48,14 +48,14 @@ def generate(tmp_path_factory):"PYTHONHOME": str(root / "foreign-python"), "HERMES_DISABLE_LAZY_INSTALLS": "1"}command = [node, str(ROOT / "scripts/generate-icons.mjs"),"--source", str(source), "--out", str(out)]- result = subprocess.run(command, env=env, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=180)+ result = subprocess.run(command, env=env, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=180, check=False)if rejected:assert result.returncode != 0, "invalid build identity generated icons"assert not out.exists()returnassert result.returncode == 0, result.stdout + result.stderrif not outputs:- checked = subprocess.run([*command, "--check"], env=env, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=180)+ checked = subprocess.run([*command, "--check"], env=env, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=180, check=False)assert checked.returncode == 0, checked.stdout + checked.stderroutputs[key] = outreturn outputs[key]diff --git a/tests/scripts/test_install_sh_launch_handoff.py b/tests/scripts/test_install_sh_launch_handoff.pyindex 5faca3fe69c..ef069dbce91 100644--- a/tests/scripts/test_install_sh_launch_handoff.py+++ b/tests/scripts/test_install_sh_launch_handoff.py@@ -40,7 +40,7 @@ def test_installer_post_pm_stages(tmp_path: Path, stage: str, expected: list[strenv = {**os.environ, 'HOME': str(tmp_path), 'HERMES_HOME': str(tmp_path / 'home'), 'HERMES_RUNTIME_DIR': str(tmp_path / 'store'), 'CALLS': str(calls)}# `curl | bash` and Docker builds have no terminal: the interactive stage is skipped, not failed.result = subprocess.run(command, cwd=tmp_path, env={**env, 'STAGE_EXIT': '9'}, capture_output=True, text=True,- encoding='utf-8', timeout=20, start_new_session=True)+ encoding='utf-8', timeout=20, start_new_session=True, check=False)assert result.returncode == 0, result.stdout + result.stderrassert not calls.exists()master, slave = pty.openpty()@@ -52,7 +52,7 @@ def test_installer_post_pm_stages(tmp_path: Path, stage: str, expected: list[strfor code in [0, 9]:result = subprocess.run(command, cwd=tmp_path, env={**env, 'STAGE_EXIT': str(code)}, capture_output=True,text=True, encoding='utf-8', timeout=20, stdin=subprocess.DEVNULL,- preexec_fn=_with_controlling_terminal(tty_path))+ preexec_fn=_with_controlling_terminal(tty_path), check=False)assert calls.exists(), (result.returncode, result.stdout, result.stderr)assert (result.returncode == 0) == (code == 0), result.stdout + result.stderrassert json.loads(calls.read_text()) == expected@@ -82,7 +82,7 @@ def test_products_and_desktop_stages_share_the_completion_tail(tmp_path: Path, s'test', str(ROOT / 'scripts/install.sh'), str(install), stage]env = {**os.environ, 'HOME': str(tmp_path), 'HERMES_HOME': str(tmp_path / 'home'),'HERMES_RUNTIME_DIR': str(tmp_path / 'store'), 'CALLS': str(calls), 'PYTHON_FOR_TEST': sys.executable}- result = subprocess.run(command, cwd=tmp_path, env=env, capture_output=True, text=True, timeout=20)+ result = subprocess.run(command, cwd=tmp_path, env=env, capture_output=True, text=True, timeout=20, check=False)assert result.returncode == 0, result.stdout + result.stderrargv = json.loads(calls.read_text())assert argv[:2] == ['--source', str(install)]diff --git a/tests/scripts/test_install_sh_python_pin_indent.py b/tests/scripts/test_install_sh_python_pin_indent.pyindex 9c32dc58191..77f8ebe200d 100644--- a/tests/scripts/test_install_sh_python_pin_indent.py+++ b/tests/scripts/test_install_sh_python_pin_indent.py@@ -59,7 +59,7 @@ def test_bootstrap_python_reads_pin_independent_of_indentation(tmp_path, indent,"bootstrap_python\n")env = dict(os.environ, HOME=str(tmp_path), HERMES_HOME=str(tmp_path / ".hermes"))- result = subprocess.run(["bash", "-c", script], env=env, capture_output=True, text=True, timeout=30)+ result = subprocess.run(["bash", "-c", script], env=env, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stdout + result.stderr# A layout-sensitive reader resolves no version, falls back to "3.14", and# the argv witness exits 91 on an unexpected pin. Cold/warm acquisition isdiff --git a/tests/scripts/test_install_stage_frames.py b/tests/scripts/test_install_stage_frames.pyindex 19e8ea76dd9..0337f918b2e 100644--- a/tests/scripts/test_install_stage_frames.py+++ b/tests/scripts/test_install_stage_frames.py@@ -48,7 +48,7 @@ INSTALL_COMMIT=fixturerun_stage "$STAGE"'''result = subprocess.run(["bash", "-c", script, "stage-test", SCRIPT.as_posix()],- cwd=tmp_path, env=env, capture_output=True, text=True, encoding="utf-8", timeout=30)+ cwd=tmp_path, env=env, capture_output=True, text=True, encoding="utf-8", timeout=30, check=False)frame = _frame(result)assert frame["stage"] == stageassert frame["ok"] is (result.returncode == 0)@@ -69,7 +69,7 @@ def test_real_single_stage_cli_reports_admission_or_execution_failure(tmp_path,result = subprocess.run([real_bash, "-c", 'exec "$0" "$1" --stage "$PROBE_STAGE" --json',real_bash, SCRIPT.as_posix()],cwd=tmp_path, env=env, capture_output=True,- text=True, encoding="utf-8", timeout=30)+ text=True, encoding="utf-8", timeout=30, check=False)assert result.returncode != 0frame = _frame(result)assert frame["stage"] == stage and frame["ok"] is False@@ -81,7 +81,7 @@ def test_manifest_accepts_the_desktop_home_argument(tmp_path, flag):home = tmp_path / "custom home"result = subprocess.run(["bash", str(SCRIPT), "--manifest", flag, str(home)],cwd=tmp_path, env=_env(tmp_path), capture_output=True,- text=True, encoding="utf-8", timeout=30)+ text=True, encoding="utf-8", timeout=30, check=False)assert result.returncode == 0, result.stderrmanifest = json.loads(result.stdout)assert any(row["name"] == "products" for row in manifest["stages"])@@ -94,6 +94,6 @@ bash -c 'printf "%s\\n" "$HERMES_HOME"''''resolved = subprocess.run(["bash", "-c", script, "home-test", SCRIPT.as_posix()],cwd=tmp_path, env=env, capture_output=True,- text=True, encoding="utf-8", timeout=30)+ text=True, encoding="utf-8", timeout=30, check=False)assert resolved.returncode == 0, resolved.stderrassert resolved.stdout.splitlines() == [(home / "hermes-agent").as_posix(), home.as_posix()]diff --git a/tests/scripts/test_mint_launchers.py b/tests/scripts/test_mint_launchers.pyindex c3643bf9d62..04140e21e2b 100644--- a/tests/scripts/test_mint_launchers.py+++ b/tests/scripts/test_mint_launchers.py@@ -99,7 +99,7 @@ def _mint(bin_dir: Path, wrapper: Path, specs) -> list[str]:HERMES_MINT_WRAPPER=str(wrapper),HERMES_MINT_PYTHON=r"<launcher_dir>\..\tools\py-1\python.exe",)- proc = subprocess.run([sys.executable, str(_MINT)], capture_output=True, text=True, env=env)+ proc = subprocess.run([sys.executable, str(_MINT)], capture_output=True, text=True, env=env, check=False)assert proc.returncode == 0, proc.stderrreturn proc.stdout.split()@@ -141,7 +141,7 @@ def test_minted_launcher_runs_relocated_and_forwards_exit_code(payload_tree, tmpenv = {k: v for k, v in os.environ.items() if k not in ("PYTHONPATH", "PYTHONHOME", "PYTHONPYCACHEPREFIX")}env["LOCALAPPDATA"] = str(payload_tree["tmp"] / "lad")- proc = subprocess.run([str(exe), "--version"], capture_output=True, text=True, cwd=tmp_path, env=env)+ proc = subprocess.run([str(exe), "--version"], capture_output=True, text=True, cwd=tmp_path, env=env, check=False)assert proc.returncode == 7, proc.stderr[-800:]assert proc.stdout.strip() == "OK None" # PYTHONHOME was dropped@@ -160,6 +160,6 @@ def test_mint_rejects_a_non_launcher_dir_shebang(tmp_path):wrapper = tmp_path / "w.py"wrapper.write_text("x = 1\n", encoding="utf-8")env["HERMES_MINT_WRAPPER"] = str(wrapper)- proc = subprocess.run([sys.executable, str(_MINT)], capture_output=True, text=True, env=env)+ proc = subprocess.run([sys.executable, str(_MINT)], capture_output=True, text=True, env=env, check=False)assert proc.returncode != 0assert "launcher_dir" in proc.stderrdiff --git a/tests/scripts/test_native_build.py b/tests/scripts/test_native_build.pyindex e8fb239b264..17cf873129b 100644--- a/tests/scripts/test_native_build.py+++ b/tests/scripts/test_native_build.py@@ -81,18 +81,18 @@ def test_native_cli_consumes_real_minimal_preparation_without_bootstrap(tmp_path))env = {**os.environ, "UV_OFFLINE": "1", "HERMES_HOME": str(tmp_path / "private")}command = [sys.executable, "-S", "-B", str(SCRIPT), "--prepared", str(prepared)]- result = subprocess.run(command, cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30)+ result = subprocess.run(command, cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stderrmanifest = json.loads((out / "manifest.json").read_text())assert manifest["runtime"]["commands"] == {"probe": "bin/probe"}assert not (code / "hermes_cli/tui_dist").exists()assert not (code / "hermes_cli/web_dist").exists()- probe = subprocess.run([str(out / "bin/probe")], cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30)+ probe = subprocess.run([str(out / "bin/probe")], cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30, check=False)assert probe.returncode == 0, probe.stderrassert probe.stdout.strip() == "native fixture"assert not (tmp_path / "private").exists()(site / "changed.py").write_text("changed = True")- result = subprocess.run(command, cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30)+ result = subprocess.run(command, cwd=tmp_path, env=env, capture_output=True, text=True, timeout=30, check=False)assert result.returncode != 0assert "prepare" in result.stderrassert not (out / "manifest.json").exists()diff --git a/tests/scripts/test_payload_digests.py b/tests/scripts/test_payload_digests.pyindex dc2039dcc2b..ce2b64d9ce1 100644--- a/tests/scripts/test_payload_digests.py+++ b/tests/scripts/test_payload_digests.py@@ -34,6 +34,7 @@ def _rehash(root, cwd):return subprocess.run([sys.executable, str(Path(payload.__file__)), "rehash", str(root)],cwd=cwd, capture_output=True, text=True, encoding="utf-8", timeout=60,+ check=False,)diff --git a/tests/scripts/test_pm_runtime_bundle.py b/tests/scripts/test_pm_runtime_bundle.pyindex 8327da6429b..fdd0c397bfa 100644--- a/tests/scripts/test_pm_runtime_bundle.py+++ b/tests/scripts/test_pm_runtime_bundle.py@@ -65,14 +65,14 @@ assert importlib.util.find_spec('yaml') is Noneprint(json.dumps(YAML(typ='safe').load('isolated: true')))"""checked = subprocess.run([str(base), "-I", "-S", "-B", "-c", probe, str(site)],- cwd=tmp_path, capture_output=True, text=True, timeout=30)+ cwd=tmp_path, capture_output=True, text=True, timeout=30, check=False)assert checked.returncode == 0, checked.stderrassert json.loads(checked.stdout) == {"isolated": True}from pm import runtime as runtime_api, pathsmonkeypatch.setattr(paths, "repo_root", lambda: moved / "hermes-agent")command = runtime_api.runtime_command(moved / "hermes-agent/pm/launch.py", ["status"])checked = subprocess.run(command, cwd=tmp_path, env=runtime_api.runtime_environment(),- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert checked.returncode == 0, checked.stderrassert "no pm sync receipt" in checked.stdoutassert str(root) not in (runtime / "pyvenv.cfg").read_text()diff --git a/tests/scripts/test_powershell_script_syntax.py b/tests/scripts/test_powershell_script_syntax.pyindex eff889b9887..7a72a89d8fd 100644--- a/tests/scripts/test_powershell_script_syntax.py+++ b/tests/scripts/test_powershell_script_syntax.py@@ -105,6 +105,7 @@ def test_powershell_scripts_parse(tmp_path: Path) -> None:capture_output=True,text=True,timeout=120,+ check=False,)assert result.returncode == 0, (f"PowerShell parse errors:\n{result.stdout}\n{result.stderr}"diff --git a/tests/scripts/test_release_artifacts.py b/tests/scripts/test_release_artifacts.pyindex e72d522d4be..8b35e23e50a 100644--- a/tests/scripts/test_release_artifacts.py+++ b/tests/scripts/test_release_artifacts.py@@ -351,7 +351,7 @@ def candidate_workflow_step(tmp_path, r2_server, staged_candidate):env[key] = expressions.get(value, value)assert '${{' not in env[key], (key, value)return subprocess.run(['bash', '-e', '-o', 'pipefail', '-c', step['run']], cwd=tmp_path,- env=env, capture_output=True, text=True, encoding='utf-8', timeout=60)+ env=env, capture_output=True, text=True, encoding='utf-8', timeout=60, check=False)return jobs, run, body_filediff --git a/tests/scripts/test_release_build_commit.py b/tests/scripts/test_release_build_commit.pyindex a373809a363..4edc5137d08 100644--- a/tests/scripts/test_release_build_commit.py+++ b/tests/scripts/test_release_build_commit.py@@ -86,7 +86,7 @@ else:calls.unlink(missing_ok=True)result = subprocess.run([sys.executable, '-I', '-S', str(driver), str(repo), *args],cwd=repo, env={**env, **(extra or {})}, capture_output=True,- text=True, encoding='utf-8', timeout=45)+ text=True, encoding='utf-8', timeout=45, check=False)recorded = [json.loads(line) for line in calls.read_text(encoding='utf-8').splitlines()] if calls.exists() else []return result, recordeddiff --git a/tests/scripts/test_release_docker_cli.py b/tests/scripts/test_release_docker_cli.pyindex a14403102a8..8035be3b09d 100644--- a/tests/scripts/test_release_docker_cli.py+++ b/tests/scripts/test_release_docker_cli.py@@ -25,7 +25,7 @@ def test_cli_manifest_and_verify(tmp_path):def cli(*args):return subprocess.run([sys.executable, '-m', 'scripts.releases.docker', *args],- cwd=ROOT, capture_output=True, text=True, encoding='utf-8', timeout=30)+ cwd=ROOT, capture_output=True, text=True, encoding='utf-8', timeout=30, check=False)for extra in ([], archives):result = cli('manifest', *identity, *digests, *extra)diff --git a/tests/scripts/test_release_handoff.py b/tests/scripts/test_release_handoff.pyindex edd1c05d788..80ffd46a3a6 100644--- a/tests/scripts/test_release_handoff.py+++ b/tests/scripts/test_release_handoff.py@@ -188,7 +188,7 @@ def test_public_handoff_downloads_exact_staged_bytes_without_credentials(tmp_patassert any(path.endswith('/app%20x64.msix') for _, path, _ in r2_server.requests)result = subprocess.run([sys.executable, '-m', 'scripts.releases.handoff', *args],cwd=Path(__file__).resolve().parents[2], env=os.environ,- capture_output=True, text=True, encoding='utf-8', timeout=30)+ capture_output=True, text=True, encoding='utf-8', timeout=30, check=False)assert result.returncode == 0, result.stdout + result.stderrassert (download / 'app x64.msix').read_bytes() == payload# A bad CDN object cannot replace a previously verified local download.diff --git a/tests/scripts/test_release_r2.py b/tests/scripts/test_release_r2.pyindex a671637b32b..cfe50969ebe 100644--- a/tests/scripts/test_release_r2.py+++ b/tests/scripts/test_release_r2.py@@ -573,6 +573,7 @@ def test_cli_reuses_an_immutable_multipart_object(r2_server, tmp_path):result = subprocess.run([sys.executable, "-c", script, "put", "--tag", "v1.0.0", "--key", path.name, "--file", str(path), "--immutable"],cwd=Path(__file__).resolve().parents[2], env=os.environ, capture_output=True, text=True, timeout=60,+ check=False,)assert result.returncode == 0, result.stdout + result.stderrassert [method for method, _, _ in r2_server.requests] == ["POST", "GET", "HEAD"]diff --git a/tests/scripts/test_run_in_hermes_env.py b/tests/scripts/test_run_in_hermes_env.pyindex 61a2bfd6da7..a3006af3145 100644--- a/tests/scripts/test_run_in_hermes_env.py+++ b/tests/scripts/test_run_in_hermes_env.py@@ -104,6 +104,7 @@ def _run_in(root: Path, *command: str, sentinel: str | None = "{root}/state/factreturn subprocess.run([bash(), posix(root / "scripts" / RUNNER.name), *command],capture_output=True, text=True, cwd=posix(root), env=env, timeout=60,+ check=False,)diff --git a/tests/scripts/test_run_tests_parallel.py b/tests/scripts/test_run_tests_parallel.pyindex 5e2f3ee6642..c722780226d 100644--- a/tests/scripts/test_run_tests_parallel.py+++ b/tests/scripts/test_run_tests_parallel.py@@ -101,6 +101,7 @@ def test_progress_output_tolerates_legacy_stdout_encoding(tmp_path: Path) -> Nonstderr=subprocess.STDOUT,text=True,timeout=60,+ check=False,)assert proc.returncode == 0, proc.stdout@@ -195,6 +196,7 @@ def test_grandchild_leak_is_killed_by_runner(tmp_path: Path) -> None:encoding="utf-8",errors="replace",timeout=60,+ check=False,)assert handoff.exists(), (@@ -311,6 +313,7 @@ def _run_runner(probe_dir: Path, *extra: str) -> subprocess.CompletedProcess:encoding="utf-8",errors="replace",timeout=60,+ check=False,)@@ -330,6 +333,7 @@ def test_help_prints_usage_without_discovering_or_running_tests(encoding="utf-8",errors="replace",timeout=10,+ check=False,)assert proc.returncode == 0, proc.stdout@@ -411,6 +415,7 @@ def test_file_retry_self_heals_and_prints_both_attempts(tmp_path: Path) -> None:stderr=subprocess.STDOUT,text=True,timeout=60,+ check=False,)assert proc.returncode == 0, proc.stdout@@ -469,7 +474,7 @@ def test_runner_selection_records_actual_test_identity(tmp_path, form, expected)}[form]runner = _probe_root(tmp_path) / "scripts/run_tests_parallel.py"result = subprocess.run([sys.executable, str(runner), *arguments, "-j", "1", "--file-timeout", "30"],- cwd=tmp_path, capture_output=True, text=True, encoding="utf-8", timeout=60)+ cwd=tmp_path, capture_output=True, text=True, encoding="utf-8", timeout=60, check=False)assert result.returncode == 0, result.stdout + result.stderrassert sorted(path.name for path in receipt.iterdir()) == expected@@ -499,7 +504,7 @@ def test_passthrough_ignore_drops_files_the_runner_hands_pytest_explicitly("path": ["--ignore=tests/probe/test_gated_skipme.py"]}[ignore]runner = root / "scripts/run_tests_parallel.py"result = subprocess.run([sys.executable, str(runner), *pick, "-j", "1", "--file-timeout", "30", "--", *flag],- cwd=tmp_path, capture_output=True, text=True, encoding="utf-8", timeout=60)+ cwd=tmp_path, capture_output=True, text=True, encoding="utf-8", timeout=60, check=False)assert result.returncode == 0, result.stdout + result.stderrassert sorted(path.name for path in receipt.iterdir()) == ["keep"], result.stdoutassert "excluded 1 test file" in result.stdout, result.stdout@@ -585,6 +590,7 @@ def test_files_from_dash_reads_the_list_from_stdin(tmp_path: Path) -> None:input=f"{probe_dir / 'test_flagprobe.py'}\n",cwd=repo_root, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,encoding="utf-8", errors="replace", timeout=60,+ check=False,)assert proc.returncode == 0, proc.stdoutassert "Running 1 test files" in proc.stdout, proc.stdoutdiff --git a/tests/scripts/test_run_tests_shell.py b/tests/scripts/test_run_tests_shell.pyindex c47a823aef0..247ae711b47 100644--- a/tests/scripts/test_run_tests_shell.py+++ b/tests/scripts/test_run_tests_shell.py@@ -25,6 +25,7 @@ def test_shell_runner_executes_tests_and_propagates_failure(tmp_path):cwd=tmp_path, capture_output=True, text=True, timeout=180,env={**os.environ, "HERMES_PYTHON": sys.executable, "HERMES_TEST_FILE_RETRIES": "0","PATHEXT": ".COM;.EXE;.BAT;.CMD"},+ check=False,)assert marker.read_text(encoding="utf-8") == "executed", result.stdout + result.stderrassert result.returncode != 0, result.stdout + result.stderrdiff --git a/tests/scripts/test_setup_toolchain.py b/tests/scripts/test_setup_toolchain.pyindex 2c36b4a935a..7c763f25ede 100644--- a/tests/scripts/test_setup_toolchain.py+++ b/tests/scripts/test_setup_toolchain.py@@ -52,6 +52,7 @@ def test_development_setup_keeps_test_groups_out_of_the_runtime(tmp_path, monkeyresult = subprocess.run([outputs["python-path"], "-I", "-c", "import importlib.util; print(importlib.util.find_spec('test_only_dep') is not None)"],cwd=tmp_path, capture_output=True, text=True, timeout=30,+ check=False,)assert result.returncode == 0, result.stderrassert result.stdout.strip() == str(test_environment)@@ -59,6 +60,7 @@ def test_development_setup_keeps_test_groups_out_of_the_runtime(tmp_path, monkey[outputs["python-path"], "-I", "-c","import importlib.util; print(importlib.util.find_spec('dev_only_dep') is not None)"],cwd=tmp_path, capture_output=True, text=True, timeout=30,+ check=False,)assert probe.returncode == 0, probe.stderrassert probe.stdout.strip() == str(test_environment)@@ -76,6 +78,7 @@ def test_development_setup_keeps_test_groups_out_of_the_runtime(tmp_path, monkey"import importlib.util; assert importlib.util.find_spec('dev_only_dep') is None; ""assert importlib.util.find_spec('test_only_dep') is None"],cwd=tmp_path, capture_output=True, text=True, timeout=30,+ check=False,)assert bundle.returncode == 0, bundle.stderr@@ -95,6 +98,7 @@ def test_stdlib_bootstrap_exports_the_pm_lock(toolchain, names, tmp_path):[sys.executable, "-S", str(root / "scripts/ci/setup_toolchain.py"),"prepare", "--toolchain", toolchain, "--home", str(home)],cwd=tmp_path, env=env, capture_output=True, text=True, encoding="utf-8", timeout=30,+ check=False,)assert result.returncode == 0, result.stdout + result.stderrvalues = dict(line.split("=", 1) for line in output.read_text(encoding="utf-8-sig").splitlines())@@ -120,6 +124,7 @@ def test_invalid_extras_do_not_export_or_install(extras, tmp_path):"--home", str(home), "--extras", extras],cwd=tmp_path, env={**os.environ, "GITHUB_OUTPUT": str(output)},capture_output=True, text=True, encoding="utf-8", timeout=30,+ check=False,)assert result.returncode != 0assert "extras must be a JSON array of extra names" in result.stderrdiff --git a/tests/scripts/test_source_build_env.py b/tests/scripts/test_source_build_env.pyindex 50ef152b6f4..15b6204b659 100644--- a/tests/scripts/test_source_build_env.py+++ b/tests/scripts/test_source_build_env.py@@ -138,7 +138,7 @@ if ($LASTEXITCODE) { exit $LASTEXITCODE }for sha in (old, new):git("checkout", "-q", "-B", "installed", sha)result = subprocess.run(command, env=env, cwd=tmp_path, capture_output=True, stdin=subprocess.DEVNULL,- text=True, encoding="utf-8", errors="replace", timeout=30)+ text=True, encoding="utf-8", errors="replace", timeout=30, check=False)assert result.returncode == 0, result.stdout + result.stderrassert Path(env["PROBE_OUT"]).is_file(), (f"the build child wrote no stamp (shell={command[0]} rc={result.returncode})\n--- stdout ---\n{result.stdout}\n--- stderr ---\n{result.stderr}")diff --git a/tests/scripts/test_source_driver.py b/tests/scripts/test_source_driver.pyindex 1978a30a693..7816551b8b9 100644--- a/tests/scripts/test_source_driver.py+++ b/tests/scripts/test_source_driver.py@@ -42,7 +42,7 @@ chmod +x "$INSTALL_DIR/venv/bin/hermes"mkdir -p "$INSTALL_DIR/pm"printf '{}' > "$INSTALL_DIR/pm/lock.json"if source_hermes "$INSTALL_DIR"; then exit 92; fi-'''], env=env, cwd=tmp_path, capture_output=True, text=True, timeout=30)+'''], env=env, cwd=tmp_path, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stdout + result.stderrassert result.stdout.splitlines() == ["published:literal argument", "legacy"]@@ -61,7 +61,7 @@ def test_installer_marker_is_the_only_dirty_state_a_driver_accepts(tmp_path):def accept():return subprocess.run(["bash", "-euc", 'source "$ASSETS/source-driver.sh"; accept_installer_marker "$INSTALL_DIR"'],- env=env, capture_output=True, text=True, timeout=30)+ env=env, capture_output=True, text=True, timeout=30, check=False)assert accept().returncode == 0assert (root / ".install_method").read_text(encoding="utf-8") == "git\n"@@ -114,7 +114,7 @@ Write-Output 'selection verified'''', encoding="utf-8")result = subprocess.run([pwsh, "-NoProfile", "-NonInteractive", "-File", str(harness)],env=dict(os.environ, INSTALL_DIR=str(root), ASSETS=str(ASSETS), HOME=str(tmp_path)),- cwd=tmp_path, capture_output=True, text=True, timeout=30)+ cwd=tmp_path, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stdout + result.stderrassert result.stdout.strip() == "selection verified"@@ -217,7 +217,7 @@ for (const [product, out] of [['tui', 'ui-tui/dist'], ['web', 'hermes_cli/web_direturn {p: (hashlib.sha256(p.read_bytes()).hexdigest(), p.stat().st_mtime_ns) for tree in (root, home, store)for p in tree.rglob("*") if p.is_file()}before = snapshot()- result = subprocess.run(command, env=env, cwd=tmp_path, capture_output=True, text=True, timeout=60)+ result = subprocess.run(command, env=env, cwd=tmp_path, capture_output=True, text=True, timeout=60, check=False)assert result.returncode == 0, result.stdout + result.stderrassert snapshot() == beforeif fault in {"uv-lock", "no-desktop"}:@@ -239,7 +239,7 @@ for (const [product, out] of [['tui', 'ui-tui/dist'], ['web', 'hermes_cli/web_dielse:damaged.write_bytes(b"damaged")before = snapshot()- result = subprocess.run(command, env=env, cwd=tmp_path, capture_output=True, text=True, timeout=60)+ result = subprocess.run(command, env=env, cwd=tmp_path, capture_output=True, text=True, timeout=60, check=False)assert result.returncode != 0assert error in result.stderrassert "bootstrap must not run" not in result.stderrdiff --git a/tests/scripts/test_source_update_command.py b/tests/scripts/test_source_update_command.pyindex 0c90728d321..17bb8eb31f0 100644--- a/tests/scripts/test_source_update_command.py+++ b/tests/scripts/test_source_update_command.py@@ -41,6 +41,7 @@ fienv=dict(os.environ, HELPER=str(HELPER), CLI=str(cli), HELP_TEXT=help_text,EXPECT_BRANCH="1" if "--branch NAME" in help_text else "0"),capture_output=True, text=True, timeout=30,+ check=False,)assert result.returncode == 0, result.stderrassert result.stdout.strip().endswith(expected)@@ -56,6 +57,7 @@ def test_installed_cli_help_drives_explicit_staged_branch(tmp_path):help_result = subprocess.run([sys.executable, "-m", "hermes_cli.main", "update", "--help"],cwd=REPO_ROOT, env=env, capture_output=True, text=True, timeout=60,+ check=False,)assert help_result.returncode == 0, help_result.stderrcli = tmp_path / "installed hermes"@@ -75,6 +77,7 @@ printf 'selected staged main: %s\\n' "$*"env=dict(env, HELPER=str(HELPER), SOURCE_BUILD_ENV=str(SOURCE_BUILD_ENV),CLI=str(cli), HELP_TEXT=help_result.stdout),cwd=REPO_ROOT, capture_output=True, text=True, timeout=30,+ check=False,)assert result.returncode == 0, result.stderrassert "selected staged main: --yes --branch main" in result.stdoutdiff --git a/tests/scripts/test_stable_release.py b/tests/scripts/test_stable_release.pyindex a67e72efc98..4735e6d492c 100644--- a/tests/scripts/test_stable_release.py+++ b/tests/scripts/test_stable_release.py@@ -71,12 +71,12 @@ def test_gate_requires_every_success_including_real_cli(tmp_path):env = {**os.environ, "RELEASE_NEEDS": json.dumps(success), "GITHUB_STEP_SUMMARY": str(summary), "PYTHONPATH": str(ROOT),"SKIP_BUNDLES": "false", "SKIP_TESTS": "false"}argv = [sys.executable, "-m", "scripts.releases.stable", "gate", *required]- assert subprocess.run(argv, cwd=tmp_path, env=env, capture_output=True).returncode == 0- empty = subprocess.run(argv[:4], cwd=tmp_path, env=env, capture_output=True, text=True, encoding="utf-8")+ assert subprocess.run(argv, cwd=tmp_path, env=env, capture_output=True, check=False).returncode == 0+ empty = subprocess.run(argv[:4], cwd=tmp_path, env=env, capture_output=True, text=True, encoding="utf-8", check=False)assert empty.returncode != 0assert "required-job list" in empty.stderrenv["RELEASE_NEEDS"] = json.dumps({**success, "publication": {"result": "cancelled"}})- result = subprocess.run(argv, cwd=tmp_path, env=env, capture_output=True, text=True, encoding="utf-8")+ result = subprocess.run(argv, cwd=tmp_path, env=env, capture_output=True, text=True, encoding="utf-8", check=False)assert result.returncode != 0assert "publication=cancelled" in result.stderr@@ -96,17 +96,17 @@ def test_gate_requires_every_flag_removed_job_to_have_skipped(tmp_path, skip_bun"SKIP_BUNDLES": "true" if skip_bundles else "false","SKIP_TESTS": "true" if skip_tests else "false"}argv = [sys.executable, "-m", "scripts.releases.stable", "gate", *required]- assert subprocess.run(argv, cwd=tmp_path, env=env, capture_output=True).returncode == 0+ assert subprocess.run(argv, cwd=tmp_path, env=env, capture_output=True, check=False).returncode == 0# A removed job that ran anyway blocks the release, and so does an unflagged gate.removed = next(name for name, result in expected.items() if result == "skipped")env["RELEASE_NEEDS"] = json.dumps({**needs, removed: {"result": "success"}})- ran = subprocess.run(argv, cwd=tmp_path, env=env, capture_output=True, text=True, encoding="utf-8")+ ran = subprocess.run(argv, cwd=tmp_path, env=env, capture_output=True, text=True, encoding="utf-8", check=False)assert ran.returncode != 0 and f"{removed}=success (expected skipped)" in ran.stderrenv["RELEASE_NEEDS"] = json.dumps(needs)env["SKIP_BUNDLES"] = env["SKIP_TESTS"] = "false"- assert subprocess.run(argv, cwd=tmp_path, env=env, capture_output=True).returncode != 0+ assert subprocess.run(argv, cwd=tmp_path, env=env, capture_output=True, check=False).returncode != 0del env["SKIP_TESTS"]- missing = subprocess.run(argv, cwd=tmp_path, env=env, capture_output=True, text=True, encoding="utf-8")+ missing = subprocess.run(argv, cwd=tmp_path, env=env, capture_output=True, text=True, encoding="utf-8", check=False)assert missing.returncode != 0 and "SKIP_TESTS must be" in missing.stderrdiff --git a/tests/scripts/test_stage_apt_repo.py b/tests/scripts/test_stage_apt_repo.pyindex 64630bdaae5..dbfaf69f756 100644--- a/tests/scripts/test_stage_apt_repo.py+++ b/tests/scripts/test_stage_apt_repo.py@@ -201,6 +201,7 @@ def _independent_gpgv_verify(keyring_home: Path, *args: Path) -> subprocess.Comp["gpgv", "--homedir", kr, "--keyring", f"{kr}/pubring.kbx",*[str(a) for a in args]],capture_output=True,+ check=False,)diff --git a/tests/scripts/test_termux_assembly_permissions.py b/tests/scripts/test_termux_assembly_permissions.pyindex 24630de2b7a..70e04fb0346 100644--- a/tests/scripts/test_termux_assembly_permissions.py+++ b/tests/scripts/test_termux_assembly_permissions.py@@ -21,11 +21,13 @@ def test_assembly_publishes_facts_as_termux_uid_and_returns_host_owned_output(tmpytest.skip("Docker is required for the bind-mount ownership regression")available = subprocess.run(["docker", "info"], capture_output=True, timeout=15,+ check=False,)if available.returncode:pytest.skip("Docker daemon is unavailable")image = subprocess.run(["docker", "image", "inspect", IMAGE], capture_output=True, timeout=15,+ check=False,)if image.returncode:pytest.skip(f"Pre-pull the native Linux test image: docker pull {IMAGE}")@@ -62,6 +64,7 @@ docker run --rm --user 1000:1000 --network none \' sh "$4"''', "assembly-permissions-test", IMAGE, str(payload), str(ROOT), str(build_exit)],cwd=ROOT, capture_output=True, text=True, timeout=90,+ check=False,)assert result.returncode == build_exit, result.stdout + result.stderrassembly, = payload.glob(".environments-*")diff --git a/tests/scripts/test_termux_build_driver.py b/tests/scripts/test_termux_build_driver.pyindex 11857dde76d..27358d80f18 100644--- a/tests/scripts/test_termux_build_driver.py+++ b/tests/scripts/test_termux_build_driver.py@@ -71,6 +71,7 @@ def invoke(build_fixture, *identity, extra=()):[sys.executable, str(DRIVER), "--repo", str(repo), "--payload", str(payload),"--out", str(out), *identity, *extra],cwd=repo.parent, env=env, capture_output=True, text=True, timeout=30,+ check=False,)@@ -122,7 +123,7 @@ def test_all_paths_are_explicit(build_fixture, missing):args = [value for option, path in paths.items() if option != missingfor value in (option, str(path))]result = subprocess.run([sys.executable, str(DRIVER), *args, "--tag", "v1.2.3"],- cwd=repo.parent, env=env, capture_output=True, text=True, timeout=30)+ cwd=repo.parent, env=env, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 2assert missing in result.stderrassert recorded_calls(log) == []@@ -172,7 +173,7 @@ def test_release_workflow_runs_the_shared_sequence(build_fixture, identity):bash = shutil.which("bash")assert bash is not Noneresult = subprocess.run([bash, "-euo", "pipefail", "-c", step["run"]],- cwd=repo, env=env, capture_output=True, text=True, timeout=30)+ cwd=repo, env=env, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stdout + result.stderrcalls = recorded_calls(log)assert [Path(call["args"][0]).name for call in calls] == [@@ -201,7 +202,7 @@ def test_builder_image_identity_covers_all_inputs(tmp_path, changed_input):def image():result = subprocess.run(["bash", "-c", command, "fixture", str(scripts / "build_builder_image.sh")],- env=env, capture_output=True, text=True, timeout=30)+ env=env, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stderrreturn result.stdout.splitlines()[-1]diff --git a/tests/scripts/test_termux_commit_identity.py b/tests/scripts/test_termux_commit_identity.pyindex 7cc50443720..458e9b3aac2 100644--- a/tests/scripts/test_termux_commit_identity.py+++ b/tests/scripts/test_termux_commit_identity.py@@ -44,7 +44,7 @@ def test_deb_identity_refusal_leaves_payload_and_output_untouched(tmp_path):def invoke(identity):result = subprocess.run([_BASH, str(ROOT / 'scripts/termux/build_deb.sh'), *args, *identity],cwd=tmp_path, env=env, capture_output=True, text=True,- encoding='utf-8', timeout=30)+ encoding='utf-8', timeout=30, check=False)assert result.returncode != 0, result.stdout + result.stderrassert not boundary.exists(), 'identity refusal reached the native builder'assert witness.read_bytes() == b'prior dependency tree'diff --git a/tests/scripts/test_termux_deb_version.py b/tests/scripts/test_termux_deb_version.pyindex c8e82729568..638c67c336f 100644--- a/tests/scripts/test_termux_deb_version.py+++ b/tests/scripts/test_termux_deb_version.py@@ -74,7 +74,7 @@ def test_malformed_tags_rejected_by_both_mappings(tag):(["v1.2"], 1, ""), (["--channel", "v1.2"], 1, ""),])def test_cli_dispatch(args, status, output):- result = subprocess.run([sys.executable, str(SCRIPT), *args], capture_output=True, text=True)+ result = subprocess.run([sys.executable, str(SCRIPT), *args], capture_output=True, text=True, check=False)assert result.returncode == status, result.stderrassert result.stdout.strip() == outputif status:diff --git a/tests/scripts/test_termux_launchers.py b/tests/scripts/test_termux_launchers.pyindex ec1338e1f03..ee727793473 100644--- a/tests/scripts/test_termux_launchers.py+++ b/tests/scripts/test_termux_launchers.py@@ -69,7 +69,7 @@ def test_postinst_refuses_foreign_path_and_prerm_preserves_it(tmp_path):subprocess.run(command, check=True, env=env)link.unlink()link.write_text("foreign launcher", encoding="utf-8")- assert subprocess.run(command, env=env).returncode != 0+ assert subprocess.run(command, env=env, check=False).returncode != 0subprocess.run([shutil.which("sh"), str(control / "prerm"), "remove"], check=True, env=env)assert link.read_text(encoding="utf-8") == "foreign launcher"diff --git a/tests/scripts/test_termux_wheelhouse_cache.py b/tests/scripts/test_termux_wheelhouse_cache.pyindex d9caa737284..cb1c3addb92 100644--- a/tests/scripts/test_termux_wheelhouse_cache.py+++ b/tests/scripts/test_termux_wheelhouse_cache.py@@ -71,7 +71,7 @@ def test_cache_cli_keeps_commit_and_tag_provenance_distinct(tmp_path):'--platform-tag', 'android_24_arm64_v8a', '--python-abi', 'cp314']commit = 'a' * 40result = subprocess.run([*args, '--commit', commit], cwd=tmp_path,- capture_output=True, text=True, encoding='utf-8', timeout=30)+ capture_output=True, text=True, encoding='utf-8', timeout=30, check=False)assert result.returncode == 0, result.stdout + result.stderrmanifest_path = payload / 'index.json'manifest = json.loads(manifest_path.read_text(encoding='utf-8'))@@ -79,11 +79,11 @@ def test_cache_cli_keeps_commit_and_tag_provenance_distinct(tmp_path):assert wheelhouse_cache.is_usable(payload, manifest['inputs'])before = manifest_path.read_bytes()for flags in (['--commit', 'short'], ['--commit', commit, '--tag', 'v1.2.3']):- refused = subprocess.run([*args, *flags], cwd=tmp_path, capture_output=True, timeout=30)+ refused = subprocess.run([*args, *flags], cwd=tmp_path, capture_output=True, timeout=30, check=False)assert refused.returncode != 0assert manifest_path.read_bytes() == beforetagged = subprocess.run([*args, '--tag', 'v1.2.3'], cwd=tmp_path,- capture_output=True, text=True, encoding='utf-8', timeout=30)+ capture_output=True, text=True, encoding='utf-8', timeout=30, check=False)assert tagged.returncode == 0, tagged.stdout + tagged.stderrmanifest = json.loads(manifest_path.read_text(encoding='utf-8'))assert manifest['tag'] == 'v1.2.3' and 'commit' not in manifestdiff --git a/tests/scripts/test_validate_plugin_catalog.py b/tests/scripts/test_validate_plugin_catalog.pyindex b6ee8e5241c..edf04f44227 100644--- a/tests/scripts/test_validate_plugin_catalog.py+++ b/tests/scripts/test_validate_plugin_catalog.py@@ -49,6 +49,7 @@ def run_validator(*args: str) -> subprocess.CompletedProcess:[sys.executable, str(SCRIPT), *args],capture_output=True,text=True,+ check=False,)diff --git a/tests/scripts/test_verify_bootstrap_version_stamp.py b/tests/scripts/test_verify_bootstrap_version_stamp.pyindex 3f54ea87495..ee25168dc52 100644--- a/tests/scripts/test_verify_bootstrap_version_stamp.py+++ b/tests/scripts/test_verify_bootstrap_version_stamp.py@@ -110,6 +110,6 @@ def test_verifier_cli(tmp_path, changes, expect, error):env.setdefault("SystemRoot", r"C:\Windows")env.setdefault("ComSpec", r"C:\Windows\system32\cmd.exe")result = subprocess.run([sys.executable, str(_SCRIPT), "--repo", str(repo), "--stamp", str(path), *expect],- env=env, capture_output=True, text=True, timeout=30)+ env=env, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == (1 if error else 0), result.stderrassert error in result.stderr if error else "stamp verified" in result.stdoutdiff --git a/tests/scripts/test_verify_plugin_preservation.py b/tests/scripts/test_verify_plugin_preservation.pyindex 82e37bacdf1..51aa8a2621a 100644--- a/tests/scripts/test_verify_plugin_preservation.py+++ b/tests/scripts/test_verify_plugin_preservation.py@@ -108,7 +108,7 @@ def test_preservation_cli_fault_matrix(home, tmp_path, relative, action, categorfor root in (home, tmp_path / "external-mnemosyne-runtime") for p in root.rglob("*")}before = fingerprint()result = subprocess.run([sys.executable, VERIFIER, "snapshot", "--home", str(home), "--out", str(snapshot)],- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stderrentries = json.loads(snapshot.read_text(encoding="utf-8-sig"))["entries"]assert {"plugins/mnemosyne-wrapper/plugin.py", "profiles/work/plugins/second-plugin/data.bin",@@ -117,7 +117,7 @@ def test_preservation_cli_fault_matrix(home, tmp_path, relative, action, categorlink = entries["plugins/mnemosyne-wrapper/runtime"]assert link["kind"] == "symlink" and link["target_resolves"] and link["target_kind"] == "dir"assert {"engine.bin", "sidecar-witness.txt"} <= link["target_tree"].keys()- assert subprocess.run(command, capture_output=True, text=True, timeout=30).returncode == 0+ assert subprocess.run(command, capture_output=True, text=True, timeout=30, check=False).returncode == 0assert fingerprint() == beforetarget = home / relativeif action == "repoint":@@ -133,7 +133,7 @@ def test_preservation_cli_fault_matrix(home, tmp_path, relative, action, categortarget.parent.mkdir(parents=True, exist_ok=True)target.write_bytes(b"tampered or added")before = fingerprint()- result = subprocess.run(command, capture_output=True, text=True, timeout=30)+ result = subprocess.run(command, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == (0 if action == "add" else 1), result.stderrdata = json.loads(report.read_text(encoding="utf-8-sig"))affected = "plugins/mnemosyne-wrapper/runtime" if "/runtime/" in relative else relative@@ -151,6 +151,7 @@ def test_empty_snapshot_is_inconclusive(tmp_path):[sys.executable, VERIFIER, "snapshot", "--home", str(empty_home),"--out", str(snap_file)],capture_output=True, text=True,+ check=False,)assert r1.returncode == 3assert "ZERO entries" in r1.stderr@@ -159,6 +160,7 @@ def test_empty_snapshot_is_inconclusive(tmp_path):[sys.executable, VERIFIER, "verify", "--home", str(empty_home),"--snapshot", str(snap_file)],capture_output=True, text=True,+ check=False,)assert r2.returncode == 3assert "INCONCLUSIVE" in r2.stderr@@ -186,6 +188,7 @@ def test_missing_home_fails_snapshot(tmp_path):[sys.executable, VERIFIER, "snapshot", "--home", str(tmp_path / "nope"),"--out", str(tmp_path / "x.json")],capture_output=True, text=True,+ check=False,)assert proc.returncode == 2@@ -193,14 +196,14 @@ def test_missing_home_fails_snapshot(tmp_path):def test_release_fixture_seed_is_shared_and_never_repairs_damage(tmp_path):home, external = tmp_path / "home", tmp_path / "external"args = [sys.executable, VERIFIER, "seed", "--home", str(home), "--external", str(external)]- result = subprocess.run(args, capture_output=True, text=True, timeout=30)+ result = subprocess.run(args, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stderrsnap = vpp.snapshot_home(str(home))runtime = snap["entries"]["plugins/mnemosyne-wrapper/runtime"]assert runtime["target_tree"]["engine.bin"]["kind"] == "file"witness = external / "sidecar-witness.txt"witness.unlink()- retry = subprocess.run(args, capture_output=True, text=True, timeout=30)+ retry = subprocess.run(args, capture_output=True, text=True, timeout=30, check=False)assert retry.returncode != 0assert not witness.exists()assert not vpp.verify_home(str(home), snap)["ok"]diff --git a/tests/scripts/test_verify_user_state.py b/tests/scripts/test_verify_user_state.pyindex 07d52a5af6a..fd93c15f30c 100644--- a/tests/scripts/test_verify_user_state.py+++ b/tests/scripts/test_verify_user_state.py@@ -237,7 +237,7 @@ def test_fails_when_a_profile_directory_disappears(tmp_path):def _run(args):return subprocess.run([sys.executable, VERIFIER, *args],- capture_output=True, text=True)+ capture_output=True, text=True, check=False)def test_cli_snapshot_then_verify_round_trip(tmp_path):diff --git a/tests/scripts/test_write_install_stamp.py b/tests/scripts/test_write_install_stamp.pyindex 599f17cb597..a8c2caeb483 100644--- a/tests/scripts/test_write_install_stamp.py+++ b/tests/scripts/test_write_install_stamp.py@@ -27,7 +27,7 @@ def test_cli_stamp_roundtrip(tmp_path, monkeypatch, variant, distribution, mecha"--update-mechanism", mechanism]if distribution:args += ["--distribution", distribution]- result = subprocess.run(args, env=env, capture_output=True, text=True, timeout=30)+ result = subprocess.run(args, env=env, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stderrdata = json.loads(out.read_text(encoding="utf-8-sig"))assert {key: data[key] for key in ("source", "distribution", "updateMechanism", "payload", "tag", "commit")} == {@@ -57,6 +57,7 @@ def test_missing_or_invalid_mechanism_cannot_emit_stamp(tmp_path, arguments):[sys.executable, str(Path(__file__).resolve().parents[2] / "scripts/write_install_stamp.py"),"--output", str(out), "--commit", "a" * 40, *arguments],capture_output=True, text=True, timeout=30,+ check=False,)assert result.returncode != 0 and "--update-mechanism" in result.stderrassert not out.exists()@@ -75,7 +76,7 @@ def test_invalid_variant_cannot_emit_stamp(tmp_path, variant, tag, error):"--output", str(out), "--commit", "d" * 40, "--base-version", "0.18.0","--update-mechanism", "self"],env={**os.environ, "HERMES_DESKTOP_VARIANT": variant, "HERMES_PAYLOAD_TAG": tag, "HERMES_BUILD_COMMIT": ""},- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert result.returncode != 0 and error in result.stderrassert not out.exists()diff --git a/tests/security/test_gitspawn_config_injection.py b/tests/security/test_gitspawn_config_injection.pyindex 63dac267d67..55a3b26f72f 100644--- a/tests/security/test_gitspawn_config_injection.py+++ b/tests/security/test_gitspawn_config_injection.py@@ -142,7 +142,7 @@ def test_baseline_unhardened_git_fires_sinks(malicious_repo):"""Sanity: without hardening the payload actually fires — proves the repois armed and the test can detect a regression."""repo, marker = malicious_repo- subprocess.run(["git", "-C", str(repo), "diff", "HEAD"], capture_output=True)+ subprocess.run(["git", "-C", str(repo), "diff", "HEAD"], capture_output=True, check=False)fired = _fired(marker)assert "fsmonitor" in fired and "extdiff" in fired, fired@@ -221,7 +221,7 @@ def test_index_reading_probes_and_kanban_gc_git_are_safe(malicious_repo, tmp_patworktree_ops._cleanup_failed_worktree_add(str(repo), tmp_path / "wt3", "safe3")assert _fired(marker) == []branches = subprocess.run(["git", "-C", str(repo), "branch", "--format=%(refname:short)"],- capture_output=True, text=True, env=_CLEAN_GIT_ENV).stdout.split()+ capture_output=True, text=True, env=_CLEAN_GIT_ENV, check=False).stdout.split()assert not {"safe2", "pr-1", "safe3"} & set(branches) # the deletions ranfor key, value in {"remote.origin.url": "ssh://[email protected]/x.git",diff --git a/tests/skills/test_comfyui_skill.py b/tests/skills/test_comfyui_skill.pyindex d900347d6f8..d7458eb9d68 100644--- a/tests/skills/test_comfyui_skill.py+++ b/tests/skills/test_comfyui_skill.py@@ -60,6 +60,7 @@ def _run_under_c_locale(snippet: str) -> subprocess.CompletedProcess:text=True,env=env,timeout=60,+ check=False,)diff --git a/tests/skills/test_google_workspace_setup_deps.py b/tests/skills/test_google_workspace_setup_deps.pyindex 803e540ac15..505f4d73af7 100644--- a/tests/skills/test_google_workspace_setup_deps.py+++ b/tests/skills/test_google_workspace_setup_deps.py@@ -57,6 +57,7 @@ def test_standalone_without_hermes_reports_setup_not_ambient_installs(command, tcapture_output=True,text=True,timeout=15,+ check=False,)assert result.returncode == 1assert "Hermes environment" in result.stdoutdiff --git a/tests/skills/test_openclaw_migration_hardening.py b/tests/skills/test_openclaw_migration_hardening.pyindex a0d6dfa6401..6381b268efd 100644--- a/tests/skills/test_openclaw_migration_hardening.py+++ b/tests/skills/test_openclaw_migration_hardening.py@@ -216,6 +216,7 @@ def test_json_mode_emits_structured_report(tmp_path):capture_output=True,text=True,timeout=30,+ check=False,)assert result.returncode == 0, result.stderrpayload = json.loads(result.stdout)@@ -249,6 +250,7 @@ def test_json_mode_redacts_secrets_in_output(tmp_path):capture_output=True,text=True,timeout=30,+ check=False,)assert result.returncode == 0, result.stderr# The raw key value must never appear in the JSON output.diff --git a/tests/test_atomic_replace_symlinks.py b/tests/test_atomic_replace_symlinks.pyindex b1a0f30c7af..71613251a0b 100644--- a/tests/test_atomic_replace_symlinks.py+++ b/tests/test_atomic_replace_symlinks.py@@ -637,10 +637,10 @@ def test_windows_readonly_target_still_raises(tmp_path: Path) -> None:target = tmp_path / "readonly.json"target.write_text("old", encoding="utf-8")tmp = _write_tmp(tmp_path, "new")- subprocess.run(["attrib", "+R", str(target)], capture_output=True)+ subprocess.run(["attrib", "+R", str(target)], capture_output=True, check=False)try:with pytest.raises(OSError):atomic_replace(tmp, target)assert target.read_text(encoding="utf-8") == "old"finally:- subprocess.run(["attrib", "-R", str(target)], capture_output=True)+ subprocess.run(["attrib", "-R", str(target)], capture_output=True, check=False)diff --git a/tests/test_hermes_bootstrap.py b/tests/test_hermes_bootstrap.pyindex 3713ab280c6..d32ae2a6bd4 100644--- a/tests/test_hermes_bootstrap.py+++ b/tests/test_hermes_bootstrap.py@@ -96,6 +96,7 @@ class TestWindowsBehavior:[sys.executable, "-c", script],capture_output=True,timeout=15,+ check=False,)assert result.returncode == 0, (f"Child crashed printing non-ASCII despite UTF-8 bootstrap:\n"@@ -224,7 +225,7 @@ else:"""result = subprocess.run([sys.executable, "-I", "-S", "-c", program, str(root), str(entry)],cwd=tmp_path, env={**os.environ, "HERMES_HOME": str(tmp_path / "home")},- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stderrassert result.stdout.strip() == "bootstrap-before-app"@@ -248,7 +249,7 @@ def test_library_imports_of_dual_use_entry_modules_stay_side_effect_free(tmp_patenv.update({"HOME": str(tmp_path), "USERPROFILE": str(tmp_path), "PYTHONPATH": str(repo),"HERMES_HOME": str(tmp_path / "home"), "PYTHONDONTWRITEBYTECODE": "1"})child = subprocess.run([sys.executable, "-c", code], cwd=str(tmp_path), env=env,- capture_output=True, text=True, timeout=120)+ capture_output=True, text=True, timeout=120, check=False)assert child.returncode == 0, child.stderrassert child.stdout.splitlines()[-1] == '{"bootstrapped": false, "changed": []}'@@ -284,7 +285,7 @@ print('reached-pm')"""result = subprocess.run([sys.executable, "-I", "-S", "-c", program, str(root)],cwd=tmp_path, env={**os.environ, "HERMES_HOME": str(tmp_path / "home")},- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stderrassert result.stdout.strip() == "reached-pm"@@ -329,7 +330,7 @@ except ModuleNotFoundError as exc:print('raised', exc.name)"""result = subprocess.run([sys.executable, "-I", "-S", "-c", program, str(fake_root), str(entry)],- cwd=tmp_path, capture_output=True, text=True, timeout=30)+ cwd=tmp_path, capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stderrassert result.stdout.strip() == expected@@ -426,6 +427,7 @@ class TestEnableWindowsVt:[sys.executable, "-c", script, root],creationflags=subprocess.CREATE_NEW_CONSOLE,timeout=120,+ check=False,)if result.returncode == 4:pytest.skip("this session cannot create a console")diff --git a/tests/test_live_system_guard.py b/tests/test_live_system_guard.pyindex c10ece7fd0a..9fdd09dc46d 100644--- a/tests/test_live_system_guard.py+++ b/tests/test_live_system_guard.py@@ -19,26 +19,26 @@ def test_argv_arguments_are_not_treated_as_executables(tmp_path):guard (the path contains "hermes" via the pytest tmp root)."""target = tmp_path / "skill"target.write_text("just a filename\n")- result = subprocess.run(["cat", str(target)], capture_output=True, text=True)+ result = subprocess.run(["cat", str(target)], capture_output=True, text=True, check=False)assert result.returncode == 0assert "just a filename" in result.stdoutdef test_direct_killer_argv_is_still_blocked():with pytest.raises(RuntimeError, match="live-system guard"):- subprocess.run(["pkill", "-f", "hermes-guard-regression-nomatch"])+ subprocess.run(["pkill", "-f", "hermes-guard-regression-nomatch"], check=False)def test_wrapped_killer_command_is_still_blocked():"""argv[0]-only scanning must not exempt commands hidden behind ashell wrapper."""with pytest.raises(RuntimeError, match="live-system guard"):- subprocess.run(["bash", "-c", "pkill -f hermes-guard-regression-nomatch"])+ subprocess.run(["bash", "-c", "pkill -f hermes-guard-regression-nomatch"], check=False)def test_env_wrapped_killer_command_is_still_blocked():with pytest.raises(RuntimeError, match="live-system guard"):- subprocess.run(["env", "GUARD_TEST=1", "pkill", "-f", "hermes-guard-regression-nomatch"])+ subprocess.run(["env", "GUARD_TEST=1", "pkill", "-f", "hermes-guard-regression-nomatch"], check=False)def test_gateway_start_inside_a_container_exec_is_not_blocked():@@ -58,13 +58,14 @@ def test_gateway_start_inside_a_container_exec_is_not_blocked():[stub, "exec", "-u", "hermes", "ctr", "sh", "-c", "hermes -p prof gateway start"],capture_output=True,text=True,+ check=False,)assert result.returncode == 0def test_gateway_start_on_the_host_is_still_blocked():with pytest.raises(RuntimeError, match="REAL.*gateway runtime"):- subprocess.run(["python", "-m", "hermes_cli.main", "gateway", "start"])+ subprocess.run(["python", "-m", "hermes_cli.main", "gateway", "start"], check=False)def test_custom_home_tmpdir_is_relocated_before_pytest_uses_it(tmp_path):diff --git a/tests/test_live_system_guard_self_test.py b/tests/test_live_system_guard_self_test.pyindex aeb5860cfc0..4ea03e988bb 100644--- a/tests/test_live_system_guard_self_test.py+++ b/tests/test_live_system_guard_self_test.py@@ -122,38 +122,38 @@ def test_os_killpg_blocks_foreign_pgid():def test_subprocess_run_systemctl_restart_blocked():with pytest.raises(RuntimeError, match="live-system guard"):- subprocess.run(["systemctl", "--user", "restart", "hermes-gateway"])+ subprocess.run(["systemctl", "--user", "restart", "hermes-gateway"], check=False)def test_subprocess_run_full_path_systemctl_blocked():"""``/usr/bin/systemctl`` (full path) must be blocked too."""with pytest.raises(RuntimeError, match="live-system guard"):- subprocess.run(["/usr/bin/systemctl", "--user", "stop", "hermes-gateway"])+ subprocess.run(["/usr/bin/systemctl", "--user", "stop", "hermes-gateway"], check=False)def test_subprocess_run_sudo_systemctl_blocked():"""``sudo systemctl ...`` defeated the old head==systemctl check."""with pytest.raises(RuntimeError, match="live-system guard"):- subprocess.run(["sudo", "systemctl", "restart", "hermes-gateway"])+ subprocess.run(["sudo", "systemctl", "restart", "hermes-gateway"], check=False)def test_subprocess_run_env_systemctl_blocked():"""``env systemctl ...`` similarly defeated the old head check."""with pytest.raises(RuntimeError, match="live-system guard"):- subprocess.run(["env", "systemctl", "--user", "restart", "hermes-gateway"])+ subprocess.run(["env", "systemctl", "--user", "restart", "hermes-gateway"], check=False)def test_subprocess_run_bash_c_systemctl_blocked():"""``bash -c "systemctl ..."`` must also be caught."""with pytest.raises(RuntimeError, match="live-system guard"):- subprocess.run(["bash", "-c", "systemctl --user restart hermes-gateway"])+ subprocess.run(["bash", "-c", "systemctl --user restart hermes-gateway"], check=False)def test_subprocess_run_setsid_systemctl_blocked():with pytest.raises(RuntimeError, match="live-system guard"):- subprocess.run(["setsid", "systemctl", "kill", "hermes-gateway"])+ subprocess.run(["setsid", "systemctl", "kill", "hermes-gateway"], check=False)def test_subprocess_run_string_shell_true_blocked():@@ -161,6 +161,7 @@ def test_subprocess_run_string_shell_true_blocked():subprocess.run("systemctl --user restart hermes-gateway",shell=True,+ check=False,)@@ -249,7 +250,7 @@ def test_asyncio_create_subprocess_shell_systemctl_blocked():def test_subprocess_pkill_hermes_blocked():with pytest.raises(RuntimeError, match="live-system guard"):- subprocess.run(["pkill", "-f", "hermes"])+ subprocess.run(["pkill", "-f", "hermes"], check=False)@@ -257,12 +258,12 @@ def test_subprocess_pkill_hermes_blocked():def test_subprocess_pkill_python_dash_f_blocked():"""``pkill -f python`` matches the gateway's "python -m hermes_cli.main"."""with pytest.raises(RuntimeError, match="live-system guard"):- subprocess.run(["pkill", "-f", "python"])+ subprocess.run(["pkill", "-f", "python"], check=False)def test_subprocess_killall_hermes_blocked():with pytest.raises(RuntimeError, match="live-system guard"):- subprocess.run(["killall", "hermes"])+ subprocess.run(["killall", "hermes"], check=False)# ──────────────────── pass-through cases (must NOT raise) ──────@@ -317,6 +318,7 @@ def test_subprocess_run_gateway_status_passes_through():result = subprocess.run([sys.executable, "-c", "import sys; print(sys.argv[1:])", "-m", "hermes_cli.main", "gateway", "status"],capture_output=True, text=True,+ check=False,)assert result.returncode == 0diff --git a/tests/test_os_marker_gating.py b/tests/test_os_marker_gating.pyindex 7cde9aa197f..26b257065dd 100644--- a/tests/test_os_marker_gating.py+++ b/tests/test_os_marker_gating.py@@ -40,7 +40,7 @@ def test_native_collection_witnesses(tmp_path, invalid, message):encoding="utf-8")result = subprocess.run([sys.executable, "-m", "pytest", "-q", "-o", "addopts=", str(tmp_path)],cwd=tmp_path, env={**os.environ, "PYTEST_DISABLE_PLUGIN_AUTOLOAD": "1"},- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)output = result.stdout + result.stderrwitnesses = {p.name for p in tmp_path.iterdir() if p.name in {"plain", "any", "native", "foreign", "arch"}}if invalid:diff --git a/tests/tools/_child_env_fixtures.py b/tests/tools/_child_env_fixtures.pyindex 3da2672c4fa..3138dd51329 100644--- a/tests/tools/_child_env_fixtures.py+++ b/tests/tools/_child_env_fixtures.py@@ -106,5 +106,5 @@ class RunToCompletionEnv:def execute(self, command, cwd=None, timeout=30, stdin_data=None):result = subprocess.run([self.bash, "-c", command], cwd=cwd or self.root,env=self.env, input=stdin_data or "", timeout=timeout,- capture_output=True, text=True, encoding="utf-8")+ capture_output=True, text=True, encoding="utf-8", check=False)return {"returncode": result.returncode, "output": result.stdout + result.stderr}diff --git a/tests/tools/test_a2a_reason_roundtrip.py b/tests/tools/test_a2a_reason_roundtrip.pyindex ad368448d29..1a3f8dcc298 100644--- a/tests/tools/test_a2a_reason_roundtrip.py+++ b/tests/tools/test_a2a_reason_roundtrip.py@@ -58,6 +58,7 @@ def _run_waiter(home, envelope):return subprocess.run([bash, "-c", cmd],capture_output=True, text=True, timeout=30, env=env, cwd=home,+ check=False,)diff --git a/tests/tools/test_async_delegation.py b/tests/tools/test_async_delegation.pyindex 93018b4baa4..68ba46593e6 100644--- a/tests/tools/test_async_delegation.py+++ b/tests/tools/test_async_delegation.py@@ -1083,7 +1083,7 @@ dt.delegate_task(tasks=[{"goal": "fast member of the group task", "group": "g"},time.sleep(2.0)sys.stdout.flush(); os._exit(1)'''- subprocess.run([sys.executable, "-c", producer], cwd=repo, env=env, text=True, capture_output=True, timeout=30)+ subprocess.run([sys.executable, "-c", producer], cwd=repo, env=env, text=True, capture_output=True, timeout=30, check=False)consumer = r'''import json, queuefrom tools import async_delegation as addiff --git a/tests/tools/test_bot_delivery_install_launcher.py b/tests/tools/test_bot_delivery_install_launcher.pyindex ad3516d4ea9..515112f849d 100644--- a/tests/tools/test_bot_delivery_install_launcher.py+++ b/tests/tools/test_bot_delivery_install_launcher.py@@ -116,13 +116,13 @@ def test_real_delivery_launcher_imports_new_generation(tmp_path, monkeypatch):f"VALUE = {generation!r}\n", encoding="utf-8")record.write_text(json.dumps({"packages": {"venv": {"environment": str(selected)}}}), encoding="utf-8")result = subprocess.run(argv, cwd=tmp_path, env=dict(os.environ),- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert result.returncode == 0, result.stdout + result.stderrassert result.stdout.strip() == json.dumps([generation, argv[1:]])# A broken selected generation must fail, never silently reuse the old CLI.record.write_text(json.dumps({"packages": {"venv": {"environment": str(record.parent / 'missing')}}}), encoding="utf-8")result = subprocess.run(argv, cwd=tmp_path, env=dict(os.environ),- capture_output=True, text=True, timeout=30)+ capture_output=True, text=True, timeout=30, check=False)assert result.returncode != 0assert "dependency environment" in result.stderrassert "old-generation" not in result.stdoutdiff --git a/tests/tools/test_bot_desktop_install.py b/tests/tools/test_bot_desktop_install.pyindex cdb66ac0ae9..83c1423599a 100644--- a/tests/tools/test_bot_desktop_install.py+++ b/tests/tools/test_bot_desktop_install.py@@ -256,7 +256,7 @@ def test_install_slot_is_held_across_processes(tmp_path):"import fcntl,sys\nfh=open(sys.argv[1],'a+',encoding='utf-8')\n""try:\n fcntl.flock(fh.fileno(), fcntl.LOCK_EX|fcntl.LOCK_NB); print('free')\n""except OSError:\n print('held')", str(runtime.state_dir() / "install.lock")],- capture_output=True, text=True)+ capture_output=True, text=True, check=False)assert probe.stdout.strip() == "held", probefinally:install.release(key)diff --git a/tests/tools/test_bot_desktop_lease.py b/tests/tools/test_bot_desktop_lease.pyindex 354f519268b..045041ae143 100644--- a/tests/tools/test_bot_desktop_lease.py+++ b/tests/tools/test_bot_desktop_lease.py@@ -78,7 +78,7 @@ def test_lease_authority_is_shared_across_processes(tmp_path):"except lease.HumanHasControl:\n print('HUMAN')\n""lease.release('desktop-viewer')\n")out = subprocess.run([sys.executable, "-c", probe], capture_output=True, text=True, encoding="utf-8", timeout=30,- stdin=subprocess.DEVNULL, env={**os.environ, "HERMES_HOME": os.environ["HERMES_HOME"]})+ stdin=subprocess.DEVNULL, env={**os.environ, "HERMES_HOME": os.environ["HERMES_HOME"]}, check=False)assert out.stdout.strip() == "HUMAN", out.stderrassert lease.get().holder == lease.AGENT, "the other process's release is visible here"@@ -171,7 +171,7 @@ def test_lease_works_without_fcntl(tmp_path):"assert lease.release('v1').holder == lease.AGENT\n""print('OK')\n")out = subprocess.run([sys.executable, "-c", probe], capture_output=True, text=True, encoding="utf-8", timeout=60,- stdin=subprocess.DEVNULL, env={**os.environ, "HERMES_HOME": str(tmp_path)})+ stdin=subprocess.DEVNULL, env={**os.environ, "HERMES_HOME": str(tmp_path)}, check=False)assert out.stdout.strip() == "OK", out.stderrdiff --git a/tests/tools/test_bot_mode_dm_entry.py b/tests/tools/test_bot_mode_dm_entry.pyindex a15d6dbd170..e4f92a8df87 100644--- a/tests/tools/test_bot_mode_dm_entry.py+++ b/tests/tools/test_bot_mode_dm_entry.py@@ -72,7 +72,7 @@ def _commit(home, venv):def _run(argv, env):return subprocess.run(argv, capture_output=True, text=True, encoding="utf-8", errors="replace",- env=env, cwd=str(REPO.parent), timeout=120)+ env=env, cwd=str(REPO.parent), timeout=120, check=False)def test_delivery_runner_admits_through_dependencies_it_activates(tmp_path, committed_home):diff --git a/tests/tools/test_bot_relay.py b/tests/tools/test_bot_relay.pyindex b39d0e420e5..c0530a3613e 100644--- a/tests/tools/test_bot_relay.py+++ b/tests/tools/test_bot_relay.py@@ -275,7 +275,7 @@ def test_hostile_roster_fields_ride_as_argv_data(root):reply_path = bot_relay.relay_root(root) / bot_relay.REPLIES_DIR / f"{env['id']}.json"reply_path.parent.mkdir(parents=True, exist_ok=True)reply_path.write_text(json.dumps({"reply": "pong"}), encoding="utf-8")- proc = subprocess.run(parts, capture_output=True, text=True, timeout=30)+ proc = subprocess.run(parts, capture_output=True, text=True, timeout=30, check=False)assert proc.returncode == 0 and proc.stdout.splitlines() == [f"Reply from @researcher on {inj}:", "pong"]diff --git a/tests/tools/test_browser_real_profile.py b/tests/tools/test_browser_real_profile.pyindex ceb7888ab75..a0cba6d3d75 100644--- a/tests/tools/test_browser_real_profile.py+++ b/tests/tools/test_browser_real_profile.py@@ -1053,7 +1053,7 @@ class TestWindowsLockedProfileCopy:"from hermes_cli.browser_connect import _copy_auth_file; ""import sys; print(_copy_auth_file(sys.argv[1], sys.argv[2]))",str(src), str(dst)],- capture_output=True, text=True, timeout=15, stdin=subprocess.DEVNULL)+ capture_output=True, text=True, timeout=15, stdin=subprocess.DEVNULL, check=False)assert result.returncode == 0, result.stderrassert result.stdout.strip() == bc._AUTH_DB_LOCKEDfinally:diff --git a/tests/tools/test_browser_use_harness.py b/tests/tools/test_browser_use_harness.pyindex 6397703cbba..0b7ee787ce5 100644--- a/tests/tools/test_browser_use_harness.py+++ b/tests/tools/test_browser_use_harness.py@@ -20,7 +20,7 @@ def test_harness_runs_on_an_interpreter_without_its_own_site_packages(monkeypatccmd = bu._find_cli()assert cmd == [sys.executable, "-m", "browser_harness.run"]result = subprocess.run([cmd[0], "-S", *cmd[1:], "--version"], env=bu._base_subprocess_env(),- capture_output=True, text=True, timeout=120)+ capture_output=True, text=True, timeout=120, check=False)assert result.returncode == 0, result.stderrassert result.stdout.strip() == importlib.metadata.version("browser-harness")diff --git a/tests/tools/test_checkpoint_manager.py b/tests/tools/test_checkpoint_manager.pyindex 0d227ac6bbb..580a0f9dfb8 100644--- a/tests/tools/test_checkpoint_manager.py+++ b/tests/tools/test_checkpoint_manager.py@@ -842,6 +842,7 @@ class TestGpgIsolation:result = subprocess.run(["git", "config", "--file", str(store / "config"), "--get", key],capture_output=True, text=True,+ check=False,)assert result.stdout.strip() == "false", keydiff --git a/tests/tools/test_cli_approval_exec_ask_leak.py b/tests/tools/test_cli_approval_exec_ask_leak.pyindex e370cb75f2b..77ef6d23622 100644--- a/tests/tools/test_cli_approval_exec_ask_leak.py+++ b/tests/tools/test_cli_approval_exec_ask_leak.py@@ -246,6 +246,7 @@ print("EXEC_ASK=" + repr(os.environ.get("HERMES_EXEC_ASK")))"HERMES_HOME": str(hermes_home),},timeout=60,+ check=False,)assert proc.returncode == 0, proc.stderrassert "EXEC_ASK=None" in proc.stdout, proc.stdout + proc.stderrdiff --git a/tests/tools/test_code_execution.py b/tests/tools/test_code_execution.pyindex 104a94c52c5..14e0757891f 100644--- a/tests/tools/test_code_execution.py+++ b/tests/tools/test_code_execution.py@@ -283,7 +283,7 @@ class TestRemoteSharedHostLockdown(unittest.TestCase):self.addCleanup(shutil.rmtree, root, True)local = root + sandboxsh = lambda c: subprocess.run(["bash", "-c", c.replace(sandbox, local)],- capture_output=True, text=True)+ capture_output=True, text=True, check=False)self.assertEqual(sh(mkdir_cmd).returncode, 0)for d in (local, f"{local}/rpc"):self.assertEqual(os.stat(d).st_mode & 0o777, 0o700, d)diff --git a/tests/tools/test_code_execution_file_rpc.py b/tests/tools/test_code_execution_file_rpc.pyindex 9fbd3af6492..f4e6f85d671 100644--- a/tests/tools/test_code_execution_file_rpc.py+++ b/tests/tools/test_code_execution_file_rpc.py@@ -58,7 +58,7 @@ def test_generated_file_rpc_kwargs_correlation_and_authority(tmp_path, monkeypatclass Shell:def execute(self, command, cwd=None, timeout=None, stdin_data=None):result = subprocess.run([shell, "-c", command], cwd=cwd, timeout=timeout,- env=dict(os.environ), input=stdin_data or "", capture_output=True, text=True)+ env=dict(os.environ), input=stdin_data or "", capture_output=True, text=True, check=False)assert result.returncode == 0, result.stderrreturn {"output": result.stdout}diff --git a/tests/tools/test_code_execution_windows_env.py b/tests/tools/test_code_execution_windows_env.pyindex c6ed6b6b8de..35082b13e71 100644--- a/tests/tools/test_code_execution_windows_env.py+++ b/tests/tools/test_code_execution_windows_env.py@@ -76,6 +76,7 @@ class TestWindowsSocketSmokeTest:capture_output=True,text=True,timeout=15,+ check=False,)assert result.returncode == 0, (f"Child failed to create socket with scrubbed env:\n"@@ -124,6 +125,7 @@ def test_windows_live_child_offset_matches_os_zone_when_timezone_is_configured(m[sys.executable, "-c", script, timestamp],env=env, stdin=subprocess.DEVNULL, capture_output=True,text=True, encoding="utf-8", errors="replace", timeout=30,+ check=False,)assert result.returncode == 0, result.stderrreturn json.loads(result.stdout)diff --git a/tests/tools/test_code_kernel_remote.py b/tests/tools/test_code_kernel_remote.pyindex 6b1b2f14bb0..eab39b216ee 100644--- a/tests/tools/test_code_kernel_remote.py+++ b/tests/tools/test_code_kernel_remote.py@@ -384,7 +384,7 @@ class TestSharedHostLockdown(RemoteKernelBase):self.addCleanup(shutil.rmtree, root, True)local = root + kernel.kernel_dirr = subprocess.run(["bash", "-c", mkdir_cmd.replace(kernel.kernel_dir, local)],- capture_output=True, text=True)+ capture_output=True, text=True, check=False)self.assertEqual(r.returncode, 0, r.stderr)for d in (local, f"{local}/cells", f"{local}/rpc"):self.assertEqual(os.stat(d).st_mode & 0o777, 0o700, d)diff --git a/tests/tools/test_completed_process_results.py b/tests/tools/test_completed_process_results.pyindex 01d7bc81949..e649b9c1dc7 100644--- a/tests/tools/test_completed_process_results.py+++ b/tests/tools/test_completed_process_results.py@@ -151,7 +151,7 @@ def test_headless_terminal_result_survives_cli_exit(tmp_path):"oneshot=True, provider='custom', model='test-model', api_key='local-test-only', "f"base_url={url!r}, toolsets='terminal', max_turns=3, ignore_rules=True)",], cwd=tmp_path, env=env, stdin=subprocess.DEVNULL,- capture_output=True, text=True, encoding="utf-8", timeout=60)+ capture_output=True, text=True, encoding="utf-8", timeout=60, check=False)finally:release.touch()server.shutdown()diff --git a/tests/tools/test_connectors_import_deadlock.py b/tests/tools/test_connectors_import_deadlock.pyindex 829472a5e2e..4d3b02b070d 100644--- a/tests/tools/test_connectors_import_deadlock.py+++ b/tests/tools/test_connectors_import_deadlock.py@@ -64,6 +64,7 @@ def _run_snippet(snippet: str) -> subprocess.CompletedProcess:timeout=180,env=env,cwd=str(REPO_ROOT),+ check=False,)diff --git a/tests/tools/test_daemon_pool.py b/tests/tools/test_daemon_pool.pyindex 0ff7b485bcc..c13235f66ca 100644--- a/tests/tools/test_daemon_pool.py+++ b/tests/tools/test_daemon_pool.py@@ -79,6 +79,7 @@ def test_wedged_worker_does_not_block_interpreter_exit():capture_output=True,text=True,timeout=30,+ check=False,)assert proc.returncode == 0assert "main-done" in proc.stdoutdiff --git a/tests/tools/test_delegation_recovery_diagnostics.py b/tests/tools/test_delegation_recovery_diagnostics.pyindex 20ff701a6f5..fdaecb4ed64 100644--- a/tests/tools/test_delegation_recovery_diagnostics.py+++ b/tests/tools/test_delegation_recovery_diagnostics.py@@ -66,7 +66,7 @@ Path(os.environ["REPRO_HANDLE"]).write_text(json.dumps(handle), encoding="utf-8"os._exit(0)'''first = subprocess.run([sys.executable, "-c", producer], cwd=owner, env=env,- text=True, capture_output=True, timeout=30)+ text=True, capture_output=True, timeout=30, check=False)assert first.returncode == 0, first.stdout + first.stderrhandle = json.loads(handle_path.read_text(encoding="utf-8"))transcripts = handle["live_transcripts"]@@ -81,7 +81,7 @@ events = [q.get_nowait() for _ in range(count)]print(json.dumps([{"event": event, "message": format_process_notification(event)} for event in events]))'''second = subprocess.run([sys.executable, "-c", consumer], cwd=repo, env=env,- text=True, capture_output=True, timeout=20)+ text=True, capture_output=True, timeout=20, check=False)assert second.returncode == 0, second.stdout + second.stderrrestored = json.loads(second.stdout.strip().splitlines()[-1])assert len(restored) == (2 if split else 1)diff --git a/tests/tools/test_docker_config_migrate.py b/tests/tools/test_docker_config_migrate.pyindex faec600929e..c675dc2c3ad 100644--- a/tests/tools/test_docker_config_migrate.py+++ b/tests/tools/test_docker_config_migrate.py@@ -39,6 +39,7 @@ def _run_migration(hermes_home: Path, **env_overrides: str) -> subprocess.Compleenv=env,capture_output=True,text=True,+ check=False,)diff --git a/tests/tools/test_execution_flag_detection.py b/tests/tools/test_execution_flag_detection.pyindex e3e87597dbd..f261c7823a3 100644--- a/tests/tools/test_execution_flag_detection.py+++ b/tests/tools/test_execution_flag_detection.py@@ -24,7 +24,7 @@ def test_real_read_tool_binaries_confirm_option_ownership(if shutil.which(argv[0]) is None:pytest.skip(f"{argv[0]} is not installed")- completed = subprocess.run(argv, input=stdin, text=True, capture_output=True)+ completed = subprocess.run(argv, input=stdin, text=True, capture_output=True, check=False)assert completed.returncode == expected_returncodeassert completed.stdout == expected_outputdiff --git a/tests/tools/test_file_operations.py b/tests/tools/test_file_operations.pyindex f844f11eb81..91945899000 100644--- a/tests/tools/test_file_operations.py+++ b/tests/tools/test_file_operations.py@@ -221,6 +221,7 @@ def make_real_subprocess_env(cwd: str, include_stderr: bool = False) -> MagicMoccapture_output=True,input=(stdin_data.encode("utf-8", "surrogateescape")if is_windows and stdin_data is not None else stdin_data),+ check=False,)output = (completed.stdout.decode("utf-8", "replace")diff --git a/tests/tools/test_file_ops_cwd_tracking.py b/tests/tools/test_file_ops_cwd_tracking.pyindex e0d299819e1..fcfa9a742da 100644--- a/tests/tools/test_file_ops_cwd_tracking.py+++ b/tests/tools/test_file_ops_cwd_tracking.py@@ -53,6 +53,7 @@ class _FakeEnv:input=stdin_data,capture_output=True,text=True,+ check=False,)return {"output": proc.stdout + proc.stderr,@@ -74,7 +75,7 @@ class _WrapperEnv:import subprocessscript = f"builtin cd -- {shlex.quote(cwd)} || exit 126\n{command}"proc = subprocess.run(["bash", "-c", script], capture_output=True, text=True, encoding="utf-8",- input=kwargs.get("stdin_data"))+ input=kwargs.get("stdin_data"), check=False)return {"output": proc.stdout + proc.stderr, "returncode": proc.returncode}@@ -117,7 +118,7 @@ class TestShellFileOpsCwdTracking:def execute(self, command, cwd=None, **kwargs):import subprocessproc = subprocess.run(["bash", "-c", command], cwd=cwd,- capture_output=True, text=True)+ capture_output=True, text=True, check=False)return {"output": proc.stdout, "returncode": proc.returncode}env = _NoCwdEnv()diff --git a/tests/tools/test_find_shell.py b/tests/tools/test_find_shell.pyindex d3abd1a9e00..e43eb60b4c0 100644--- a/tests/tools/test_find_shell.py+++ b/tests/tools/test_find_shell.py@@ -147,6 +147,7 @@ class TestMacosLoginShellSwallowRegression:capture_output=True,text=True,env=env,+ check=False,)@@ -158,5 +159,6 @@ class TestMacosLoginShellSwallowRegression:subprocess.run([shell, "-lic", f"set +m; echo ok > {marker}"],stdin=subprocess.DEVNULL, capture_output=True, text=True,+ check=False,)assert marker.exists(), f"_find_shell()={shell} swallowed the command"diff --git a/tests/tools/test_kanban_descendant_scope.py b/tests/tools/test_kanban_descendant_scope.pyindex d10f32ff9c5..35be2ba3a21 100644--- a/tests/tools/test_kanban_descendant_scope.py+++ b/tests/tools/test_kanban_descendant_scope.py@@ -69,7 +69,7 @@ def test_terminal_descendants_cannot_mutate_even_after_task_is_removed(tmp_path,]for env in child_envs:proc = subprocess.run([sys.executable, str(script)], env=env, cwd=tmp_path,- stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=45)+ stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=45, check=False)assert proc.returncode == 0, proc.stderroutputs.append(proc.stdout)for output in outputs:@@ -93,6 +93,7 @@ def test_worker_cli_cannot_use_foreign_task_to_drop_run_scope(tmp_path, monkeypa[sys.executable, "-m", "hermes_cli.main", "kanban", "complete", foreign, "--result", "no"],cwd=ROOT, env=dict(os.environ), stdin=subprocess.DEVNULL,capture_output=True, text=True, timeout=45,+ check=False,)assert proc.returncode != 0 and "worker is scoped to task" in proc.stderr, (proc.stdout, proc.stderr)assert kb.get_task(conn, foreign).status == "running"@@ -102,7 +103,7 @@ def test_worker_cli_cannot_use_foreign_task_to_drop_run_scope(tmp_path, monkeypafor arguments in (["attach", foreign, str(attachment)], ["unblock", foreign]):proc = subprocess.run([sys.executable, "-m", "hermes_cli.main", "kanban", *arguments],cwd=ROOT, env=dict(os.environ), stdin=subprocess.DEVNULL,- capture_output=True, text=True, timeout=45)+ capture_output=True, text=True, timeout=45, check=False)assert proc.returncode != 0, (arguments, proc.stdout, proc.stderr)assert not kb.list_attachments(conn, foreign)assert json.loads(kanban_tools._handle_complete({"task_id": own, "summary": "parent"}))["ok"]diff --git a/tests/tools/test_local_background_child_hang.py b/tests/tools/test_local_background_child_hang.pyindex 539e2b11157..e0eb76ab7d8 100644--- a/tests/tools/test_local_background_child_hang.py+++ b/tests/tools/test_local_background_child_hang.py@@ -19,7 +19,7 @@ from tools.environments.local import LocalEnvironmentdef _pkill(pattern: str) -> None:- subprocess.run(f"pkill -9 -f {pattern!r} 2>/dev/null", shell=True)+ subprocess.run(f"pkill -9 -f {pattern!r} 2>/dev/null", shell=True, check=False)@pytest.fixturediff --git a/tests/tools/test_local_env_blocklist.py b/tests/tools/test_local_env_blocklist.pyindex ac36fb63478..006d9b85552 100644--- a/tests/tools/test_local_env_blocklist.py+++ b/tests/tools/test_local_env_blocklist.py@@ -709,6 +709,7 @@ def _make_directory_link(link: Path, target: Path) -> None:result = subprocess.run(["cmd", "/c", "mklink", "/J", str(link), str(target)],capture_output=True,+ check=False,)if result.returncode != 0:detail = result.stderr.decode("utf-8", errors="replace").strip()diff --git a/tests/tools/test_local_interrupt_cleanup.py b/tests/tools/test_local_interrupt_cleanup.pyindex 71f7e4f1a41..5d761da3ed6 100644--- a/tests/tools/test_local_interrupt_cleanup.py+++ b/tests/tools/test_local_interrupt_cleanup.py@@ -144,6 +144,7 @@ def test_wait_for_process_kills_subprocess_on_keyboardinterrupt():# Fall back to psps = subprocess.run(["ps", "-eo", "pid,ppid,pgid,cmd"], capture_output=True, text=True,+ check=False,)for line in ps.stdout.splitlines():if "sleep 30" in line and "grep" not in line:@@ -289,7 +290,7 @@ def test_hard_exit_leaves_no_foreground_survivor_around_the_spawn(scenario, tmp_cmd = f"sleep {35000 + os.getpid() % 1000}.{len(scenario)}"repo = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))r = subprocess.run([sys.executable, "-c", _HARD_EXIT_RACE_CHILD, scenario, cmd], cwd=str(tmp_path),- env={**os.environ, "PYTHONPATH": repo}, capture_output=True, text=True, timeout=120)+ env={**os.environ, "PYTHONPATH": repo}, capture_output=True, text=True, timeout=120, check=False)assert r.returncode == 0, r.stderr[-2000:]time.sleep(0.3)survivors = [p for p in psutil.process_iter(["cmdline"]) if cmd in " ".join(p.info["cmdline"] or [])]diff --git a/tests/tools/test_mcp_death_supervisor.py b/tests/tools/test_mcp_death_supervisor.pyindex f901439ff84..497c96f745e 100644--- a/tests/tools/test_mcp_death_supervisor.py+++ b/tests/tools/test_mcp_death_supervisor.py@@ -177,6 +177,7 @@ def test_refuses_to_run_inside_the_parents_own_process_group():capture_output=True,text=True,timeout=30,+ check=False,)assert proc.returncode == 2diff --git a/tests/tools/test_mcp_oauth_stdin_console.py b/tests/tools/test_mcp_oauth_stdin_console.pyindex 42d2f575dcc..a96402b914d 100644--- a/tests/tools/test_mcp_oauth_stdin_console.py+++ b/tests/tools/test_mcp_oauth_stdin_console.py@@ -13,7 +13,7 @@ def test_devnull_stdin_is_not_a_console_on_windows():code = ("import sys, os; sys.path.insert(0, os.getcwd()); ""from tools.mcp_oauth import _stdin_is_console; print(_stdin_is_console(), sys.stdin.isatty())")proc = subprocess.run([sys.executable, "-c", code], stdin=subprocess.DEVNULL,- capture_output=True, text=True, cwd=os.getcwd(), timeout=60)+ capture_output=True, text=True, cwd=os.getcwd(), timeout=60, check=False)console, isatty = proc.stdout.split()assert isatty == "True", "premise: the Windows CRT calls DEVNULL a tty (else this guard is moot)"assert console == "False"diff --git a/tests/tools/test_oneshot_completion_linger.py b/tests/tools/test_oneshot_completion_linger.pyindex 0aa3c365aa3..323ebae6bbd 100644--- a/tests/tools/test_oneshot_completion_linger.py+++ b/tests/tools/test_oneshot_completion_linger.py@@ -339,6 +339,7 @@ def _run_e2e_parent(tmp_path, *, linger: bool) -> Path:timeout=60,env=env,cwd=str(tmp_path),+ check=False,)assert proc.returncode == 0, proc.stderrassert "SPAWNED" in proc.stdoutdiff --git a/tests/tools/test_process_registry.py b/tests/tools/test_process_registry.pyindex 97cddf5bba1..f62f7be51bc 100644--- a/tests/tools/test_process_registry.py+++ b/tests/tools/test_process_registry.py@@ -495,7 +495,7 @@ class TestOrphanedPipeReconciliation:["sh", "-c", "exec 1>&2; ( sleep 30 ) & disown; exit 0"],stdout=subprocess.PIPE,stderr=subprocess.STDOUT,- preexec_fn=os.setsid,+ start_new_session=True,)s = _make_session(sid="proc_orphan_test")@@ -535,7 +535,7 @@ class TestOrphanedPipeReconciliation:["sh", "-c", "( sleep 30 ) & disown; exit 0"],stdout=subprocess.PIPE,stderr=subprocess.STDOUT,- preexec_fn=os.setsid,+ start_new_session=True,)s = _make_session(sid="proc_wait_orphan")@@ -1022,6 +1022,7 @@ class TestEnvPollerIncrementalRead:out = subprocess.run(["sh", "-c", ProcessRegistry._log_delta_command(quoted, 0)],capture_output=True, timeout=30,+ check=False,).stdoutheader, _, delta = out.partition(b"\n")size, _offset = map(int, header.split())@@ -2044,7 +2045,7 @@ class TestReaderLoopOrphanedPipe:text=True,encoding="utf-8",errors="replace",- preexec_fn=os.setsid,+ start_new_session=True,)s = _make_session(sid="proc_orphan_reader")s.process = proc@@ -2088,7 +2089,7 @@ class TestReaderLoopOrphanedPipe:text=True,encoding="utf-8",errors="replace",- preexec_fn=os.setsid,+ start_new_session=True,)s = _make_session(sid="proc_orphan_notify")s.process = procdiff --git a/tests/tools/test_process_registry_lazy_restore.py b/tests/tools/test_process_registry_lazy_restore.pyindex f0ec61b50e8..0d00b7c9333 100644--- a/tests/tools/test_process_registry_lazy_restore.py+++ b/tests/tools/test_process_registry_lazy_restore.py@@ -13,7 +13,7 @@ def test_model_tools_import_creates_no_state_db(tmp_path):env = {**os.environ, "HERMES_HOME": str(typo_home), "PYTHONPATH": str(REPO)}env.pop("HERMES_DELEGATED_CHILD_CONTEXT", None)proc = subprocess.run([sys.executable, "-c", "import model_tools"], cwd=REPO, env=env,- text=True, capture_output=True, timeout=120)+ text=True, capture_output=True, timeout=120, check=False)assert proc.returncode == 0, proc.stderr[-2000:]assert not (typo_home / "state.db").exists(), sorted(os.listdir(typo_home)) if typo_home.exists() else Nonediff --git a/tests/tools/test_process_registry_list_exit.py b/tests/tools/test_process_registry_list_exit.pyindex 45e79e25355..d4845a791c9 100644--- a/tests/tools/test_process_registry_list_exit.py+++ b/tests/tools/test_process_registry_list_exit.py@@ -96,6 +96,7 @@ def test_list_reconciles_real_exit_without_consuming_owned_result(tmp_path):cwd=Path(__file__).resolve().parents[2],env={**os.environ, "PYTHONPATH": str(Path(__file__).resolve().parents[2])},stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=30,+ check=False,)assert result.returncode == 0, result.stdout + result.stderrdiff --git a/tests/tools/test_profile_gate_env_isolation.py b/tests/tools/test_profile_gate_env_isolation.pyindex 5911dca4e59..3de9f8f0737 100644--- a/tests/tools/test_profile_gate_env_isolation.py+++ b/tests/tools/test_profile_gate_env_isolation.py@@ -28,7 +28,7 @@ _PROBE = f"import json,os;print(json.dumps({{k:os.environ.get(k) for k in {sortedef _seen_by_child(env: dict) -> set[str]:out = subprocess.run([sys.executable, "-c", _PROBE], env=env, capture_output=True,- text=True, encoding="utf-8", errors="replace", timeout=60)+ text=True, encoding="utf-8", errors="replace", timeout=60, check=False)return {k for k, v in json.loads(out.stdout.strip().splitlines()[-1]).items() if v is not None}diff --git a/tests/tools/test_search_giant_line_containment.py b/tests/tools/test_search_giant_line_containment.pyindex a31c6509fa9..aca0109665f 100644--- a/tests/tools/test_search_giant_line_containment.py+++ b/tests/tools/test_search_giant_line_containment.py@@ -39,6 +39,7 @@ class RecordingEnv:["bash", "-c", command],capture_output=True, text=True, errors="replace",timeout=timeout + 30,+ check=False,)out = proc.stdout + (proc.stderr or "")self.max_stdout = max(self.max_stdout, len(out))diff --git a/tests/tools/test_shell_arg_transport.py b/tests/tools/test_shell_arg_transport.pyindex 56a9d0c95fb..4e1260f244e 100644--- a/tests/tools/test_shell_arg_transport.py+++ b/tests/tools/test_shell_arg_transport.py@@ -20,7 +20,7 @@ class _SerializedShell:script = json.loads(json.dumps({'command': command}))['command']result = subprocess.run([self.bash, '--noprofile', '--norc', '-s'],input=script, cwd=cwd or self.cwd, env=self.env,- capture_output=True, text=True, encoding='utf-8', timeout=timeout)+ capture_output=True, text=True, encoding='utf-8', timeout=timeout, check=False)return {'output': result.stdout, 'returncode': result.returncode}diff --git a/tests/tools/test_snapshot_multiline_session_env_injection.py b/tests/tools/test_snapshot_multiline_session_env_injection.pyindex ba875dfd836..637889ac658 100644--- a/tests/tools/test_snapshot_multiline_session_env_injection.py+++ b/tests/tools/test_snapshot_multiline_session_env_injection.py@@ -62,6 +62,7 @@ ficapture_output=True,text=True,env=env,+ check=False,)diff --git a/tests/tools/test_stage2_hook_api_server_keygen.py b/tests/tools/test_stage2_hook_api_server_keygen.pyindex 34e53f49758..a7e50e176a8 100644--- a/tests/tools/test_stage2_hook_api_server_keygen.py+++ b/tests/tools/test_stage2_hook_api_server_keygen.py@@ -71,6 +71,7 @@ def _run_keygen(capture_output=True,text=True,timeout=30,+ check=False,)@@ -193,7 +194,8 @@ def test_keygen_env_key_drops_stale_empty_assignment(def _sed_is_gnu() -> bool:try:probe = subprocess.run(- ["sed", "--version"], capture_output=True, text=True, timeout=10+ ["sed", "--version"], capture_output=True, text=True, timeout=10,+ check=False,)except (OSError, subprocess.TimeoutExpired):return Falsediff --git a/tests/tools/test_stage2_hook_nous_routing_env.py b/tests/tools/test_stage2_hook_nous_routing_env.pyindex cb55b6d2965..b0576a1c21f 100644--- a/tests/tools/test_stage2_hook_nous_routing_env.py+++ b/tests/tools/test_stage2_hook_nous_routing_env.py@@ -57,7 +57,7 @@ def _run_sync(stage2_text: str, home: Path, env: dict[str, str | None]) -> subprf"{_path_guard_functions(stage2_text)}\n"f"{_sync_block(stage2_text)}\n")- return subprocess.run(["sh", "-c", script], capture_output=True, text=True, timeout=30)+ return subprocess.run(["sh", "-c", script], capture_output=True, text=True, timeout=30, check=False)def _assignments(path: Path, name: str) -> list[str]:diff --git a/tests/tools/test_stage2_hook_seed_one_symlinks.py b/tests/tools/test_stage2_hook_seed_one_symlinks.pyindex 17774f9866b..feedee33ee1 100644--- a/tests/tools/test_stage2_hook_seed_one_symlinks.py+++ b/tests/tools/test_stage2_hook_seed_one_symlinks.py@@ -65,7 +65,7 @@ def test_seed_one_refuses_symlinked_destinations(script_path = tmp_path / "harness.sh"script_path.write_text(script)- proc = subprocess.run([bash, str(script_path)], capture_output=True, text=True)+ proc = subprocess.run([bash, str(script_path)], capture_output=True, text=True, check=False)assert proc.returncode == 0, proc.stderrassert not outside_env.exists()assert (home / ".env").is_symlink()@@ -104,7 +104,7 @@ def test_seed_one_is_quiet_for_existing_symlinked_files(script_path = tmp_path / "harness.sh"script_path.write_text(script)- proc = subprocess.run([bash, str(script_path)], capture_output=True, text=True)+ proc = subprocess.run([bash, str(script_path)], capture_output=True, text=True, check=False)assert proc.returncode == 0, proc.stderrassert outside_env.read_text() == "EXISTING=1\n"assert proc.stdout == ""diff --git a/tests/tools/test_stage2_hook_symlink_chown.py b/tests/tools/test_stage2_hook_symlink_chown.pyindex 7eb2968e349..ff3de91f4b8 100644--- a/tests/tools/test_stage2_hook_symlink_chown.py+++ b/tests/tools/test_stage2_hook_symlink_chown.py@@ -39,7 +39,7 @@ def _run_helper(f'chown() {{ printf "%s\\n" "$*" >> "{log_path}"; }}\n'f'chown_hermes_tree "{target}"\n')- return subprocess.run([shell, "-c", script], capture_output=True, text=True)+ return subprocess.run([shell, "-c", script], capture_output=True, text=True, check=False)def test_chown_helper_repairs_real_directories(stage2_text: str, tmp_path: Path) -> None:target = tmp_path / "home"diff --git a/tests/tools/test_startup_latency_regressions.py b/tests/tools/test_startup_latency_regressions.pyindex 152b0e748c7..d54339f70f6 100644--- a/tests/tools/test_startup_latency_regressions.py+++ b/tests/tools/test_startup_latency_regressions.py@@ -115,6 +115,7 @@ class TestLazyMcpSdk:proc = subprocess.run([sys.executable, "-c", code],capture_output=True, text=True, timeout=120,+ check=False,)assert proc.returncode == 0, proc.stderrassert "ok" in proc.stdoutdiff --git a/tests/tools/test_subprocess_stdin_guard.py b/tests/tools/test_subprocess_stdin_guard.pyindex a929162fce7..89d4c5382ea 100644--- a/tests/tools/test_subprocess_stdin_guard.py+++ b/tests/tools/test_subprocess_stdin_guard.py@@ -29,6 +29,7 @@ def test_all_tui_subprocess_calls_have_stdin():capture_output=True,text=True,timeout=30,+ check=False,)assert result.returncode == 0, (f"subprocess stdin= check failed:\n{result.stdout}\n{result.stderr}"diff --git a/tests/tools/test_terminal_compound_background.py b/tests/tools/test_terminal_compound_background.pyindex aac682e2721..eda123a7e98 100644--- a/tests/tools/test_terminal_compound_background.py+++ b/tests/tools/test_terminal_compound_background.py@@ -188,6 +188,7 @@ class TestRewriteIsValidBash:["bash", "-n", "-c", rewritten],capture_output=True,text=True,+ check=False,)assert result.returncode == 0, (f"rewrite produced invalid bash: {rewritten!r}\n{result.stderr}"@@ -197,7 +198,8 @@ class TestRewriteIsValidBash:# End-to-end: the command after the backgrounded compound must run.rewritten = rewrite("echo first && true & echo SECOND_RAN")result = subprocess.run(- ["bash", "-c", rewritten], capture_output=True, text=True+ ["bash", "-c", rewritten], capture_output=True, text=True,+ check=False,)assert result.returncode == 0assert "SECOND_RAN" in result.stdoutdiff --git a/tests/tools/test_terminal_macos_open.py b/tests/tools/test_terminal_macos_open.pyindex 09f2823b7ac..0a016625053 100644--- a/tests/tools/test_terminal_macos_open.py+++ b/tests/tools/test_terminal_macos_open.py@@ -157,6 +157,7 @@ def test_ladder_is_valid_shell_syntax_for_quoting_edge_cases():transformed = macos_open._transform_macos_open_command(command, system="Darwin")assert transformed is not None and transformed != command, commandresult = subprocess.run(- ["bash", "-n", "-c", transformed], capture_output=True, text=True+ ["bash", "-n", "-c", transformed], capture_output=True, text=True,+ check=False,)assert result.returncode == 0, (command, result.stderr)diff --git a/tests/tools/test_tool_result_storage.py b/tests/tools/test_tool_result_storage.pyindex 9e1f72bbf7b..90f1b1343b7 100644--- a/tests/tools/test_tool_result_storage.py+++ b/tests/tools/test_tool_result_storage.py@@ -55,7 +55,7 @@ class TestWriteToSandbox:# pattern-matched.def _bash(cmd, timeout=None, stdin_data=None, **_kw):r = subprocess.run(["bash", "-c", cmd], input=stdin_data or "",- capture_output=True, text=True, timeout=timeout)+ capture_output=True, text=True, timeout=timeout, check=False)return {"output": r.stdout + r.stderr, "returncode": r.returncode}env.execute.side_effect = _bashresult = _write_to_sandbox("hello world", remote, env)diff --git a/tests/tui_gateway/test_entry_import_off_main_thread.py b/tests/tui_gateway/test_entry_import_off_main_thread.pyindex 136b7c3deb1..dc8d7506345 100644--- a/tests/tui_gateway/test_entry_import_off_main_thread.py+++ b/tests/tui_gateway/test_entry_import_off_main_thread.py@@ -63,6 +63,7 @@ def _spawn_worker_import_entry():text=True,timeout=60,env={**__import__("os").environ},+ check=False,)return proc.returncode, proc.stdout, proc.stderrdiff --git a/tests/tui_gateway/test_entry_sys_path.py b/tests/tui_gateway/test_entry_sys_path.pyindex 392c1431f21..37d92d5aa38 100644--- a/tests/tui_gateway/test_entry_sys_path.py+++ b/tests/tui_gateway/test_entry_sys_path.py@@ -38,6 +38,7 @@ def test_entry_imports_from_cwd_with_colliding_packages(tmp_path):encoding="utf-8",errors="replace",timeout=120,+ check=False,)assert result.returncode == 0, ("tui_gateway.entry failed to import from a CWD with a colliding utils/ "diff --git a/tests/tui_gateway/test_protocol.py b/tests/tui_gateway/test_protocol.pyindex ef5d80f7806..c061fc369ba 100644--- a/tests/tui_gateway/test_protocol.py+++ b/tests/tui_gateway/test_protocol.py@@ -1175,6 +1175,7 @@ def test_idle_reaper_rearms_missing_ws_orphan_timer(server, monkeypatch, tmp_patcapture_output=True,text=True,timeout=30,+ check=False,)assert successor.returncode == 0, successor.stderrassert [entry["session_id"] for entry in active_session_registry_snapshot(home)] == [sibling_sid]diff --git a/tests/tui_gateway/test_served_profile_child_env.py b/tests/tui_gateway/test_served_profile_child_env.pyindex a98c57326bf..eae7bec936c 100644--- a/tests/tui_gateway/test_served_profile_child_env.py+++ b/tests/tui_gateway/test_served_profile_child_env.py@@ -43,7 +43,7 @@ def mux_homes(tmp_path, monkeypatch):def _child_view(env: dict) -> dict:- out = subprocess.run([sys.executable, "-c", _PROBE], env=env, capture_output=True, text=True, encoding="utf-8", timeout=60)+ out = subprocess.run([sys.executable, "-c", _PROBE], env=env, capture_output=True, text=True, encoding="utf-8", timeout=60, check=False)return json.loads(out.stdout.strip().splitlines()[-1])diff --git a/tests/tui_gateway/test_served_profile_child_env_authority.py b/tests/tui_gateway/test_served_profile_child_env_authority.pyindex 414acfd335b..cfeefee041b 100644--- a/tests/tui_gateway/test_served_profile_child_env_authority.py+++ b/tests/tui_gateway/test_served_profile_child_env_authority.py@@ -92,7 +92,7 @@ def test_real_child_observes_only_the_routed_profile(homes):finally:reset_hermes_home_override(token)probe = "import json,os;print(json.dumps({k:os.environ.get(k) for k in ('HERMES_HOME','A_MARKER','B_MARKER','OPENAI_API_KEY')}))"- out = subprocess.run([sys.executable, "-c", probe], env=env, capture_output=True, text=True, encoding="utf-8", timeout=60)+ out = subprocess.run([sys.executable, "-c", probe], env=env, capture_output=True, text=True, encoding="utf-8", timeout=60, check=False)seen = json.loads(out.stdout.strip().splitlines()[-1])assert seen == {"HERMES_HOME": str(b), "A_MARKER": None, "B_MARKER": "b", "OPENAI_API_KEY": None}assert Path(seen["HERMES_HOME"]) == bdiff --git a/tests/tui_gateway/test_slash_worker_sys_path.py b/tests/tui_gateway/test_slash_worker_sys_path.pyindex a3da5f6112e..40b332fca51 100644--- a/tests/tui_gateway/test_slash_worker_sys_path.py+++ b/tests/tui_gateway/test_slash_worker_sys_path.py@@ -38,6 +38,7 @@ def test_slash_worker_imports_from_cwd_with_colliding_utils(tmp_path):capture_output=True,text=True,timeout=120,+ check=False,)assert result.returncode == 0, (diff --git a/tests/website/test_extract_plugins.py b/tests/website/test_extract_plugins.pyindex 0c004537afd..9ac1aca9eb8 100644--- a/tests/website/test_extract_plugins.py+++ b/tests/website/test_extract_plugins.py@@ -242,6 +242,7 @@ def test_script_exits_zero_as_subprocess_when_catalog_missing(tmp_path):capture_output=True,text=True,timeout=60,+ check=False,)assert result.returncode == 0, result.stderrassert (out_dir / "plugins.json").exists()diff --git a/tools/async_delegation_recovery_hints.py b/tools/async_delegation_recovery_hints.pyindex cdc2e267a36..8ce30c62509 100644--- a/tools/async_delegation_recovery_hints.py+++ b/tools/async_delegation_recovery_hints.py@@ -57,7 +57,7 @@ def git_state_hint(cwd: Optional[str]) -> Optional[str]:try:out = subprocess.run(["git", "-C", cwd, *harden_git_argv(args)], capture_output=True,text=True, encoding="utf-8", errors="replace",- stdin=subprocess.DEVNULL, timeout=_GIT_TIMEOUT_S, env=env)+ stdin=subprocess.DEVNULL, timeout=_GIT_TIMEOUT_S, env=env, check=False)except (OSError, subprocess.SubprocessError):return Nonereturn out.stdout if out.returncode == 0 else Nonediff --git a/tools/bot_desktop/install.py b/tools/bot_desktop/install.pyindex 2c4511d1dbe..80b4f6337a3 100644--- a/tools/bot_desktop/install.py+++ b/tools/bot_desktop/install.py@@ -116,7 +116,7 @@ def install_packages(*, ask_password: Callable[[], str], on_line: Callable[[str]def _sudo_nopasswd() -> bool:try:return subprocess.run(["sudo", "-n", "true"], capture_output=True, timeout=3,- stdin=subprocess.DEVNULL).returncode == 0+ stdin=subprocess.DEVNULL, check=False).returncode == 0except Exception:return Falsediff --git a/tools/browser_lightpanda.py b/tools/browser_lightpanda.pyindex a258a760e6d..904eda56ce6 100644--- a/tools/browser_lightpanda.py+++ b/tools/browser_lightpanda.py@@ -119,6 +119,7 @@ def _binary_supports_http_cache(binary: str) -> bool:[binary, "help"],capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=3.0,stdin=subprocess.DEVNULL,+ check=False,)return _HTTP_CACHE_FLAG in ((proc.stdout or "") + (proc.stderr or ""))except Exception as e:diff --git a/tools/checkpoint_manager.py b/tools/checkpoint_manager.pyindex 50b6e55bbcd..140cace15fb 100644--- a/tools/checkpoint_manager.py+++ b/tools/checkpoint_manager.py@@ -403,6 +403,7 @@ def _run_git(# console-less desktop/gateway backend; suppress the per-call# conhost flash on Windows (no-op on POSIX).creationflags=windows_hide_flags(),+ check=False,)ok = result.returncode == 0stdout = os.fsdecode(result.stdout) if "-z" in args else result.stdout.strip()@@ -552,6 +553,7 @@ def _init_store(store: Path, working_dir: str) -> Optional[str]:env=init_env, timeout=_GIT_TIMEOUT,stdin=subprocess.DEVNULL,creationflags=windows_hide_flags(),+ check=False,)if result.returncode != 0:return f"Shadow store init failed: {result.stderr.strip()}"diff --git a/tools/code_execution_env.py b/tools/code_execution_env.pyindex a5694a89bdf..c4d8ab66afc 100644--- a/tools/code_execution_env.py+++ b/tools/code_execution_env.py@@ -211,6 +211,7 @@ def _probe_python(python_path: str, code: str, *, text: bool = False):[python_path, "-c", code], timeout=5, capture_output=True, text=text,creationflags=subprocess.CREATE_NO_WINDOW if _IS_WINDOWS else 0,stdin=subprocess.DEVNULL, env=delegated_child_subprocess_env(),+ check=False,)except (OSError, subprocess.TimeoutExpired, subprocess.SubprocessError):return Nonediff --git a/tools/computer_use/cua_backend.py b/tools/computer_use/cua_backend.pyindex 9f4892671ee..ec903cbf7fc 100644--- a/tools/computer_use/cua_backend.py+++ b/tools/computer_use/cua_backend.py@@ -192,7 +192,7 @@ def _run_quiet(argv: list[str], *, timeout: float, swallow: Any = (), **kw: Any)kw.setdefault("errors", "replace")"stdout" in kw or kw.setdefault("capture_output", True)try:- return subprocess.run(argv, text=True, timeout=timeout, stdin=kw.pop("stdin"), encoding=kw.pop("encoding"),+ return subprocess.run(argv, text=True, timeout=timeout, stdin=kw.pop("stdin"), encoding=kw.pop("encoding"), # noqa: PLW1510 -- forwarding wrapper: callers pass subprocess kwargs via **kwargs (check may arrive through it); an explicit check=False would raise TypeErrorerrors=kw.pop("errors"), **kw)except swallow:return Nonediff --git a/tools/computer_use/cua_backend_session.py b/tools/computer_use/cua_backend_session.pyindex 874ed0fff14..6efa4aae050 100644--- a/tools/computer_use/cua_backend_session.py+++ b/tools/computer_use/cua_backend_session.py@@ -104,7 +104,7 @@ def _cli_run_json(cmd: list[str], env: dict[str, str], name: str, timeout: floattry:proc = _subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8", errors="replace",timeout=max(15.0, timeout), creationflags=windows_hide_flags(), env=env,- stdin=_subprocess.DEVNULL)+ stdin=_subprocess.DEVNULL, check=False)except Exception as e: # pragma: no cover - subprocess spawn failureraise RuntimeError(f"cua-driver CLI fallback for {name} failed to spawn: {e}") from eout, err = (proc.stdout or "").strip(), proc.stderr or ""diff --git a/tools/computer_use/doctor.py b/tools/computer_use/doctor.pyindex 616e0461961..0dbbe3222e9 100644--- a/tools/computer_use/doctor.py+++ b/tools/computer_use/doctor.py@@ -45,7 +45,7 @@ class HealthReportUnavailable(RuntimeError):def _run_cli(binary: str, *args: str, timeout: float) -> subprocess.CompletedProcess:"""Run ``<binary> args`` with UTF-8 capture + sanitized env (raises on failure)."""return subprocess.run([binary, *args], capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=timeout,- env=_sanitized_cua_env(), stdin=subprocess.DEVNULL)+ env=_sanitized_cua_env(), stdin=subprocess.DEVNULL, check=False)def _cli_text(binary: str, *args: str, timeout: float, exc_types: tuple[type, ...] = _IO_EXC) -> subprocess.CompletedProcess | BaseException:"""``_run_cli`` that returns (not raises) any exception in *exc_types*."""diff --git a/tools/computer_use/permissions.py b/tools/computer_use/permissions.pyindex 02dc8afdaa6..2cdc00ddd71 100644--- a/tools/computer_use/permissions.py+++ b/tools/computer_use/permissions.py@@ -50,7 +50,7 @@ def _child_env() -> dict[str, str]:def _run(binary: str, *args: str, timeout: float) -> subprocess.CompletedProcess:return subprocess.run([binary, *args], capture_output=True, text=True, encoding='utf-8', errors='replace',- timeout=timeout, env=_child_env(), stdin=subprocess.DEVNULL, creationflags=windows_hide_flags())+ timeout=timeout, env=_child_env(), stdin=subprocess.DEVNULL, creationflags=windows_hide_flags(), check=False)def _json_out(binary: str, *args: str, timeout: float) -> Any:"""Run ``binary args`` and parse stdout as JSON (``None`` on empty output)."""@@ -132,7 +132,7 @@ def request_permissions_grant(driver_cmd: Optional[str] = None) -> int:print("Requesting Accessibility + Screen Recording for CuaDriver.\n"f"macOS will show a dialog attributed to CuaDriver ({CUA_DRIVER_BUNDLE_ID}) — approve it, then return here.")try:- return int(subprocess.run([binary, "permissions", "grant"], env=_child_env(), stdin=subprocess.DEVNULL).returncode)+ return int(subprocess.run([binary, "permissions", "grant"], env=_child_env(), stdin=subprocess.DEVNULL, check=False).returncode)except KeyboardInterrupt: # pragma: no cover - interactivereturn 130except Exception as exc: # pragma: no cover - defensivediff --git a/tools/environments/docker.py b/tools/environments/docker.pyindex 414c275d3ae..4d9105f9129 100644--- a/tools/environments/docker.py+++ b/tools/environments/docker.py@@ -1022,7 +1022,7 @@ class DockerEnvironment(BaseEnvironment):logger.warning("docker run failed for %s, cleaning up orphaned container: %s", container_name, e)subprocess.run([self._docker_exe, "rm", "-f", container_name],- capture_output=True, timeout=10, stdin=subprocess.DEVNULL)+ capture_output=True, timeout=10, stdin=subprocess.DEVNULL, check=False)raisecontainer_id = result.stdout.strip()logger.info("Started container %s (%s)", container_name, container_id[:12])@@ -1185,7 +1185,7 @@ class DockerEnvironment(BaseEnvironment):_storage_opt_ok = Trueif probe.stdout.strip():subprocess.run([docker, "rm", probe.stdout.strip()],- capture_output=True, timeout=5, stdin=subprocess.DEVNULL)+ capture_output=True, timeout=5, stdin=subprocess.DEVNULL, check=False)elif "storage" in (probe.stderr or "").lower():_storage_opt_ok = False # daemon rejected --storage-opt: a host property# else: pull/daemon failure unrelated to storage-opt; not cached, retried next spawn@@ -1288,7 +1288,7 @@ class DockerEnvironment(BaseEnvironment):try:subprocess.run([docker_exe, *argv, container_id],- capture_output=True, timeout=30, stdin=subprocess.DEVNULL)+ capture_output=True, timeout=30, stdin=subprocess.DEVNULL, check=False)except (subprocess.TimeoutExpired, OSError) as e:logger.warning(fail_msg, log_id, e)diff --git a/tools/environments/ssh.py b/tools/environments/ssh.pyindex 3a9f2907f08..12dc717e589 100644--- a/tools/environments/ssh.py+++ b/tools/environments/ssh.py@@ -254,7 +254,7 @@ class SSHEnvironment(BaseEnvironment):ssh_cmd = self._build_ssh_command() + [f"tar cf - --exclude='*.sock' -C / {shlex.quote(rel_base)}"]with open(dest, "wb") as f:- result = subprocess.run(ssh_cmd, stdin=subprocess.DEVNULL, stdout=f, stderr=subprocess.PIPE, timeout=120)+ result = subprocess.run(ssh_cmd, stdin=subprocess.DEVNULL, stdout=f, stderr=subprocess.PIPE, timeout=120, check=False)if result.returncode != 0:stderr = result.stderr.decode(errors="replace").strip()# A socket not named *.sock is the only rc=2 we knowingly accept, and only when@@ -296,6 +296,6 @@ class SSHEnvironment(BaseEnvironment):continuewith contextlib.suppress(OSError, subprocess.SubprocessError):cmd = ["ssh", "-o", f"ControlPath={socket}", "-O", "exit", f"{self.user}@{self.host}"]- subprocess.run(cmd, capture_output=True, timeout=5, stdin=subprocess.DEVNULL)+ subprocess.run(cmd, capture_output=True, timeout=5, stdin=subprocess.DEVNULL, check=False)with contextlib.suppress(OSError):socket.unlink()diff --git a/tools/file_operations_lint.py b/tools/file_operations_lint.pyindex 48bbdfe2de1..6af3dd2c7fb 100644--- a/tools/file_operations_lint.py+++ b/tools/file_operations_lint.py@@ -211,7 +211,7 @@ class LintMixin:proc = subprocess.run([executable, *args, path], cwd=cwd or None, env=with_hermes_node_path(hermes_subprocess_env()),stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,- text=True, encoding="utf-8", errors="replace", timeout=30, creationflags=windows_hide_flags())+ text=True, encoding="utf-8", errors="replace", timeout=30, creationflags=windows_hide_flags(), check=False)except subprocess.TimeoutExpired:return ExecuteResult(stdout=f"{tool} timed out after 30s", exit_code=124)return ExecuteResult(stdout=proc.stdout or "", exit_code=proc.returncode)diff --git a/tools/process_registry.py b/tools/process_registry.pyindex 6d599129e72..18bebfa30c2 100644--- a/tools/process_registry.py+++ b/tools/process_registry.py@@ -285,6 +285,7 @@ def _systemd_run_user_scope_available() -> bool:stdin=subprocess.DEVNULL, capture_output=True,timeout=3,env=systemd_user_bus_env(),+ check=False,)if not (result.returncode and _SYSTEMD_RUN_NO_EXPANDand b"expand-environment" in (result.stderr or b"")):@@ -488,6 +489,7 @@ def _stop_systemd_unit(unit_name: str) -> bool:timeout=15,stdin=subprocess.DEVNULL,env=systemd_user_bus_env(),+ check=False,)if result.returncode != 0:stderr = (result.stderr or b"").decode(errors="replace").strip()diff --git a/tools/process_registry_termination.py b/tools/process_registry_termination.pyindex 1778d8727c1..875c0ca69cc 100644--- a/tools/process_registry_termination.py+++ b/tools/process_registry_termination.py@@ -56,7 +56,7 @@ class ProcessTerminationMixin:subprocess.run(["taskkill", "/PID", str(pid), "/T", "/F"], capture_output=True, text=True,encoding='utf-8', errors='replace', timeout=10, creationflags=windows_hide_flags(),- stdin=subprocess.DEVNULL)+ stdin=subprocess.DEVNULL, check=False)except (FileNotFoundError, subprocess.TimeoutExpired, OSError):_sigterm_quietly()returndiff --git a/tools/read_extract.py b/tools/read_extract.pyindex 7651486c79a..c6f44280932 100644--- a/tools/read_extract.py+++ b/tools/read_extract.py@@ -256,7 +256,7 @@ def _pdf_page_texts(path: str) -> Optional[list[str]]:return Nonetry:proc = subprocess.run(- ["pdftotext", path, "-"], stdin=subprocess.DEVNULL, capture_output=True, timeout=PDF_PAGE_SCAN_TIMEOUT)+ ["pdftotext", path, "-"], stdin=subprocess.DEVNULL, capture_output=True, timeout=PDF_PAGE_SCAN_TIMEOUT, check=False)except (OSError, subprocess.SubprocessError):return Noneout = proc.stdout.decode("utf-8", errors="replace") if proc.returncode == 0 else ""diff --git a/tools/skillevaluator_scan.py b/tools/skillevaluator_scan.pyindex 7299b74d06a..fd633af1f41 100644--- a/tools/skillevaluator_scan.py+++ b/tools/skillevaluator_scan.py@@ -106,7 +106,7 @@ def run_tier1_scan(skill_dir: Path, timeout: int = SCAN_TIMEOUT_SECONDS) -> Tiertry:subprocess.run([SCANNER_BIN, "validate", str(skill_dir), "--checks", TIER1_CHECKS, "--no-dedup","-r", "json", "-o", outdir], capture_output=True, text=True, encoding="utf-8", errors="replace",- stdin=subprocess.DEVNULL, timeout=timeout)+ stdin=subprocess.DEVNULL, timeout=timeout, check=False)except subprocess.TimeoutExpired:return unavailable(f"scan timed out after {timeout}s")except OSError as exc:diff --git a/tools/subagent_worktree.py b/tools/subagent_worktree.pyindex 3d4795eb10e..1999007c026 100644--- a/tools/subagent_worktree.py+++ b/tools/subagent_worktree.py@@ -31,7 +31,7 @@ def _run_git(args, cwd: str, timeout: int = _GIT_TIMEOUT, env=None):"""return subprocess.run(["git", *harden_git_argv(args)], cwd=cwd, capture_output=True,text=True, encoding="utf-8", errors="replace", timeout=timeout,- stdin=subprocess.DEVNULL, env=env or noninteractive_git_env())+ stdin=subprocess.DEVNULL, env=env or noninteractive_git_env(), check=False)def local_backend_active() -> bool:diff --git a/tools/terminal_tool_backends.py b/tools/terminal_tool_backends.pyindex eb016f35480..0d1130cc682 100644--- a/tools/terminal_tool_backends.py+++ b/tools/terminal_tool_backends.py@@ -341,7 +341,7 @@ def _check_requirements(env_type: str, config: dict[str, Any]) -> bool:executable = finder()if not executable:return _reject(missing_msg or f"the {env_type!r} backend's executable was not found")- probe = subprocess.run([executable, arg], capture_output=True, timeout=5, stdin=subprocess.DEVNULL)+ probe = subprocess.run([executable, arg], capture_output=True, timeout=5, stdin=subprocess.DEVNULL, check=False)if probe.returncode != 0:return _reject(f"{_PROBE_FAILED_REASONS[env_type]} (`{executable} {arg}` exited with code {probe.returncode})")return Truediff --git a/tools/tts_command_provider.py b/tools/tts_command_provider.pyindex ea85f381d81..ee4df322a7a 100644--- a/tools/tts_command_provider.py+++ b/tools/tts_command_provider.py@@ -106,7 +106,7 @@ def terminate_command_process_tree(proc: subprocess.Popen) -> None:from hermes_cli._subprocess_compat import windows_hide_flagssubprocess.run(["taskkill", "/F", "/T", "/PID", str(proc.pid)], stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL, timeout=5, stdin=subprocess.DEVNULL,- creationflags=windows_hide_flags())+ creationflags=windows_hide_flags(), check=False)except Exception:proc.kill()returndiff --git a/tools/tts_tool_local.py b/tools/tts_tool_local.pyindex f57a77dc744..81c23cdbe52 100644--- a/tools/tts_tool_local.py+++ b/tools/tts_tool_local.py@@ -53,6 +53,7 @@ def _tts_cache_get_or_load(cache: dict[str, Any], key: str, load: Callable[[], Adef _run_helper(cmd: list, timeout: int) -> subprocess.CompletedProcess:return subprocess.run(cmd, capture_output=True, text=True, encoding='utf-8', errors='replace', timeout=timeout, stdin=subprocess.DEVNULL,+ check=False,)diff --git a/tools/working_diff.py b/tools/working_diff.pyindex 5c0ad2d00ea..0085f12163a 100644--- a/tools/working_diff.py+++ b/tools/working_diff.py@@ -46,6 +46,7 @@ def _run(args: list[str], cwd: str, timeout: int = _GIT_TIMEOUT):cwd=cwd, capture_output=True, text=True, timeout=timeout,encoding="utf-8", errors="replace",stdin=subprocess.DEVNULL, env=env,+ check=False,)return proc.returncode, proc.stdoutdiff --git a/tui_gateway/methods_prompt.py b/tui_gateway/methods_prompt.pyindex 07e6baa6b7f..f63ceb3fdd2 100644--- a/tui_gateway/methods_prompt.py+++ b/tui_gateway/methods_prompt.py@@ -948,7 +948,7 @@ def _(rid, params: dict) -> dict:# thread on locale-mismatched Windows.res = subprocess.run(argv, capture_output=True, text=True, timeout=120, stdin=subprocess.DEVNULL,- encoding="utf-8", errors="replace", creationflags=windows_hide_flags())+ encoding="utf-8", errors="replace", creationflags=windows_hide_flags(), check=False)except subprocess.TimeoutExpired:return _err(rid, 5028, "pdftoppm timed out (>120s)")if res.returncode != 0: