fix(feature-ideation): route caller inputs through a prep job (#571) - #615
Conversation
…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>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
Next review available in: 33 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (8)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
prepjob and route reusablewith:values throughneeds.prep.outputs.*(casting booleans withfromJSON) to avoidinputs.*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 intofeature-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. |
Dev-Lead — fix-reviews (applied)Changes committed and pushed. |
|
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
…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>
…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>
…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>
…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>



Problem
feature-ideationruns 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'sif:. Theinputscontext is only populated forworkflow_dispatch/workflow_call, so theideatejob'swith:referencing${{ inputs.* }}fails the whole run on thediscussion: createdtrigger — even thoughideateis gatedif: github.event_name != 'discussion'. The proven-workinginitiative-planner.ymlavoids this by never referencinginputsin its reusablewith:on the discussion path.Fix
Resolve dispatch inputs in an ordinary
prepjob (its step expressions run at job time and are skipped ondiscussion) and pass them toideatevianeeds.prep.outputs.*— an always-valid context that defers thewith:evaluation to run time. On adiscussioneventideateis skipped, so its reusablewith:is never evaluated. Mirrors the initiative-planner redispatch bridge.Changes
standards/workflows/feature-ideation.yml(template) — add gatedprepjob;ideate.withnow readsneeds.prep.outputs.*(booleans cast viafromJSON), zeroinputsreferences. 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 inclaude-code-action). Reusable pin unchanged (3500ed2)..github/scripts/feature-ideation/lint-caller.sh— new guard: fails any job-level reusablewith:that references theinputscontext (github.event.inputs.*and step-level actionuses:are intentionally allowed). Wired intofeature-ideation-tests.yml(shellcheck + a lint step; addspyyaml).test/workflows/feature-ideation/lint-caller.bats+fixtures/callers/— 10 tests: clean passes,inputs-in-withfails, step-level/github.event.inputs/no-usesno 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 inlinetarget_discussiondescription).Validation
bats test/workflows/feature-ideation/— 126/126 (10 new + 116 existing)shellcheck -x lint-caller.shcleanactionlint -shellcheckclean on all three touched workflowsinputs-context references in any reusablewith:.github-private(thenextring) and confirm the discussion→dispatch bridge now produces a run with jobs (not a zero-job startup failure). A setup-time failure on thediscussionevent can only be exercised by a real event, not in PR CI.Fixes #571 · unblocks #614
🤖 Generated with Claude Code