Skip to content

fix(feature-ideation): route caller inputs through a prep job (#571) - #615

Merged
don-petry merged 2 commits into
mainfrom
fix/571-feature-ideation-inputs-context
Jul 4, 2026
Merged

fix(feature-ideation): route caller inputs through a prep job (#571)#615
don-petry merged 2 commits into
mainfrom
fix/571-feature-ideation-inputs-context

Conversation

@don-petry

Copy link
Copy Markdown
Contributor

Problem

feature-ideation runs triggered by a new Ideas Discussion fail immediately at workflow setup — zero jobs created ("Invalid workflow file"). This blocks auto-enhancement of every new human Idea and gates the fleet stable-ring rollout (#614).

Root cause. A reusable-workflow call graph (its uses: + with:) is validated at workflow setup, before and regardless of the calling job's if:. The inputs context is only populated for workflow_dispatch / workflow_call, so the ideate job's with: referencing ${{ inputs.* }} fails the whole run on the discussion: created trigger — even though ideate is gated if: github.event_name != 'discussion'. The proven-working initiative-planner.yml avoids this by never referencing inputs in its reusable with: on the discussion path.

Note: this is a runtime setup-time failure, not a static-lint error — actionlint passes the broken file because inputs is statically a declared context. The failure only manifests when the workflow is actually triggered by discussion.

Fix

Resolve dispatch inputs in an ordinary prep job (its step expressions run at job time and are skipped on discussion) and pass them to ideate via needs.prep.outputs.* — an always-valid context that defers the with: evaluation to run time. On a discussion event ideate is skipped, so its reusable with: is never evaluated. Mirrors the initiative-planner redispatch bridge.

Changes

  • standards/workflows/feature-ideation.yml (template) — add gated prep job; ideate.with now reads needs.prep.outputs.* (booleans cast via fromJSON), zero inputs references. Reusable pin unchanged.
  • .github/workflows/feature-ideation.yml (this repo's dogfood caller) — brought onto the same redispatch + prep pattern (it was the older inline-on-discussion shape that would abort in claude-code-action). Reusable pin unchanged (3500ed2).
  • .github/scripts/feature-ideation/lint-caller.sh — new guard: fails any job-level reusable with: that references the inputs context (github.event.inputs.* and step-level action uses: are intentionally allowed). Wired into feature-ideation-tests.yml (shellcheck + a lint step; adds pyyaml).
  • test/workflows/feature-ideation/lint-caller.bats + fixtures/callers/ — 10 tests: clean passes, inputs-in-with fails, step-level/github.event.inputs/no-uses no false positives, index syntax caught, both live callers clean, exit-code precedence.
  • standards/ci-standards.md §9 — document the redispatch + prep-outputs architecture (replaces the superseded inline target_discussion description).

Validation

  • bats test/workflows/feature-ideation/126/126 (10 new + 116 existing)
  • shellcheck -x lint-caller.sh clean
  • actionlint -shellcheck clean on all three touched workflows
  • ✅ Confirmed both fixed callers carry zero inputs-context references in any reusable with:
  • Post-merge live check: open a human Idea Discussion in .github-private (the next ring) and confirm the discussion→dispatch bridge now produces a run with jobs (not a zero-job startup failure). A setup-time failure on the discussion event can only be exercised by a real event, not in PR CI.

Fixes #571 · unblocks #614

🤖 Generated with Claude Code

…571

A reusable-workflow call graph (its `uses:` + `with:`) is validated at workflow
setup, before and regardless of the calling job's `if:`. The `inputs` context is
only populated for workflow_dispatch/workflow_call, so the `ideate` job's `with:`
referencing `${{ inputs.* }}` fails the whole run at setup (zero jobs, "Invalid
workflow file") on the `discussion: created` trigger — even though `ideate` is
gated `if: github.event_name != 'discussion'`. This blocked auto-enhancement of
every new human Idea and the fleet stable-ring rollout.

Resolve dispatch inputs in an ordinary `prep` job (its step expressions run at
job time and are skipped on `discussion`) and pass them to `ideate` via
`needs.prep.outputs.*` — an always-valid context that defers the `with:`
evaluation to run time. Mirrors the proven initiative-planner discussion bridge.

- standards/workflows/feature-ideation.yml: add gated `prep` job; ideate.with
  now reads needs.prep.outputs.* (booleans via fromJSON), no `inputs` context.
- .github/workflows/feature-ideation.yml: bring this repo's dogfood caller onto
  the same redispatch + prep pattern (was the older inline-on-discussion shape).
- lint-caller.sh + bats suite + fixtures: fail any job-level reusable `with:`
  that references the `inputs` context; wired into feature-ideation-tests.yml.
- ci-standards.md §9: document the redispatch + prep-outputs architecture.

Refs: #571, #614

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 4, 2026 19:58
@don-petry
don-petry requested a review from a team as a code owner July 4, 2026 19:58
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@don-petry, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 33 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0c22d457-f01c-48e7-ab8c-dc711b219eac

📥 Commits

Reviewing files that changed from the base of the PR and between 55fbff4 and b6efb1b.

📒 Files selected for processing (8)
  • .github/scripts/feature-ideation/lint-caller.sh
  • .github/workflows/feature-ideation-tests.yml
  • .github/workflows/feature-ideation.yml
  • standards/ci-standards.md
  • standards/workflows/feature-ideation.yml
  • test/workflows/feature-ideation/fixtures/callers/clean-needs-outputs.yml
  • test/workflows/feature-ideation/fixtures/callers/inputs-in-with.yml
  • test/workflows/feature-ideation/lint-caller.bats
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/571-feature-ideation-inputs-context

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) July 4, 2026 19:59

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new linter script lint-caller.sh, along with associated BATS tests and documentation updates, to prevent GitHub Actions workflow setup failures caused by referencing the inputs context in reusable workflow calls (issue #571). The feature-ideation.yml workflow is updated to resolve inputs in a prep job and pass them via job outputs. The review feedback suggests a more robust way to capture the exit status of the scanning function in the bash script to avoid fragility.

Comment thread .github/scripts/feature-ideation/lint-caller.sh Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a GitHub Actions workflow setup-time validation failure in the feature-ideation caller stub when triggered by discussion: created, by ensuring the reusable workflow call no longer references the inputs context at job-definition time. The PR introduces a prep job to resolve dispatch inputs at runtime and passes them via needs.prep.outputs.*, plus adds a linter + bats coverage to prevent regressions.

Changes:

  • Add a gated prep job and route reusable with: values through needs.prep.outputs.* (casting booleans with fromJSON) to avoid inputs.* references at workflow setup time.
  • Update this repo’s dogfood caller to use the same redispatch + prep pattern as the standard template.
  • Add lint-caller.sh + bats fixtures/tests and wire it into feature-ideation-tests.yml (including installing PyYAML).

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
standards/workflows/feature-ideation.yml Adds prep job and switches reusable with: to needs.prep.outputs.* to prevent setup-time failure on discussion events.
.github/workflows/feature-ideation.yml Aligns the repo’s caller stub with redispatch + prep pattern; removes job-level inputs.* references in reusable with:.
.github/scripts/feature-ideation/lint-caller.sh New linter preventing job-level reusable with: from referencing the inputs context.
test/workflows/feature-ideation/lint-caller.bats Adds bats tests for the new linter (positive, negative, and regression guards).
test/workflows/feature-ideation/fixtures/callers/inputs-in-with.yml Fixture representing the broken (#571) pattern that must fail lint.
test/workflows/feature-ideation/fixtures/callers/clean-needs-outputs.yml Fixture representing the corrected pattern that must pass lint.
.github/workflows/feature-ideation-tests.yml Installs PyYAML and runs shellcheck + the new linter in CI.
standards/ci-standards.md Documents the redispatch + prep-outputs architecture and the #571 constraint; references the linter enforcement.

@don-petry
don-petry disabled auto-merge July 4, 2026 20:01
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 4, 2026
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-reviews (applied)

Changes committed and pushed.

@sonarqubecloud

sonarqubecloud Bot commented Jul 4, 2026

Copy link
Copy Markdown

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) July 4, 2026 20:06
@don-petry
don-petry merged commit 8118d13 into main Jul 4, 2026
23 checks passed
@don-petry
don-petry deleted the fix/571-feature-ideation-inputs-context branch July 4, 2026 20:47
don-petry added a commit to petry-projects/.github-private that referenced this pull request Jul 4, 2026
…1113)

* fix(feature-ideation): route caller inputs through a prep job (#571)

This repo's feature-ideation caller carried the same #571 defect fixed in the
central template (petry-projects/.github#615): the `ideate` job's reusable
`with:` referenced `${{ inputs.* }}`, which is evaluated at workflow setup
regardless of the job `if:` and so fails the whole run (zero jobs) on the
`discussion: created` trigger — the exact path that auto-enhances new Ideas.

Resolve dispatch inputs in a gated `prep` job and pass them to `ideate` via
`needs.prep.outputs.*` (booleans via fromJSON). The `feature-ideation/next`
channel pin is unchanged. As the `next` ring this dogfoods the fix ahead of the
fleet rollout tracked in petry-projects/.github#614.

Refs: petry-projects/.github#571, petry-projects/.github#614

* test(feature-ideation): assert prep-routed inputs, add #571 guard

The compliance test encoded the pre-#571 contract — it required the reusable
`with:` to source target_discussion/enhance_backlog from `${{ inputs.* }}`, the
exact pattern that fails at workflow setup on the discussion trigger. Update the
assertions to the prep-routed shape (needs.prep.outputs.*, booleans via fromJSON)
and add a guard that no reusable `with:` value references the `inputs` context.

Refs: petry-projects/.github#571

---------

Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com>
don-petry added a commit to petry-projects/.github-private that referenced this pull request Aug 2, 2026
…1113)

* fix(feature-ideation): route caller inputs through a prep job (#571)

This repo's feature-ideation caller carried the same #571 defect fixed in the
central template (petry-projects/.github#615): the `ideate` job's reusable
`with:` referenced `${{ inputs.* }}`, which is evaluated at workflow setup
regardless of the job `if:` and so fails the whole run (zero jobs) on the
`discussion: created` trigger — the exact path that auto-enhances new Ideas.

Resolve dispatch inputs in a gated `prep` job and pass them to `ideate` via
`needs.prep.outputs.*` (booleans via fromJSON). The `feature-ideation/next`
channel pin is unchanged. As the `next` ring this dogfoods the fix ahead of the
fleet rollout tracked in petry-projects/.github#614.

Refs: petry-projects/.github#571, petry-projects/.github#614

* test(feature-ideation): assert prep-routed inputs, add #571 guard

The compliance test encoded the pre-#571 contract — it required the reusable
`with:` to source target_discussion/enhance_backlog from `${{ inputs.* }}`, the
exact pattern that fails at workflow setup on the discussion trigger. Update the
assertions to the prep-routed shape (needs.prep.outputs.*, booleans via fromJSON)
and add a guard that no reusable `with:` value references the `inputs` context.

Refs: petry-projects/.github#571

---------

Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com>
don-petry added a commit to petry-projects/.github-private that referenced this pull request Aug 3, 2026
…1113)

* fix(feature-ideation): route caller inputs through a prep job (#571)

This repo's feature-ideation caller carried the same #571 defect fixed in the
central template (petry-projects/.github#615): the `ideate` job's reusable
`with:` referenced `${{ inputs.* }}`, which is evaluated at workflow setup
regardless of the job `if:` and so fails the whole run (zero jobs) on the
`discussion: created` trigger — the exact path that auto-enhances new Ideas.

Resolve dispatch inputs in a gated `prep` job and pass them to `ideate` via
`needs.prep.outputs.*` (booleans via fromJSON). The `feature-ideation/next`
channel pin is unchanged. As the `next` ring this dogfoods the fix ahead of the
fleet rollout tracked in petry-projects/.github#614.

Refs: petry-projects/.github#571, petry-projects/.github#614

* test(feature-ideation): assert prep-routed inputs, add #571 guard

The compliance test encoded the pre-#571 contract — it required the reusable
`with:` to source target_discussion/enhance_backlog from `${{ inputs.* }}`, the
exact pattern that fails at workflow setup on the discussion trigger. Update the
assertions to the prep-routed shape (needs.prep.outputs.*, booleans via fromJSON)
and add a guard that no reusable `with:` value references the `inputs` context.

Refs: petry-projects/.github#571

---------

Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com>
don-petry added a commit to petry-projects/.github-private that referenced this pull request Aug 3, 2026
…1113)

* fix(feature-ideation): route caller inputs through a prep job (#571)

This repo's feature-ideation caller carried the same #571 defect fixed in the
central template (petry-projects/.github#615): the `ideate` job's reusable
`with:` referenced `${{ inputs.* }}`, which is evaluated at workflow setup
regardless of the job `if:` and so fails the whole run (zero jobs) on the
`discussion: created` trigger — the exact path that auto-enhances new Ideas.

Resolve dispatch inputs in a gated `prep` job and pass them to `ideate` via
`needs.prep.outputs.*` (booleans via fromJSON). The `feature-ideation/next`
channel pin is unchanged. As the `next` ring this dogfoods the fix ahead of the
fleet rollout tracked in petry-projects/.github#614.

Refs: petry-projects/.github#571, petry-projects/.github#614

* test(feature-ideation): assert prep-routed inputs, add #571 guard

The compliance test encoded the pre-#571 contract — it required the reusable
`with:` to source target_discussion/enhance_backlog from `${{ inputs.* }}`, the
exact pattern that fails at workflow setup on the discussion trigger. Update the
assertions to the prep-routed shape (needs.prep.outputs.*, booleans via fromJSON)
and add a guard that no reusable `with:` value references the `inputs` context.

Refs: petry-projects/.github#571

---------

Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature-ideation: discussion-triggered run fails at workflow setup (zero jobs) — discussion→dispatch bridge

3 participants