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
fix(platforms): PlatformProvider has no error contract — postPRComment is still unchecked and the ready gate's report-post catch is empty (#1312 follow-up) #1315
Tier: mechanical Found: 2026-10-04, upstream research on #1312
Problem.PlatformProvider (src/lib/workflow/platforms/platform-provider.ts) does not say how a method reports failure. GitHubProvider uses three conventions at once:
Sync helpers return null, [] or false.
fetchIssue, getPRStatus and createPR throw.
postComment, addLabel, removeLabel and postPRComment call spawnSync and ignore its result, so they never fail.
The write methods came from #368 (PR #379, 2026-03-22) with no callers. Five months later #937 and #964 called postComment inside try/catch as "best-effort, caught and logged". That contract was never true, because the method cannot throw. #1312 fixes postComment, addLabel and removeLabel. This issue covers the rest of the class.
The interface has no documented error contract, so a second provider (or a new method) can reintroduce the shape.
AC
AC-1: PlatformProvider's doc comment states that every async method rejects on failure (non-zero exit, timeout, spawn error) and never resolves on failure. Evidence: the interface doc comment in the diff.
AC-2: postPRComment rejects when gh exits non-zero, times out or fails to spawn, and the error carries gh's stderr. Evidence: a unit test with a stubbed spawnSync returning status: 1, mutation-verified by removing the status check.
AC-3: When postReport rejects, the ready gate logs a warning with the error, not an empty catch. Evidence: a ready-gate unit test with a rejecting postReport asserts the warning.
AC-4: No async write method in GitHubProvider calls spawnSync without checking status, error and signal. Evidence: a unit test that stubs a failing spawnSync and asserts every async write method on the provider rejects.
AC-3 (ready gate).ready-gate.ts:723-729 has an empty catch {} around opts.postReport. The gate has no logger today, only onProgress (a phase-event callback, not a warning channel). Pick the narrowest route and say which one in the Summary. Options: add an optional log/onWarning to the gate options, as postQaVerdictComment takes log, and wire it from both callers (commands/ready.ts:312 and batch-executor.tsrunReadyGateForIssue); or record the error on the result. Keep the gate non-fatal.
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.
Activity
admarble commentedon Oct 5, 2026
Runner context (before
sequant run)github.tsnow hasrunGhOrThrow(args). Use it forpostPRComment; do not write a second helper.ready-gate.ts:723-729has an emptycatch {}aroundopts.postReport. The gate has no logger today, onlyonProgress(a phase-event callback, not a warning channel). Pick the narrowest route and say which one in the Summary. Options: add an optionallog/onWarningto the gate options, aspostQaVerdictCommenttakeslog, and wire it from both callers (commands/ready.ts:312andbatch-executor.tsrunReadyGateForIssue); or record the error on the result. Keep the gate non-fatal.spawnSyncand asserts each async write method rejects:postComment,addLabel,removeLabelandpostPRComment. You can extendsrc/lib/workflow/platforms/github-gh-failure.test.tsfrom bug(run): GitHubProvider.postComment ignores gh's exit status, so a failed QA verdict post is silent #1312.postPRComment(revert it to a barespawnSync). Afalse-constant mutation breaks thetscbuild in global setup (bug(run): GitHubProvider.postComment ignores gh's exit status, so a failed QA verdict post is silent #1312 exec hit this). Use a condition that type-checks.Phase rules (exec and qa):
timeout 590, and only after a WIP commit. Otherwise run named vitest files. CI runs the full suite.SEQUANT_MUTATIONmarker in the final message, which must start with## Summaryand contain no other text before it. investigation(run): the exec output handed to createPR was not exec's final message — PR #1310 got the placeholder body although exec ended with a full ## Summary #1311 is open: text before the heading in an earlier message can glue onto it.}(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.admarble commentedon Oct 5, 2026
QA Verdict: AC_MET_BUT_NOT_A_PLUS
AC coverage: 4/4 met
Gaps:
GitHubProvider.getIssueComments(github.ts:1018-1046) resolves[]on non-zero exit, spawn error or bad JSON.checkAuthresolvesfalseon a spawn error.Suggestions:
createPRfailure case (status null with a timeout error) so AC-4's "every async write method" is shown by a test, not only by reading the code.fix(#1315): getIssueComments rejects on failure; the contract names c…
chore(#1315): keep the CHANGELOG Fixed list contiguous after merging …
fix(#1315): PlatformProvider has no error contract — postPRComment is…