Skip to content

fix(#1312): GitHubProvider.postComment ignores gh's exit status, so a failed QA verdict post is silent - #1319

Merged
admarble merged 2 commits into
mainfrom
feature/1312-bug-run-githubprovider-postcomment-ignores-gh-s-ex
Oct 5, 2026
Merged

admarble merged 2 commits into
mainfrom
feature/1312-bug-run-githubprovider-postcomment-ignores-gh-s-ex

Conversation

@admarble

@admarble admarble commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

GitHubProvider.postComment, addLabel and removeLabel now throw when gh fails, so a failed QA verdict post reaches the "Failed to post QA verdict comment" warning. The full npm test run did not finish, so I can't confirm the whole suite. It hit the 590 s limit with no output, and CI will have to cover it.

What ran:

  • npm run build and npm run lint passed.
  • The new tests pass, along with the existing src/lib/workflow/platforms/, batch-executor.test.ts and src/commands tests (831 tests).
  • The failure gate is runGhOrThrow in src/lib/workflow/platforms/github.ts. It throws on a spawn error, a signal, or a non-zero status, and the message includes gh's stderr.

AC verification

AC Status Evidence
AC-1 ✅ Implemented runGhOrThrow in src/lib/workflow/platforms/github.ts. github-gh-failure.test.ts covers all three methods for exit 1, a timeout (SIGTERM, ETIMEDOUT) and a spawn failure (ENOENT). It also checks stderr is in the error and that exit 0 resolves.
AC-2 ✅ Implemented github-gh-failure.test.ts calls postQaVerdictComment with no injected postComment, so the real GitHubProvider runs against a stubbed failing spawnSync. It asserts the warning is logged with HTTP 502: bad gateway in it.

I added a CHANGELOG entry under [Unreleased] → Fixed. Scope is as the issue comment set it: postPRComment and the ready gate's empty catch are left for #1315.

Mutation result: Replacing the failure check with result.status === 999 made 13 of 16 tests in the new file fail. The 3 that passed are the exit-0 cases, as expected. The first mutation attempt, if (false), broke the tsc build in global setup, so no test ran; I discarded that and restored the file.

Pre-PR Confidence Check

Next steps: /qa should check the full-suite result in CI.

Runner note

This body was written by the runner from exec's final ## Summary (run bb39b1ac). The run's own body was the placeholder, because of the #1311 cause recorded on that issue. The body has no sequant run trailer, so the post-QA update leaves it alone. Follow-up for the rest of the class: #1315.

Fixes #1312

🤖 Generated with Claude Code

Entire-Checkpoint: f935a53d33e8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(run): GitHubProvider.postComment ignores gh's exit status, so a failed QA verdict post is silent

1 participant