Skip to content

feat: implement issue #371 — Compliance: stub-surface-drift-feature-ideation.yml-permissions - #398

Merged
don-petry merged 4 commits into
mainfrom
dev-lead/issue-371-20260721-2207
Aug 2, 2026
Merged

feat: implement issue #371 — Compliance: stub-surface-drift-feature-ideation.yml-permissions#398
don-petry merged 4 commits into
mainfrom
dev-lead/issue-371-20260721-2207

Conversation

@don-petry

@don-petry don-petry commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

User description

Closes #371

Implemented by dev-lead agent. Please review.


CodeAnt-AI Description

Fix feature ideation workflow startup and preserve dispatch options

What Changed

  • Feature ideation now starts successfully for discussion-created events instead of failing before any job runs
  • Workflow dispatch and scheduled runs continue to receive their target discussion, focus area, research depth, dry-run, and backlog enhancement settings
  • Discussion-triggered runs can use either the dedicated automation token or the existing workflow token

Impact

✅ Fewer failed discussion-triggered ideation runs
✅ Preserved workflow dispatch settings
✅ More reliable automated feature discussions

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Summary by CodeRabbit

  • Improvements
    • Improved reliability when launching feature ideation workflows.
    • Added support for alternate authentication configuration.
    • Workflow options now apply consistent defaults and correctly honor dry-run and backlog-enhancement settings.
    • Dispatch inputs are handled more consistently across workflow runs.

@don-petry
don-petry requested a review from a team as a code owner July 21, 2026 22:12
Copilot AI review requested due to automatic review settings July 21, 2026 22:12
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@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.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 50 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 18679300-e128-4790-8d6a-be32fd0c2d66

📥 Commits

Reviewing files that changed from the base of the PR and between a72aef2 and 80c6b74.

📒 Files selected for processing (1)
  • .github/workflows/feature-ideation.yml
📝 Walkthrough

Walkthrough

The workflow adds a prep job to resolve inputs and defaults. The ideate job consumes these outputs, converts boolean values, and invokes the reusable workflow. PAT lookup now supports a fallback secret.

Changes

Feature ideation workflow

Layer / File(s) Summary
Dispatch input preparation
.github/workflows/feature-ideation.yml
The workflow resolves dispatch inputs, applies defaults, exposes outputs, and selects the fallback PAT.
Reusable workflow input wiring
.github/workflows/feature-ideation.yml
The ideate job passes resolved inputs to the reusable workflow and converts boolean values with fromJSON.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested labels: standards-sync

Suggested reviewers: donpetry-bot

Sequence Diagram(s)

sequenceDiagram
  participant GitHubEvent as GitHub event
  participant prep as prep job
  participant ideate as ideate job
  participant ReusableWorkflow as reusable workflow
  GitHubEvent->>prep: Provide workflow_dispatch inputs
  prep->>prep: Apply defaults and expose outputs
  prep->>ideate: Provide resolved outputs
  ideate->>ReusableWorkflow: Pass resolved workflow parameters
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the feature-ideation workflow permissions compliance change for issue #371.
Linked Issues check ✅ Passed The workflow re-sync satisfies issue #371 by matching the canonical template's permissions surface.
Out of Scope Changes check ✅ Passed The PAT fallback and input-preparation changes align with the canonical workflow template, so no unrelated changes are evident.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev-lead/issue-371-20260721-2207

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 21, 2026 22:13
@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-07-21T23:13:29Z.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Synchronizes TalkTerm’s feature-ideation.yml caller stub with the org-standard template to resolve the compliance finding in #371 (permissions surface drift) and to incorporate upstream fixes for dispatch/input handling.

Changes:

  • Re-sync the feature-ideation.yml stub structure to match the central standard, including the standardized prep job output pattern used to avoid inputs.* evaluation failures.
  • Update redispatch PAT resolution to accept GH_PAT_DON_PETRY as a fallback to GH_PAT_WORKFLOWS.
  • Route reusable-workflow with: values through needs.prep.outputs.* (and cast booleans via fromJSON) to keep the reusable call graph valid on discussion events.

