Enhance kanban workflow with multi-stage validation and fixes#39
Merged
Conversation
…yPullRequestsReferences The previous PR's promotion accidentally pushed an empty file. Restoring full workflow content + applying the intended issue-completed → mirror closing PR status fix using closedByPullRequestsReferences (handles 'Closes #N' auto-closes where ClosedEvent.closer returns Commit, not PullRequest).
#38) * feat(kanban): split Functional review into multi-stage validation flow Replaces the single "Functional review" column with four distinct states that mirror the actual deploy pipeline: Code review → FR on dev → Ready for staging → FR on staging → Ready for prod → Done Changes: - advance-deploy-env.yml: now flips Status on develop/staging pushes too (previously only on main/master). develop → "FR on dev", staging → "FR on staging", main/master → "Done". - kanban-closure-router.yml: routes merged PRs to the matching FR column by base branch (develop/staging/main). - fr-pass-comment.yml (new): listens for "/fr-pass" PR comments from repo collaborators and advances FR-on-dev → Ready-for-staging or FR-on-staging → Ready-for-prod. Reacts 👍/👎 on the comment. - fr-pass-comment-caller.yml (new): per-repo template for adoption. The two "Ready for …" columns make deploy-cadence delays visible — cards stuck there mean the next promotion (develop → staging or staging → prod) is overdue. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(kanban): rename Done→Prod and gate promotions on Ready-for-X Two changes layered on top of the multi-stage FR flow: 1. Rename "Done" column → "Prod" — option ID preserved (98236657), so existing items already on it stay put. 2. New fr-gate.yml workflow (with caller template): - PR target = staging → all contained items must be in "Ready for staging" - PR target = main/master → all contained items must be in "Ready for prod" Item discovery uses the same commit-subject scan as advance-deploy-env (squash-merge "(#NNN)" + "Merge pull request #NNN") so we check every PR rolled into the promotion, not just the promotion PR itself. Failure mode: status check exits 1 with a clear "how to unblock" message. Override with the "skip-fr-gate" label for emergencies — the label is deliberately visible so we can audit overrides. Configured as a required status check via branch protection on staging + main/master so the merge button stays grey until the gate passes. Workflow text updates: advance-deploy-env.yml + kanban-closure-router.yml now use "Prod" everywhere they previously referenced "Done". Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…#37) The reusable workflow declared `permissions: pull-requests: write` on its job. Callers (e.g. tracebloc-py-package) don't grant that, and GitHub forbids called workflows from elevating GITHUB_TOKEN scope, so the workflow short-circuited to `startup_failure` before any step ran. The block is also unnecessary: this workflow doesn't use GITHUB_TOKEN at all — `gh pr comment` runs under `secrets.PROJECTS_KANBAN_TOKEN` (a PAT). Removing the block restores startup parity with the other reusable workflows in this repo, none of which declare a permissions block. Verified locally that py-package PR #117 hit startup_failure with the old YAML; all sibling reusables (set-pr-status, add-to-kanban, etc.) have no permissions block and run fine.
Cursor Bugbot caught (high severity): the trailing [ -n "$MISSING" ] && echo "..." fails the workflow step when MISSING is empty (the success path) because `[ -n "" ]` returns exit 1 under `set -e`, short-circuiting the && chain and becoming the script's exit code. Replace with an explicit `if`. Empty MISSING (everything found on kanban) now correctly exits 0. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
LukasWodka
approved these changes
May 6, 2026
LukasWodka
left a comment
Contributor
There was a problem hiding this comment.
Approving — this PR clears the critical Done→Prod mismatch on main (closure-router and advance-deploy-env have been failing for ~24h on every merge to main) and includes the Bugbot fix for fr-gate.yml. Verified the develop branch contents and column alignment on the project board.
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.
Note
Medium Risk
Adds new required-check workflow logic that can block promotions to
staging/mainif kanban statuses are mis-set, and changes how Status is auto-advanced on deploy/closure. Risk is mainly operational (workflow misconfiguration or missing project options) rather than code/runtime impact.Overview
Updates the kanban automation to a multi-stage validation flow, setting
StatustoFR on dev/FR on staging/Prodbased on deploy branch pushes (viaadvance-deploy-env.yml) and updating closure routing defaults fromDone/Functional reviewto the new statuses.Adds two new reusable workflows plus per-repo callers: an
FR gatethat blocks promotion PR merges unless all included items are inReady for staging/Ready for prod(with an explicitskip-fr-gatelabel override), and a/fr-passcomment handler that advances items fromFR on dev→Ready for stagingandFR on staging→Ready for prodwith reaction feedback.Minor: removes unneeded
pull-requests: writepermissions fromwip-limit-check.yml.Reviewed by Cursor Bugbot for commit 6558ebd. Bugbot is set up for automated code reviews on this repo. Configure here.