fix(workflow): deliver-and-stop gate verifies CI before declaring success - #1123
Merged
Conversation
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 Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 rerunbranch (fix/pr-gate-ci-rerun-v3) stays parked/unshipped.🤖 Generated with Claude Code