Files
hermes-agent/hermes_cli
pasmud 8b7a1620a1 fix(review): surface real gh stderr in PR-create errors
Every non-zero gh exit collapsed to a generic "is gh installed and
authenticated?" — a lie whenever gh was fine and the real failure was
"no commits between main and feature", a missing upstream, or a refused
push (#87731). The user had to drop to a terminal to learn what gh
already printed.

- apps/desktop git-review-ops.ts runGh() now resolves {ok, stdout,
  stderr} (execFile's err.stderr carries the exit's own stderr), and
  reviewCreatePr() prefixes the surfaced message with gh's reason,
  keeping the generic text only when gh reported nothing.
- hermes_cli web_git.py _gh() keeps (ok, stdout, stderr) through the
  same collapse — _run already captured stderr; it was discarded at the
  tuple boundary — and review_create_pr() surfaces a bounded stderr
  tail (400 chars) plus the gh context.

Tests pin the contract with unique stderr markers and non-zero exits on
both wrappers; successful-path return contracts unchanged.

Electron half salvaged from PR #87751 (author preserved); CLI half added
per the issue's acceptance scope.

Fixes #87731
2026-09-27 06:54:56 -05:00
..
…
…
…
…
…
…
…