Skip to content

fix(advance-deploy-env): monotonic Status — never demote a shipped card - #96

Merged
LukasWodka merged 1 commit into
developfrom
fix/advance-monotonic
Jul 28, 2026
Merged

fix(advance-deploy-env): monotonic Status — never demote a shipped card#96
LukasWodka merged 1 commit into
developfrom
fix/advance-monotonic

Conversation

@LukasWodka

@LukasWodka LukasWodka commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Back-merges (staging→develop, e.g. tracebloc-engine#540) and develop==main fast-forwards re-push commits whose PRs already shipped. advance-deploy-env set 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-env no 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 with fr-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.

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>
@LukasWodka
LukasWodka merged commit 3bcd092 into develop Jul 28, 2026
5 checks passed

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 71ad33e. Configure here.

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.

1 participant