Skip to content

fix(#1315): PlatformProvider has no error contract — postPRComment is still unchecked and the ready gate's report-post catch is empty (#1312 follow-up) - #1320

Merged
admarble merged 6 commits into
mainfrom
feature/1315-fix-platforms-platformprovider-has-no-error-contra
Oct 5, 2026
Merged

admarble merged 6 commits into
mainfrom
feature/1315-fix-platforms-platformprovider-has-no-error-contra

Conversation

@admarble

@admarble admarble commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The branch feature/1315-fix-platforms-platformprovider-has-no-error-contra is pushed. Under the orchestrator the PR is left to the orchestrator. Build, lint and the full suite all pass: 371 files, 9001 tests passed, 1 expected fail, 3 skipped.

Ready-gate route for AC-3: I added an optional log?: (message: string) => void to RunReadyGateOptions, defaulting to console.warn. The gate stays non-fatal. batch-executor.ts passes its own log. I did not edit commands/ready.ts; it uses the console.warn default.

AC Status Evidence
AC-1 ✅ platform-provider.ts: the PlatformProvider doc comment states every async method rejects on failure and never resolves on failure.
AC-2 ✅ github.ts: postPRComment now calls runGhOrThrow and rejects on non-zero exit, timeout or spawn failure, with gh's stderr. Tests: github-gh-failure.test.ts.
AC-3 ✅ ready-gate.ts: the empty catch now logs Failed to post ready-gate report for #N: <error>. Test: ready-gate.test.ts, "logs a warning with the error when postReport rejects (#1315)".
AC-4 ✅ The failing-spawnSync loop in github-gh-failure.test.ts now covers postComment, addLabel, removeLabel and postPRComment.

CHANGELOG has a new entry under [Unreleased].

Mutation results:

  • AC-2: with postPRComment reverted to a bare spawnSync, 4 postPRComment cases failed (non-zero exit, timeout, spawn failure, stderr). Restored.
  • AC-3: with the warn sink a no-op, only the new warning test failed. Restored. My first attempt there broke the tsc build, so I switched to a mutation that type-checks.
  • I did not run parseMutationMarkers on the markers above.

Pre-PR confidence check

  • Weakest part: The ready-gate warning goes to console.warn on the sequant ready path. The TUI may interleave it with the live zone.
  • Coverage gaps: None. github.ts and ready-gate.ts are covered by the new tests. batch-executor.ts only gained a log pass-through and has no dedicated test for it.

Other checks: no option interfaces changed beyond the gate's log, so there are no CLI flags to wire. There are no shell scripts and no pre-tool.sh changes. Quality Plan Alignment is N/A, as there is no quality plan in the issue.

Runner note

This body was written by the runner from exec's final ## Summary (run 5c20ddf7). The run's own body was the placeholder, because of the #1311 cause; that is the fourth time in four runs. The body has no sequant run trailer, so the post-QA update leaves it alone.

QA (run fb82f2cc) and runner fix

AC_MET_BUT_NOT_A_PLUS, 4/4 ACs met. QA's fix-now finding: the new contract said every async method rejects on failure, but getIssueComments resolved [] and checkAuth resolved false. Fixed in 94268711:

  • getIssueComments now goes through runGhOrThrow, which returns stdout, and rejects on failure. It has no production caller.
  • The doc comment names checkAuth as the one exception: a yes/no question that answers false.
  • getIssueComments joined the failing-spawnSync loop. The old "returns empty array on failure" test now asserts rejection.

QA's second finding (createPR timeout and spawn-error paths are not in the loop) is dropped. createPR already threw before this PR (createPRCliSync checks exitCode). This PR doesn't change it, and AC-4 covers the write methods #1312 left unchecked.

Mutation-verified: AC-1 — made getIssueComments swallow the gh failure and resolve an empty list; github-gh-failure.test.ts getIssueComments cases failed (4) plus github.test.ts rejects-on-failure; restored.

Fixes #1315

🤖 Generated with Claude Code

…rt-post failures; document the PlatformProvider error contract

Entire-Checkpoint: c6c6af3cb14e
Entire-Checkpoint: 623f32f80bff
…heckAuth's false as the one exception

QA finding on PR #1320: the new PlatformProvider doc said every async method rejects on failure, but getIssueComments resolved [] and checkAuth resolved false. getIssueComments has no production caller, so it now goes through runGhOrThrow (which returns stdout); checkAuth is a yes/no question and is documented as the exception.

Claude-Session: https://claude.ai/code/session_01B4TQvM2Ps5mc4jFgHB99bw
Entire-Checkpoint: bee408ba3dea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant