Skip to content

chore(promote): develop → main — advance-deploy-env monotonic guard - #97

Merged
LukasWodka merged 2 commits into
mainfrom
develop
Jul 28, 2026
Merged

chore(promote): develop → main — advance-deploy-env monotonic guard#97
LukasWodka merged 2 commits into
mainfrom
develop

Conversation

@LukasWodka

@LukasWodka LukasWodka commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Promotes #96 to main (callers reference @main). Merge-commit per the promotion-hop rule.

🤖 Generated with Claude Code


Note

Low Risk
CI-only kanban automation with a forward-only guard; no app runtime or auth changes, though incorrect rank mapping could leave some cards stale until a later forward push.

Overview
Prevents kanban cards from moving backward when advance-deploy-env runs on pushes that re-include already-shipped commits (e.g. staging→develop back-merges or develop/main sync).

The workflow now loads each PR’s current Status from the project GraphQL API, compares it to the branch’s target column using a rank() ordering aligned with fr-gate, and skips Deploy env / Status updates when the card is already at or beyond that target—logging a notice instead of demoting (e.g. ProdOn dev).

Header comments document this monotonic advancement behavior and the production incidents it addresses.

Reviewed by Cursor Bugbot for commit 3bcd092. Bugbot is set up for automated code reviews on this repo. Configure here.

LukasWodka and others added 2 commits July 28, 2026 11:14
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>
fix(advance-deploy-env): monotonic Status — never demote a shipped card
@LukasWodka
LukasWodka merged commit d4343d6 into main Jul 28, 2026
6 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 3bcd092. Configure here.

| select(.project.number == ($n | tonumber)) | .status.name // ""' 2>/dev/null | head -1)
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Equal-rank skip blocks Deploy

High Severity

The monotonic guard uses -ge, so when Status is already at the target rank the loop continues and never updates Deploy environment. kanban-closure-router.yml only sets Status and usually wins the race on PR merges, so this workflow then skips the Deploy update it alone is responsible for. True demotions are strictly higher rank; -gt would still block those.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3bcd092. 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