Skip to content

fix(land-and-deploy): gate on all checks when no required checks are configured - #3001

Closed
harshitgavita-07 wants to merge 1 commit into
garrytan:mainfrom
harshitgavita-07:fix/land-and-deploy-all-checks-gate-2995
Closed

harshitgavita-07 wants to merge 1 commit into
garrytan:mainfrom
harshitgavita-07:fix/land-and-deploy-all-checks-gate-2995

Conversation

@harshitgavita-07

@harshitgavita-07 harshitgavita-07 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

hey @garrytan ,

Fixes #2995

Problem

Since v1.90.2.0, /land-and-deploy Steps 2-3 gate CI only on gh pr checks --required. On a repo that declares no required checks — every private repo on GitHub Free, and any repo without branch protection — the CLI reports "no required checks reported", the skill reads that as "nothing to wait for", skips the CI wait, and can merge over red or still-running CI.

Fix

  • Step 2: when --required reports none configured, re-query all checks (gh pr checks "$PR_NUMBER" --repo "$REPO" --json name,state,bucket,link) and gate on those. "None required" never means "nothing to wait for". "No checks exist at all" remains a pass.
  • Step 3: the watch follows the same set Step 2 gated on — --required --watch when required checks are configured, a plain --watch over all checks otherwise.

Scope kept to the gate itself; sections/merge-and-deploy.md is untouched because a fixed gate stops the flow long before the merge fallback.

Verification

  • New regression test in test/land-and-deploy-flow.test.ts pins the fallback: the all-checks command, the "None required" wording, the removal of "All pass (or none required)", the Step 3 all-checks watch, and the generated SKILL.md carrying the change. The text it asserts did not exist before this change, so it fails on current main.
  • bun test test/land-and-deploy-flow.test.ts — 25/25 pass. test/land-and-deploy-postfail.test.ts + test/carve-section-loading-land-and-deploy.test.ts — same results as pristine main (38 pass; the 1 fail/1 error there is a pre-existing missing @anthropic-ai/claude-agent-sdk module in a fresh checkout, reproduced on unmodified main).
  • SKILL.md regenerated with bun run gen:skill-docs after editing SKILL.md.tmpl.

@trunk-io

trunk-io Bot commented Sep 30, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@capy-ai

capy-ai Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Thank you! Your all-checks fallback is the logic behind the new bin/gstack-ci-gate in v1.91.13.0 (#3013, merged as f30b7b7), and you're credited as co-author.

@capy-ai capy-ai Bot closed this Oct 2, 2026
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.

land-and-deploy: --required CI gate merges over red/pending CI when no required checks are declared (regression in v1.90.2.0)

1 participant