Skip to content

fix(kanban): reconcile derives the missed stage instead of stranding the card (backend#1411) - #129

Merged
LukasWodka merged 1 commit into
developfrom
fix/1411-reconcile-derives-stage
Aug 3, 2026
Merged

fix(kanban): reconcile derives the missed stage instead of stranding the card (backend#1411)#129
LukasWodka merged 1 commit into
developfrom
fix/1411-reconcile-derives-stage

Conversation

@LukasWodka

@LukasWodkaLukasWodka commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Bugbot on #127 — and it is the flip side of my own previous fix.

What I got wrong

I stopped reconcile asserting Done for 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:

closerbase
noneDone
PullRequestmain/masterProd
PullRequeststagingFR on staging
PullRequestdevelopOn dev
Commit, or unknown baseOn dev (the router’s own default)
lookup unreadableskip — 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 #126 — same two files, same rule, out of step.

Also: 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 had tried. Declared there now.

Verified by extracting the decision and running all nine combinations rather than reading the case arms. actionlint clean.

Note

Targets develop; #127 promotes develop → 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 baseRefName and moves the card to Prod, FR on staging, or On dev using the same base-branch rules as kanban-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.

…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>
@LukasWodkaLukasWodka self-assigned this Aug 3, 2026
@LukasWodka
LukasWodka merged commit ec6bf88 into developAug 3, 2026
4 checks passed
@LukasWodka
LukasWodka deleted the fix/1411-reconcile-derives-stage branch August 14, 2026 13:53
Sign up for freeto 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.

2 participants

@LukasWodka@saadqbal