Comment thread .github/workflows/feature-ideation.yml Outdated
@donpetry-bot

donpetry-bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor
Superseded by automated re-review at b50572c15d5db607e1d52c06a3d13c056016ff11 — click to expand prior review.

Review — fix requested (cycle 1/3)

The automated review identified the following issues. Please address each one:

Findings to fix

Automated review — NEEDS HUMAN REVIEW

Risk: MEDIUM
Reviewed commit: fefc7d091b2ee453382b32459720646854a58102
Review mode: triage-approved (single reviewer)

Summary

Re-syncs the feature-ideation.yml caller stub with the canonical org template to fix compliance finding #371 (permissions surface drift). Verified the PR file is byte-identical to standards/workflows/feature-ideation.yml except the two permitted per-repo deviations (tier channel pin @feature-ideation/v1-ring1 and the customised project_context input). Substantively correct and CI is fully green, but one review thread remains unresolved, which blocks auto-approval.

Linked issue analysis

Issue #371 (compliance-audit): the stub's permissions: surface drifted from the canonical template and must be re-synced verbatim. Verified by diffing the PR head file against standards/workflows/feature-ideation.yml fetched from petry-projects/.github — the permissions: blocks (and the entire stub surface) now match exactly; only the documented per-repo customisation points differ. The finding is substantively addressed.

Findings

  1. Template sync verified. PR file at fefc7d0 is identical to the canonical template except: channel pin feature-ideation/v1-ring1 vs stable (permitted tier pin) and a filled-in project_context (documented required edit). The PAT fallback (GH_PAT_DON_PETRY || GH_PAT_WORKFLOWS) and the new prep input-resolution job are part of the canonical template, not repo-local additions.
  2. Blocking (process): unresolved review thread from copilot-pull-request-reviewer — the guard step's error message still names only GH_PAT_WORKFLOWS though either PAT now satisfies the check. The suggestion is valid but cannot be applied in this repo without reintroducing stub-surface drift (the guard text is part of the centrally-owned surface). Correct fix: update the canonical template in petry-projects/.github. Recommended action: reply to the thread noting upstream ownership, file/reference an upstream issue, resolve the thread — then this PR can be approved. Dev-lead already assessed review feedback as no-changes for this PR, consistent with this analysis.
  3. Informational (centrally owned): the prep job echoes dispatch inputs into $GITHUB_OUTPUT without newline sanitisation; a multiline focus_area could inject extra outputs. Only reachable by actors with dispatch (write) access and owned by the central template — worth an upstream note only, not a blocker here.
  4. Secret scan: run_secret_scanning MCP tool unavailable in this environment; the gitleaks CI check passed.

CI status

All required checks green: CodeQL (actions, python) ✓, Secret scan (gitleaks) ✓, AgentShield ✓, SonarCloud quality gate ✓ (0 new issues, 0 hotspots), CodeRabbit status ✓, dependency-audit ✓ (ecosystem jobs skipped, no manifests changed). Mergeable; merge state BLOCKED pending required review.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

Additional tasks

  1. Resolve all unresolved review thread comments from other reviewers
  2. Ensure all CI checks pass after your changes
  3. Rebase on the target branch if behind
  4. Do NOT modify files unrelated to the findings above

The review cascade will automatically re-review after new commits are pushed.

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-reviews (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) August 2, 2026 16:44
@codeant-ai

codeant-ai Bot commented Aug 2, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR a72aef2 Aug 02, 2026 · 16:44 16:44

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Aug 2, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/feature-ideation.yml:
- Around line 157-164: Update the workflow output serialization around the
focus_area output block to use GitHub Actions multiline delimiter syntax,
preserving embedded newlines in FOCUS_AREA safely. Keep the existing defaults
and serialization for TARGET_DISCUSSION, RESEARCH_DEPTH, DRY_RUN, and
ENHANCE_BACKLOG unchanged, then re-sync the generated caller workflow as
requested.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a6bb2fe5-5e46-40b6-ae56-98248d1a3290

📥 Commits

Reviewing files that changed from the base of the PR and between 6f8d8cf and a72aef2.

