Uh oh!
There was an error while loading. Please reload this page.
fix(kanban): reconcile derives the missed stage instead of stranding the card (backend#1411) - #129
Merged
Merged
Conversation
…the card Bugbot on .github#127, and it is the flip side of my own previous fix. I stopped reconcile asserting Done for a closed-completed issue that has a PR or Commit closer but sits in a non-deploy column. That removed a false claim and created a worse outcome: the card is closed, in an active column, and archive only takes terminal ones -- so it stayed there permanently. That is the invariant this job exists to enforce, broken by the job itself. Skipping was never the right answer, because that case IS the router-miss this job backstops. So do what the router failed to do: read the closing PR's base ref and derive the stage from it. no closer -> Done closed by PR, base main/master -> Prod closed by PR, base staging -> FR on staging closed by PR, base develop -> On dev Commit closer, or unknown base -> On dev (the router's own default) lookup unreadable -> SKIP, unreadable is not evidence already in a deploy column -> SKIP, the stage is already recorded The mapping is character-for-character the router's, deliberately. When those two disagree the faster one wins and the slower one silently undoes it, which was Bugbot's third finding on .github#126 -- the same two files, the same rule, out of step. ON_DEV_OPT and FR_STAGING_OPT were only resolved in a later step, so the classify step could not have set those columns even if it wanted to. Declared there now. Verified by extracting the decision and running all nine combinations rather than reading the case arms. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
saadqbal
approved these changes
Aug 3, 2026
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Bugbot on #127 — and it is the flip side of my own previous fix.
What I got wrong
I stopped reconcile asserting
Donefor a closed-completed issue that has a PR/Commit closer but sits in a non-deploy column. That removed a false claim and created a worse outcome: the card is closed, in an active column, and archive only takes terminal ones — so it stayed there forever. That is the invariant this job exists to enforce, broken by the job itself.Skipping was never right, because that case is the router-miss this job backstops.
The fix
Do what the router failed to do — read the closing PR base ref and derive the stage:
Donemain/masterProdstagingFR on stagingdevelopOn devOn dev(the router’s own default)The mapping is character-for-character the router’s, deliberately: when those two disagree the faster one wins and the slower one silently undoes it, which was Bugbot’s third finding on #126 — same two files, same rule, out of step.
Also:
ON_DEV_OPTandFR_STAGING_OPTwere only resolved in a later step, so the classify step could not have set those columns even if it had tried. Declared there now.Verified by extracting the decision and running all nine combinations rather than reading the case arms.
actionlintclean.Note
Targets
develop; #127 promotesdevelop → main, so it picks this up automatically.🤖 Generated with Claude Code
Note
Medium Risk
Changes automated kanban status moves for closed issues; wrong mapping could mis-route cards, but logic mirrors the existing closure router and still skips on lookup errors.
Overview
Kanban reconcile no longer leaves closed-completed issues stranded in active columns when the closure router missed setting a deploy stage. Instead of skipping PR/Commit closers outside deploy columns, it reads the closing PR’s
baseRefNameand moves the card to Prod, FR on staging, or On dev using the same base-branch rules askanban-closure-router.yml(unknown base or Commit → On dev). Failed closer lookups still skip; no-closer still goes to Done.The classify step now loads On dev and FR on staging status option IDs up front so those moves can be applied.
Reviewed by Cursor Bugbot for commit 5f64511. Bugbot is set up for automated code reviews on this repo. Configure here.