Repository navigation
Description
Summary
The initiative-planner's primary trigger — a maintainer adding idea:approved to an Ideas Discussion — silently stopped working. Labelling Discussion #650 fired the planner but it died with:
##[error]Action failed with error: Unsupported event type: discussion
No epic was created. Root cause is not a new bug: a previously-shipped fix was silently reverted by an unrelated PR that was merged from a stale base. Filing this to capture the regression sequence and prevent recurrence. Fix is in #654.
Regression sequence
| # | PR / event | What it did |
|---|---|---|
| 1 | #591 | Identified: claude-code-action aborts on discussion event contexts, so the idea:approved auto-trigger never plans. |
| 2 | #618 (6feb0fe, 06-11) |
Fixed it. Added a redispatch bridge job: on discussion [labeled] the planner resolves the discussion number and re-invokes itself via workflow_dispatch (which the action supports); plan runs only on workflow_dispatch. Shipped with scripts/initiative-planner/redispatch.sh + tests/test_initiative_planner_redispatch.bats. |
| 3 | #606 (0407ea5, 06-11, "pr-review: PRs with >300 changed files hard-fail") |
Silently reverted #618. This PR was branched off main before #618 landed and, on merge, its diff deleted the redispatch job, redispatch.sh, and test_initiative_planner_redispatch.bats, and restored the broken direct-on-discussion if. The PR had nothing to do with the planner. |
| 4 | #640 (3f9e580, 06-13, dependabot) |
Bumped claude-code-action 1.0.133 → 1.0.148 on top of the now-broken file. Not causal — only touched the action SHA. |
| 5 | Discussion #650 (06-13) | Maintainer added idea:approved → run 27479891465 failed with "Unsupported event type: discussion". Bug confirmed in production. |
Why it slipped through CI
The killer property: #606 deleted the regression test (test_initiative_planner_redispatch.bats) in the same diff that deleted the feature. So there was no failing test to flag the revert — CI was green on a PR that removed both the guard and the thing it guarded. The mechanism is a classic stale-base / semantic revert: a PR whose branch predates an intervening change can, on merge, reintroduce the pre-change state of files it happens to touch, without a textual conflict.
Prevention (proposed)
- Require branches to be up to date with base before merge — i.e. adopt GitHub merge queues (or at minimum enable "Require branches to be up to date before merging" in branch protection). Under a merge queue, feat: implement issue #574 — pr-review: PRs with >300 changed files hard-fail the cascade (gh pr diff 406); define org standard for oversized PRs #606 would have been rebased onto post-feat: implement issue #591 — bug(initiative-planner): claude-code-action rejects
discussionevents — theidea:approvedauto-trigger never plans #618mainand re-tested before landing; the revert would surface as a conflict or a failingtest_initiative_planner_redispatch.batsinstead of merging clean. This is the single highest-leverage guard for this class of bug. - Treat test deletions as a reviewable signal — flag PRs that delete files under
tests/(or net-remove test cases) for explicit human acknowledgement, so "PR silently deletes a regression test" can't pass unnoticed. - Smoke-monitor the live trigger — the planner's
discussion [labeled]path has no post-merge canary. A lightweight check (or alert on planner runs that concludefailurewith "Unsupported event type") would have caught this on the firstidea:approvedafter the revert rather than relying on a human noticing MCP-Powered CI Review Enhancement — Standard #650 never planned. - Pin agent-authored PRs to a fresh base — feat: implement issue #574 — pr-review: PRs with >300 changed files hard-fail the cascade (gh pr diff 406); define org standard for oversized PRs #606 was an agent-implemented PR (
feat: implement issue #574); requiring a rebase-onto-latest-mainstep before agent PRs merge closes the stale-base window.
Acceptance
- fix(initiative-planner): restore discussion→workflow_dispatch redispatch bridge #654 merged (restores feat: implement issue #591 — bug(initiative-planner): claude-code-action rejects
discussionevents — theidea:approvedauto-trigger never plans #618 verbatim, preserving the v1.0.148 pin). - Re-trigger Discussion MCP-Powered CI Review Enhancement — Standard #650 (
idea:approvedre-add, or dispatch planner withdiscussion: 650) and confirm it plans. - Decision recorded on merge queues / required-up-to-date-branch (item 1).
- Decision recorded on test-deletion guard (item 2).
Activity
feat: S6 stale-base guards — test-deletion CI signal + fleet pipeline…
don-petry commentedon Jul 14, 2026
Closing as resolved (confirmed per your note — a canary-rollout stale-base side effect, now fixed).
discussionevents — theidea:approvedauto-trigger never plans #618 verbatim.scripts/initiative-planner/redispatch.shandtests/test_initiative_planner_redispatch.batsare back on main.feature-ideation.yml/initiative-planner.ymlaccept thediscussionworkflow_dispatchinput; thediscussion [labeled]path re-invokes viaworkflow_dispatch(PAT-dispatched) soclaude-code-actionnever sees the unsupporteddiscussioncontext.initiative-planner-canary.yml, which explicitly guards the 'Unsupported event type: discussion' fingerprint.Remaining are process decisions, not code (tracked here for your call, non-blocking):
auto-rebase:readylabeling, fix(dev-lead): label opened PRs auto-rebase:ready to break the #711 review-ready deadlock #1201) keeps agent PRs current, partially addressing item 4.The regression itself is fixed and canary-guarded.