Repository navigation
feature-ideation: discussion-triggered run fails at workflow setup (zero jobs) — discussion→dispatch bridge #571
Description
Summary
A feature-ideation run triggered by a new Ideas Discussion fails immediately at workflow setup — zero jobs are created (GitHub: "This run likely failed because of a workflow file issue", conclusion=failure, total_jobs=0). The discussion → workflow_dispatch redispatch bridge (added in #550, building on #457/#448) appears to be broken on the discussion event path, and this looks like its first real-world exercise.
Evidence
- Failing run: https://github.com/petry-projects/bmad-bgreat-suite/actions/runs/28534194854 (event=
discussion,conclusion=failure, 0 jobs). - Trigger: petry-projects/bmad-bgreat-suite Discussion Org Status — 2026-05-22 #344 "enhanced devops agent persona", category
ideas, authordon-petry(OWNER, not a bot) → theredispatchjob'sif:(ideas category + OWNER/MEMBER/COLLABORATOR + non-bot) would have matched. Since no jobs were created at all (not "skipped"), the failure is a workflow-file/validation error at setup, before any jobif:is evaluated. - Not a bad copy: bmad's
.github/workflows/feature-ideation.ymlis byte-identical to the currentstandards/workflows/feature-ideation.ymltemplate (verbatim enrollment, reusable pinned@e20a8fac # v1). - Never succeeded via discussion: no discussion-triggered
feature-ideationrun has succeeded anywhere in the org (this path was only recently deployed).
Likely root cause (hypothesis — exact "Invalid workflow file" text not retrievable via API for startup failures)
The caller defines the redispatch inline (redispatch job on discussion, plus an ideate job if: github.event_name != 'discussion' that calls the reusable with a with: block full of ${{ inputs.* }} references). On a discussion event there is no inputs context, and GitHub validates the reusable-call graph (including the ideate job's with:) at setup time regardless of its if: — a plausible trigger for the zero-job compile failure.
Contrast: initiative-planner.yml is a thin caller (uses: + secrets: inherit, no inline redispatch, no with: inputs.*) whose reusable performs the redispatch internally — and it works correctly on discussion events (validated same day: TalkTerm idea:approved → inert epic #333 + DAG).
Impact
- Auto-ideation on new Ideas Discussions (feat(feature-ideation): auto-enhance new Ideas Discussions on creation #448/fix(feature-ideation): discussion→dispatch redispatch bridge in the template #550) does not work — every such Discussion trips a failed run.
- Fleet-wide latent: any repo running
feature-ideation @e20a8facwill hit this the first time a real Ideas Discussion is opened. Blocks enrollingfeature-ideationon the stable ring (markets/ContentTwin/google-app-scripts/broodly) until fixed. - Not affected: the
schedule/workflow_dispatchideation paths, and the entire idea→initiative planner/driver core.
Suggested fix directions
- Mirror
initiative-planner.yml's architecture — make the caller a thin stub and move the discussion→dispatch redispatch into the reusable (which runs under a context where the reusable-call graph validates cleanly), or - Keep the inline bridge but ensure the
ideatereusable job'swith:does not force${{ inputs.* }}evaluation on discussion events (e.g. gate via a computed job output / avoid referencinginputswhere it's absent).
Please confirm the exact setup error from the run's UI ("Invalid workflow file …") when triaging.
Repro
- In a repo with
feature-ideation.yml(@e20a8fac), open a Discussion in the Ideas category as an OWNER/MEMBER. - Observe the
feature-ideationrun fail at setup with 0 jobs.
Refs: #550, #457, #448 · rollout context combsmith/.github-private#978, #515.
Activity
don-petry commentedon Jul 2, 2026
Dev-Lead Implementation Plan
Issue: #571 — feature-ideation: discussion-triggered run fails at workflow setup (zero jobs) — discussion→dispatch bridge
Root cause
The
feature-ideation.ymlcaller defines the reusable call (ideatejob) with awith:block that references${{ inputs.* }}. GitHub validates the reusable-call graph (includingwith:) at setup time regardless of the jobif:. On adiscussionevent there is noinputscontext, which trips the zero-job "Invalid workflow file" compile failure — soredispatchnever even gets a chance to run.Scope
Adopt suggested fix direction #2: keep the inline discussion→dispatch bridge, but make the reusable-call
with:block never reference${{ inputs.* }}. Dispatch inputs are computed in a gatedprepjob and forwarded vianeeds.prep.outputs.*(an always-valid context). Add a regression lint + test so the anti-pattern can't come back.Implementation Checklist
standards/workflows/feature-ideation.yml— add a gatedprepjob that echoesinputs.*to job outputs; changeideatetoneeds: [prep]and source itswith:fromneeds.prep.outputs.*; keepredispatchbridge.github/workflows/feature-ideation.yml— apply the same structure to this repo's own caller (dogfood; it carries the same latent bug).github/scripts/feature-ideation/lint-caller.sh— fail when a job-level reusableuses:has awith:value referencing${{ inputs.* }}.github/workflows/feature-ideation-tests.yml— install pyyaml, add script to shellcheck list, add a "lint caller" gate stepstandards/ci-standards.md§9 — document the redispatch-bridge + prep-outputs architecture (currently documents the superseded directtarget_discussionpass)Tests to Write
test/workflows/feature-ideation/lint-caller.bats— clean fixture passes;inputs.*-in-reusable-with:fixture fails with the offending key; step-level actionuses:produces no false positive; the real template and real repo caller both pass (regression guards — red before the fix)test/workflows/feature-ideation/fixtures/callers/Test Command
bats test/workflows/feature-ideation/(plusbash .github/scripts/feature-ideation/lint-caller.sh <files>andbash .dev-lead/scripts/dev-lead-lint.sh)don-petry commentedon Jul 2, 2026
Dev-Lead: issue #571 implementation failed — will retry
The engine failed (
engine-error— e.g. a timeout or transient engine error). This was attempt 1 of 3; dev-lead will retry automatically. You can also re-apply thedev-leadlabel to retry now.engine-errordon-petry commentedon Jul 2, 2026
Dev-Lead: issue #571 implementation failed — will retry
The engine failed (
engine-error— e.g. a timeout or transient engine error). This was attempt 2 of 3; dev-lead will retry automatically. You can also re-apply thedev-leadlabel to retry now.engine-errordon-petry commentedon Jul 2, 2026
Dev-Lead: cannot implement issue #571 — needs human attention
Automatic retries are exhausted (attempt 3 of 3). The most recent failure was
engine-error.Last 40 lines of engine output (redacted)
Please review the failures above. To retry anyway, remove the
dev-lead:needs-humanlabel and re-apply thedev-leadlabel.don-petry commentedon Jul 4, 2026
Dev-Lead: cannot implement issue #571 — needs human attention
Automatic retries are exhausted (attempt 4 of 3). The most recent failure was
engine-error.Please review the failures above. To retry anyway, remove the
dev-lead:needs-humanlabel and re-apply thedev-leadlabel.fix(feature-ideation): route caller inputs through a prep job (#571) (#…
1 remaining item
fix(feature-ideation): route caller inputs through a prep job (#571) (#…
don-petry commentedon Jul 4, 2026
Fixed and validated end-to-end ✅
Root cause confirmed. A reusable-workflow call graph (
uses:+with:) is evaluated at workflow setup, before and regardless of the calling job'sif:. Theideatejob'swith:referenced${{ inputs.* }}, and theinputscontext isn't populated on thediscussionevent → the whole run failed at setup with zero jobs, even thoughideatewas gatedif: github.event_name != 'discussion'. (Note: this is a runtime setup failure, not static-lintable —actionlintpasses the broken file.)Fix. Resolve dispatch inputs in a gated
prepjob and pass them toideatevianeeds.prep.outputs.*— an always-valid context that defers thewith:evaluation to run time (skipped ondiscussion). Mirrors the workinginitiative-planner.ymlbridge.standards/workflows/feature-ideation.yml+ this repo's own caller; addedlint-caller.shguard + 10 bats tests wired intofeature-ideation-tests.yml; documented the architecture in ci-standards §9.next-ring dogfood caller + updated its compliance test (which had encoded the old buggyinputs.*contract) and added a feature-ideation: discussion-triggered run fails at workflow setup (zero jobs) — discussion→dispatch bridge #571 guard.Live validation (petry-projects/.github-private,
nextring): opened a real Ideas Discussion and observed the discussion-triggered run:redispatch: success,prep/ideatecorrectly skipped — no zero-job startup failure.workflow_dispatch→ 4 jobs,prep: success,ideateran withtarget_discussionforwarded throughneeds.prep.outputs.*.Contrast: the pre-fix discussion runs failed at setup. The bridge now works.
Fleet rollout. The other repos' callers still carry the same latent
inputs.*pattern until re-synced to the fixed template — tracked in #614 (each repin/onboard now picks up the fix, and the newlint-caller.shprevents regressions).Closing as fixed.
fix(feature-ideation): route caller inputs through a prep job (#571) (#…
fix(feature-ideation): route caller inputs through a prep job (#571) (#…
fix(feature-ideation): route caller inputs through a prep job (#571) (#…
fix(feature-ideation): route caller inputs through a prep job (#571) (#…
fix(feature-ideation): route caller inputs through a prep job (#571) (#…
fix(feature-ideation): route caller inputs through a prep job (#571) (#…
fix(feature-ideation): route caller inputs through a prep job (#571) (#…
fix(feature-ideation): route caller inputs through a prep job (#571) (#…
fix(feature-ideation): route caller inputs through a prep job (#571) (#…
fix(feature-ideation): route caller inputs through a prep job (#571) (#…
fix(feature-ideation): route caller inputs through a prep job (#571) (#…