You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(run): GitHubProvider.postComment ignores gh's exit status, so a failed QA verdict post is silent #1312
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.
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):
Run the full suite at most once, in the foreground, with timeout 590, and only after a WIP commit. Otherwise run named vitest files. CI runs the full suite.
Commit every ~10 minutes. Never wait on a background test run.
Do not edit the PR body or title by any means (gh pr edit, gh api PATCH, MCP). Put the AC table and every SEQUANT_MUTATION marker in exec's final ## Summary, which must start with that heading.
Activity
admarble commentedon Oct 5, 2026
Runner context (before
sequant run)Scope.
postComment,addLabel,removeLabelandpostQaVerdictCommentonly.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: 1with stderr, a timeout (status: null,signal: "SIGTERM",error.code: "ETIMEDOUT"), and a spawn failure (errorset, e.g.ENOENT). Checking onlystatus !== 0misses none of these, but checking onlystatus === 1would. Mutation-verify AC-1 by removing the status check.Mocks. Put the
child_processstub in a new test file.phase-executor.test.tsandrun.test.tsqueue git results in order, and a new call shifts them. AC-2 says "through the realGitHubProviderpath": callpostQaVerdictCommentwithout the injectedpostComment, so the defaultnew GitHubProvider().postCommentruns against the stubbedspawnSync.Phase rules (exec and qa):
timeout 590, and only after a WIP commit. Otherwise run named vitest files. CI runs the full suite.gh pr edit,gh apiPATCH, MCP). Put the AC table and everySEQUANT_MUTATIONmarker in exec's final## Summary, which must start with that heading.}anywhere (fix(qa): a SEQUANT_MUTATION marker whose text contains "}" parses to nothing — renderMutationMarker and the parser do not round-trip #1305), andfailedTeststarts with the test file path (src/…/x.test.ts > describe > case).$N; write$(N)(investigation(skills): Claude Code may substitute positional $0 inside qa SKILL.md awk programs when /qa gets an argument #1289 lint).admarble commentedon Oct 5, 2026
QA Verdict: NEEDS_VERIFICATION
AC coverage: 2/2 met
fix(#1312): GitHubProvider.postComment ignores gh's exit status, so a…
fix(#1315): PlatformProvider has no error contract — postPRComment is…