stage-342: apply Opus SHOULD-FIX — tighten worktree status _run_git timeout 5s → 2s

Worst case 4×5s=20s per polling request on ThreadingHTTPServer pool is risky
given today's _cron_env_lock near-miss on production 8787. Status probes
should fail fast; client can retry. All four call sites use default timeout.
This commit is contained in:
Hermes Agent
2026-05-12 05:22:01 +00:00
parent 08b6dc4f41
commit 10cfcee30e
2 changed files with 7 additions and 2 deletions

View File

@@ -13,7 +13,7 @@ import logging
logger = logging.getLogger(__name__)
def _run_git(args: list[str], cwd: str | Path, timeout: float = 5) -> subprocess.CompletedProcess:
def _run_git(args: list[str], cwd: str | Path, timeout: float = 2) -> subprocess.CompletedProcess:
return subprocess.run(
["git", *args],
cwd=str(cwd),