📒 Files selected for processing (1)
  • .github/workflows/feature-ideation.yml

Comment thread .github/workflows/feature-ideation.yml
@don-petry
don-petry disabled auto-merge August 2, 2026 16:51
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-reviews (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) August 2, 2026 16:52
@don-petry
don-petry disabled auto-merge August 2, 2026 16:56
@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) August 2, 2026 16:56
@donpetry-bot donpetry-bot added the needs-human-review Requires human review label Aug 2, 2026

@donpetry-bot donpetry-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.

Automated review — APPROVED ✓

Risk: LOW
Reviewed commit: b50572c15d5db607e1d52c06a3d13c056016ff11
Cascade: triage → audit (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5)

Summary

The deep review's HIGH-risk premise is refuted: the canonical org standard (petry-projects/.github/standards/workflows/feature-ideation.yml, lines 110/118) already carries GH_PAT_DON_PETRY || GH_PAT_WORKFLOWS verbatim, so this PR is a faithful re-sync of the thin caller stub, not stub auth drift. The permissions surface (root permissions: {}, redispatch/prep permissions: {}, ideate's least-privilege block) now matches the standard exactly, resolving compliance issue #371, and the only deviations from the template are explicitly permitted (project_context, tier channel pin v1-ring1) or strictly safer (random-delimiter heredoc for focus_area, preventing GITHUB_OUTPUT line injection that the standard's plain echo permits). No expression injection (all event data is env-bound), no new secret exposure, gitleaks/CodeQL-actions/AgentShield all green — approving with an org-level advisory that the personal-PAT pattern should be replaced centrally with a GitHub App or machine account.

Findings

  • MINOR: Advisory (org-level, not PR-blocking): the canonical standard's GH_PAT_DON_PETRY || GH_PAT_WORKFLOWS pattern binds org automation to a named individual's PAT (rotation/offboarding/bus-factor risk, broad-scope credential, misattributed automation). This PR merely mirrors the standard — the correct remediation is a PR against petry-projects/.github replacing the personal PAT with a GitHub App installation token or dedicated machine-account PAT, which will then propagate to all stubs. Blocking this compliance re-sync would itself create stub drift.
  • INFO: Two benign deviations from the verbatim template remain: (1) the guard error message names GH_PAT_DON_PETRY while the standard's message names only GH_PAT_WORKFLOWS — the PR's message is actually more accurate than the standard's; (2) the focus_area heredoc with openssl rand -hex 8 delimiter is a security hardening over the standard's echo "focus_area=${FOCUS_AREA:-}", which is vulnerable to GITHUB_OUTPUT key injection via multi-line input. Neither touches the forbidden surfaces (triggers, permissions, uses:, secrets:). Recommend upstreaming the heredoc pattern to the central standard so future compliance audits don't flag it as drift.
  • INFO: Injection surface reviewed: all github.event.* values reach shell via env vars (no inline expression interpolation into run: blocks); target_discussion on the redispatch path is a numeric discussion.number; free-form dispatch inputs (target_discussion, focus_area) are only settable by actors with write access, who already control all inputs directly — a multi-line value injected into prep's plain-echo outputs yields no privilege beyond what the actor already has, and prep runs with permissions: {}. fromJSON casts on dry_run/enhance_backlog operate on GitHub-validated typed boolean inputs.
  • INFO: PR is MERGEABLE but mergeStateStatus=BEHIND main; all required checks green at head b50572c (gitleaks, CodeQL actions analysis, SonarCloud, AgentShield, CodeRabbit). Rebase/update before merge per normal flow.

Reviewed by the PR-review cascade (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5). Reply if you need a human review.

@donpetry-bot donpetry-bot removed the needs-human-review Requires human review label Aug 2, 2026
@sonarqubecloud

sonarqubecloud Bot commented Aug 2, 2026

Copy link
Copy Markdown

@don-petry
don-petry merged commit e9d0d9b into main Aug 2, 2026
20 checks passed
@don-petry
don-petry deleted the dev-lead/issue-371-20260721-2207 branch August 2, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compliance: stub-surface-drift-feature-ideation.yml-permissions

3 participants