Skip to content

fix(feature-ideation): add discussion→dispatch redispatch bridge — single-idea enhancement crashes on discussion events (#591-class) #963

Description

@don-petry

Problem (confirmed)

feature-ideation's discussion: created single-idea enhancement crashes with:

##[error]Action failed with error: Unsupported event type: discussion

anthropics/claude-code-action aborts on discussion event contexts, and feature-ideation has no redispatch bridge (unlike initiative-planner). So when a human opens a new Idea, the enhancement crashes before posting anything — no new idea is ever enhanced on creation. Pre-existing (the discussion-trigger enhancement added in #629/#805 never actually worked); surfaced by the #875 validation (failed run: https://github.com/petry-projects/.github-private/actions/runs/28290846519, event=discussion).

The enhance_backlog sweep and scheduled runs are fine (they run under workflow_dispatch).

Fix — mirror the initiative-planner #618 bridge

Restructure the active stub .github/workflows/feature-ideation.yml (this repo) so the discussion: created path re-dispatches to workflow_dispatch instead of calling the reusable directly:

  1. Add a target_discussion input to the stub's workflow_dispatch inputs (string, default '').
  2. Add a redispatch job that runs only on discussion events: guard category.slug == 'ideas' && user.type != 'Bot', require GH_PAT_WORKFLOWS (a dispatch fired with GITHUB_TOKEN never starts a run — same constraint as scripts/initiative-planner/redispatch.sh), then gh workflow run feature-ideation.yml -f target_discussion=${{ github.event.discussion.number }}.
  3. Make the existing ideate job (the uses: reusable call) run only on workflow_dispatch/schedule, and source target_discussion from inputs.target_discussion (so single-idea mode works under the dispatched run, where claude-code-action is supported).

Reference implementation: .github/workflows/initiative-planner.yml (the redispatch job) + scripts/initiative-planner/redispatch.sh.

Acceptance criteria

  1. Creating a new human-authored Ideas Discussion results in exactly one enhancement comment in single-idea mode, carrying the canonical <!-- feature-ideation:enhanced --> marker — with no Unsupported event type: discussion crash.
  2. Bot-authored / non-ideas discussions are not redispatched (guard holds).
  3. bats coverage asserts the redispatch job exists, is guarded, and forwards target_discussion.
  4. Re-validates [Phase 2] Validate the folded feature-ideation enhancement mode on real .github-private Discussions (next ring) #875.

Cross-repo follow-on (not this issue)

The org template petry-projects/.github : standards/workflows/feature-ideation.yml needs the same bridge so other repos inherit it — a maintainer raises that PR (dev-lead can't write the public repo). This issue fixes the next-ring (.github-private) stub, which is what #875 validates.

Blocks #876 (deprecate idea-enhancer). Refs #875, #934, #872.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug reportsdev-leadFor dev-lead agent pickupneeds-human-reviewFlagged by automated PR review agent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions