Uh oh!
There was an error while loading. Please reload this page.
fix(closure-router): add ORG + REPO_FULL to Determine step env - #42
Merged
Conversation
Issue closed-as-completed events have been silently failing the closure- router workflow since #38 landed: the Determine step references $REPO_FULL (via REPO_NAME) and $ORG inside the closing-PR-base lookup, but neither was declared in the step's env block. With `set -u`, the script aborted on line 17 with "REPO_FULL: unbound variable" before writing any status= output, which left the built-in "Item closed" project workflow to set Status=Cancelled. Net effect on the kanban: ~37 completed-as-COMPLETED issues sitting in Cancelled instead of Prod since 2026-05-06. Fix: declare ORG + REPO_FULL in the Determine step's env block, matching the Update step. The script now correctly hits the case branch and emits status=Prod (manual close) or mirror-PR-base. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Closure-router has been silently failing on every issue closed-as-completed since #38 landed. The Determine step references
$REPO_FULL(viaREPO_NAME) and$ORGinside the closing-PR-base lookup, but neither was declared in that step's env block. Withset -u, the script aborted on line 17 withREPO_FULL: unbound variablebefore writing anystatus=output — which left the built-in "Item closed" project workflow to setStatus=Cancelledby default.Impact on the kanban
~37 completed-state issues are currently sitting in
Cancelledinstead ofProdsince 2026-05-06. Will backfill via GraphQL after this lands.Fix
Declare
ORG+REPO_FULLin the Determine step's env block, matching what the Update step already has. After this, the script correctly hits thecase "$CLOSING_PR_BASE"branch and emitsstatus=Prod(for manual close with no linked PR) or mirrors the closing PR's base.Why this took a week to spot
Two compounding factors:
failure, but failures onissuesevents are easy to miss — they don't gate merges, don't appear on PRs, and only show up in the Actions tab.Status=Cancelledas a fallback. So items still moved somewhere — just to the wrong column. Symptom looked like "router silently misclassifies" instead of "router crashes".Follow-up
After this is on
main, recommend disabling the built-in "Item closed" and "Pull request merged" project workflows via the UI (no API for it) so our custom router has exclusive control of Status transitions.Test plan
completed→ verify Status moves toProdnot_planned→ verify Status moves toCancelled🤖 Generated with Claude Code