Uh oh!
There was an error while loading. Please reload this page.
fix(advance-deploy-env): monotonic Status — never demote a shipped card - #96
Conversation
A push routinely carries commits that already shipped further down the pipeline: a staging->develop back-merge re-pushes Prod PRs to develop, and a develop==main fast-forward does the same. advance-deploy-env blindly set every PR in the push to the branch's column, un-shipping those cards (seen live: .github #87/#88/#89/#92 stranded at On dev after yesterday's ff, #95 demoted from Prod today; engine#540's back-merge would demote its whole staging history next). Now the per-PR query also reads the current Status and the update is skipped unless the target rank is strictly higher. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 71ad33e. Configure here.
| if [ "$TARGET_RANK" -gt 0 ] && [ "$(rank "$CURRENT_STATUS")" -ge "$TARGET_RANK" ]; then | ||
| echo "::notice::#$prnum already at '${CURRENT_STATUS:-none}' (>= '$STATUS_NAME') -- not demoting" | ||
| continue | ||
| fi |
There was a problem hiding this comment.
Deploy env skipped on status match
High Severity
The early continue when Status is already at or beyond the target also skips the Deploy environment update. kanban-closure-router intentionally sets Status first on PR merges, so this equal-rank path will leave Deploy environment unset on ordinary develop/staging/main merges. This workflow is the only writer of that field.
Reviewed by Cursor Bugbot for commit 71ad33e. Configure here.


Back-merges (staging→develop, e.g. tracebloc-engine#540) and develop==main fast-forwards re-push commits whose PRs already shipped.
advance-deploy-envset every PR in the push to the branch's column, demoting Prod cards to On dev — seen live on .github #87/#88/#89/#92 (yesterday's ff) and #95 (today's). Fix: read each item's current Status and only update when the target rank is strictly higher (rank mirrors fr-gate's). Archived-skip and per-item error isolation unchanged.Live regression test after promotion: fast-forward develop to main and verify the promo PR's card stays at Prod (pre-fix it got demoted to On dev).
🤖 Generated with Claude Code
Note
Low Risk
Scope is GitHub Actions kanban automation only; behavior change prevents incorrect demotions without touching application or deploy code.
Overview
advance-deploy-envno longer overwrites kanban Status (and skips the whole per-PR update) when a card is already at the same or a later pipeline stage than the branch’s target—fixing Prod → On dev regressions on develop pushes that only replay already-shipped commits (back-merges, develop==main fast-forwards).The workflow now loads each project item’s current Status via GraphQL, compares ranks using a
rank()helper aligned withfr-gate, and only advances when the target rank is strictly higher; otherwise it logs a notice and leaves the card unchanged. Header comments document monotonic advancement.Reviewed by Cursor Bugbot for commit 71ad33e. Bugbot is set up for automated code reviews on this repo. Configure here.