Skip to content

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

Closed

Description

@admarble

Tier: mechanical Found: 2026-10-04, #1067 calibration runs

Problem. GitHubProvider.postComment (src/lib/workflow/platforms/github.ts) runs spawnSync("gh", ["issue", "comment", …], { timeout: 15000 }) and never checks status, error or signal. A failed or timed-out gh call therefore resolves as success. postQaVerdictComment's catch, the "Failed to post QA verdict comment" warning, can never fire, so the verdict is lost silently.

Observed. In the #1067 calibration, five identical sequant run <N> --phases qa runs ran back to back on a throwaway fixture repo, using sequant 2.19.0 dev build at main 79808fa7. Runs 1–4 posted their ## QA Verdict comment. Run 5 posted nothing. Its stdout matches run 4's line for line apart from numbers and has no warning, and its run log records AC_NOT_MET. The cause of the failed gh call is unknown, because nothing records it.

Class. This is the third time the verdict comment has gone missing: #964 (never posted on a re-run) and #1070 (gated on phase success). addLabel and removeLabel in the same file share the unchecked-spawnSync shape.

AC

  • AC-1: postComment, addLabel and removeLabel throw when gh exits non-zero, times out, or fails to spawn. The error carries gh's stderr. Evidence: a unit test with a stubbed spawnSync returning status: 1 asserts the rejection, mutation-verified by removing the status check.
  • AC-2: When postComment throws, postQaVerdictComment logs the "Failed to post QA verdict comment" warning with the stderr. Evidence: a unit test through the real GitHubProvider path with a stubbed failing spawnSync.

Non-Goals

  • Retrying posts.

Activity

  1. added
    bug
    on Oct 5, 2026
  2. admarble commented on Oct 5, 2026

    @admarble
    ContributorAuthor

    Runner context (before sequant run)

    Scope. postComment, addLabel, removeLabel and postQaVerdictComment only. postPRComment, the interface error-contract doc and the ready gate's empty catch (ready-gate.ts:726) belong to #1315. Do not expand into them.

    Failure cases the tests must cover. status: 1 with stderr, a timeout (status: null, signal: "SIGTERM", error.code: "ETIMEDOUT"), and a spawn failure (error set, e.g. ENOENT). Checking only status !== 0 misses none of these, but checking only status === 1 would. Mutation-verify AC-1 by removing the status check.

    Mocks. Put the child_process stub in a new test file. phase-executor.test.ts and run.test.ts queue git results in order, and a new call shifts them. AC-2 says "through the real GitHubProvider path": call postQaVerdictComment without the injected postComment, so the default new GitHubProvider().postComment runs against the stubbed spawnSync.

    Phase rules (exec and qa):

  3. admarble commented on Oct 5, 2026

    @admarble
    ContributorAuthor

    QA Verdict: NEEDS_VERIFICATION

    AC coverage: 2/2 met

  4. added 2 commits that reference this issue on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions