Skip to content

fix(workflow): deliver-and-stop gate verifies CI before declaring success - #1123

Merged
agents-squads[bot] merged 3 commits into
developfrom
fix/1012-pr-gate-ci
Jul 14, 2026
Merged

fix(workflow): deliver-and-stop gate verifies CI before declaring success#1123
agents-squads[bot] merged 3 commits into
developfrom
fix/1012-pr-gate-ci

Conversation

@agents-squads

@agents-squads agents-squads Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Closes #1012.

The deliver-and-stop gate (#951) declared convergence the moment ANY PR addressed the target issue — a red-CI PR reported success. Now checkConvergence() checks the PR's check buckets (gh pr checks --repo <squad.repo>): all-pass → converge as before; any fail/pending/missing or a gh error → keep cycling (never falsely report success).

GLM lane implementation (attempt 3, exact seam from the issue thread) + one orchestrator review fix: --repo ${squad.repo} pin, since the orchestrator's cwd need not be the squad checkout. Full suite 2327/2327 green locally, build green.

Attempt-2 note: the off-spec squads rerun branch (fix/pr-gate-ci-rerun-v3) stays parked/unshipped.

🤖 Generated with Claude Code

Jorge Vidaurre and others added 3 commits July 14, 2026 08:27
GLM runs recorded with cost_usd=0 (because SQUADS_GLM_COST_PER_MTOK_IN/OUT
were not set at run time) are now re-priced at display time when the env
rates are configured.

- Add repriceIfNeeded() function that checks GLM provider records with
  cost_usd=0 but tokens>0
- Apply repricing in boardCommand before building tiles and rendering
- This is display-only; the ledger is not modified
- Add 6 tests covering repricing logic (no-op cases, repricing when rates set,
  immutability)

Fixes #1118
The checkConvergence() function in workflow.ts now verifies that a found
PR's CI checks are passing before declaring success. Previously, the gate
would stop the run as soon as a PR matching the issue was found, even if
CI was red - this could falsely report success on incomplete work.

The fix:
- After checkPrForIssue() finds a PR, use gh pr checks to verify CI state
- Only declare convergence if all checks are in 'pass' bucket
- If CI check fails or is unavailable, fall back to not converging (safer)

This ensures red CI never reports success, maintaining the contract that
the deliver-and-stop gate only fires when work is actually complete.

Co-Authored-By: Claude <noreply@anthropic.com>
…orchestrator cwd

Co-Authored-By: Claude <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/lib/workflow.ts 75.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant