Skip to content

fix(closure-router): add ORG + REPO_FULL to Determine step env - #42

Merged
LukasWodka merged 1 commit into
developfrom
fix/closure-router-unbound-env
May 15, 2026
Merged

fix(closure-router): add ORG + REPO_FULL to Determine step env#42
LukasWodka merged 1 commit into
developfrom
fix/closure-router-unbound-env

Conversation

@LukasWodka

Copy link
Copy Markdown
Contributor

Summary

Closure-router has been silently failing on every issue closed-as-completed 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 that 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 by default.

Impact on the kanban

~37 completed-state issues are currently sitting in Cancelled instead of Prod since 2026-05-06. Will backfill via GraphQL after this lands.

Fix

Declare ORG + REPO_FULL in the Determine step's env block, matching what the Update step already has. After this, the script correctly hits the case "$CLOSING_PR_BASE" branch and emits status=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:

  1. The job conclusion shows failure, but failures on issues events are easy to miss — they don't gate merges, don't appear on PRs, and only show up in the Actions tab.
  2. GitHub's built-in "Item closed" project workflow runs in parallel and sets Status=Cancelled as 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

  • After merge to main, close a test issue as completed → verify Status moves to Prod
  • Close a test issue as not_planned → verify Status moves to Cancelled

🤖 Generated with Claude Code

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>
@LukasWodka
LukasWodka merged commit a4c4365 into developMay 15, 2026
3 checks passed
@LukasWodka
LukasWodka deleted the fix/closure-router-unbound-env branch May 15, 2026 09:22
@LukasWodkaLukasWodka added bug Something isn't working work-type:bug Defect or regression labels Jun 8, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugSomething isn't workingwork-type:bugDefect or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@LukasWodka@aptracebloc