Skip to content

feat(#515): teach cut-release.sh about idea-enhancer (cross-repo) - #1167

Merged
don-petry merged 1 commit into
mainfrom
fix-515-cut-release-idea-enhancer
Jul 11, 2026
Merged

don-petry merged 1 commit into
mainfrom
fix-515-cut-release-idea-enhancer

Conversation

@don-petry

@don-petry don-petry commented Jul 11, 2026 •

Copy link
Copy Markdown
Collaborator

PR-A of #515. idea-enhancer's reusable is hosted cross-repo in petry-projects/.github but wasn't in cross_repo_agent, so cut-release.sh idea-enhancer … was rejected — blocking the initial v1.0.0 cut (the template already pins @idea-enhancer/stable, which doesn't exist yet). Adds it to cross_repo_agent + the usage/error agent lists. Dry-run resolves idea-enhancer/v1.0.0 + stable against .github. Tests 48/48.

Next: cut v1.0.0 + channels → register in canary-rings.json.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added support for the idea-enhancer cross-repository release agent.
  • Bug Fixes

    • Improved release handling and validation for tags associated with idea-enhancer.
  • Tests

    • Added coverage confirming the agent is recognized and correctly resolved to its repository.

PR-A of onboarding idea-enhancer (#515). Its reusable is hosted cross-repo in
petry-projects/.github but `cross_repo_agent` didn't list it, so
`cut-release.sh idea-enhancer …` was rejected — blocking the initial v1.0.0 cut
(the template stub already pins @idea-enhancer/stable, a tag that doesn't exist yet).

Adds idea-enhancer to `cross_repo_agent` (→ `agent_host_repo` = petry-projects/.github)
plus the header/usage + error-string agent lists. Dry-run now resolves
idea-enhancer/v1.0.0 + idea-enhancer/stable against .github.

Tests: +valid_agent accepts + agent_host_repo cross-repo resolution. 48/48.

Next: cut v1.0.0 + channels → register in canary-rings.json. Refs #515.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@don-petry
don-petry requested a review from a team as a code owner July 11, 2026 04:06
Copilot AI review requested due to automatic review settings July 11, 2026 04:06
@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 11, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The release script now accepts idea-enhancer as a cross-repository agent, resolves its reusable from petry-projects/.github, updates supported-agent messaging, and adds tests for validation and host repository resolution.

Changes

idea-enhancer agent support

Layer / File(s) Summary
Register idea-enhancer in release handling
scripts/cut-release.sh
Adds idea-enhancer to supported-agent help and error messaging, and maps it through cross-repository agent handling.
Validate idea-enhancer behavior
tests/test_cut_release.bats
Tests that idea-enhancer is valid and resolves to petry-projects/.github.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 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 describes the main change: adding idea-enhancer support to cut-release.sh for cross-repo handling.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-515-cut-release-idea-enhancer

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
Collaborator Author

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

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) July 11, 2026 04:07
@sonarqubecloud

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request adds support for the idea-enhancer agent as a cross-repo agent in scripts/cut-release.sh and includes corresponding tests in tests/test_cut_release.bats. The reviewer feedback suggests adding the missing ci-failure-analyst agent to both the usage comments and the error message list of expected agents, as well as adding a test case to verify that idea-enhancer is correctly identified as a cross-repo agent.

Comment thread scripts/cut-release.sh

if ! valid_agent "$agent"; then
echo "::error::unknown agent '$agent' (expected: pr-review | dev-lead | feature-ideation | agent-shield | auto-rebase | dependency-audit | dependabot-automerge | dependabot-rebase | pr-review-mention)" >&2
echo "::error::unknown agent '$agent' (expected: pr-review | dev-lead | feature-ideation | idea-enhancer | agent-shield | auto-rebase | dependency-audit | dependabot-automerge | dependabot-rebase | pr-review-mention)" >&2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The ci-failure-analyst agent is supported by valid_agent but is missing from the list of expected agents in this error message. Let's include it to ensure the error message is accurate and matches the actual validation logic.

Suggested change
echo "::error::unknown agent '$agent' (expected: pr-review | dev-lead | feature-ideation | idea-enhancer | agent-shield | auto-rebase | dependency-audit | dependabot-automerge | dependabot-rebase | pr-review-mention)" >&2
echo "::error::unknown agent '$agent' (expected: pr-review | dev-lead | ci-failure-analyst | feature-ideation | idea-enhancer | agent-shield | auto-rebase | dependency-audit | dependabot-automerge | dependabot-rebase | pr-review-mention)" >&2

Comment thread scripts/cut-release.sh
Comment on lines 12 to +13
# <agent> this repo: pr-review | dev-lead
# cross-repo (reusable in petry-projects/.github): feature-ideation |
# cross-repo (reusable in petry-projects/.github): feature-ideation | idea-enhancer |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

low

The ci-failure-analyst agent is missing from the list of local agents in the usage comments. Let's add it to keep the documentation complete and accurate.

Suggested change
# <agent> this repo: pr-review | dev-lead
# cross-repo (reusable in petry-projects/.github): feature-ideation |
# cross-repo (reusable in petry-projects/.github): feature-ideation | idea-enhancer |
# <agent> this repo: pr-review | dev-lead | ci-failure-analyst
# cross-repo (reusable in petry-projects/.github): feature-ideation | idea-enhancer |

Comment on lines +77 to +81
@test "agent_host_repo: idea-enhancer resolves to petry-projects/.github (cross-repo)" {
run agent_host_repo "idea-enhancer"
[ "$status" -eq 0 ]
[ "$output" = "petry-projects/.github" ]
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

low

To ensure complete test coverage for the new idea-enhancer agent, let's also add a test verifying that cross_repo_agent correctly identifies it as a cross-repo agent.

@test "agent_host_repo: idea-enhancer resolves to petry-projects/.github (cross-repo)" {
  run agent_host_repo "idea-enhancer"
  [ "$status" -eq 0 ]
  [ "$output" = "petry-projects/.github" ]
}

@test "cross_repo_agent: idea-enhancer is cross-repo" {
  run cross_repo_agent "idea-enhancer"
  [ "$status" -eq 0 ]
}

@don-petry
don-petry disabled auto-merge July 11, 2026 04:08

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

Extends the release-tag tooling to support the new idea-enhancer agent whose reusable workflow is hosted cross-repo in petry-projects/.github, so cut-release.sh idea-enhancer ... can resolve/cut tags against the correct host repo.

Changes:

  • Add idea-enhancer to the cross-repo agent classification in cut-release.sh.
  • Update the CLI usage/help text and unknown-agent error message to include idea-enhancer.
  • Add Bats coverage to assert idea-enhancer is accepted and resolves to the cross-repo host.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
scripts/cut-release.sh Adds idea-enhancer to cross-repo agent routing and updates usage/error strings accordingly.
tests/test_cut_release.bats Adds tests for idea-enhancer agent validation and host-repo resolution.

Comment thread scripts/cut-release.sh
Comment on lines 12 to +13
# <agent> this repo: pr-review | dev-lead
# cross-repo (reusable in petry-projects/.github): feature-ideation |
# cross-repo (reusable in petry-projects/.github): feature-ideation | idea-enhancer |
Comment thread scripts/cut-release.sh

if ! valid_agent "$agent"; then
echo "::error::unknown agent '$agent' (expected: pr-review | dev-lead | feature-ideation | agent-shield | auto-rebase | dependency-audit | dependabot-automerge | dependabot-rebase | pr-review-mention)" >&2
echo "::error::unknown agent '$agent' (expected: pr-review | dev-lead | feature-ideation | idea-enhancer | agent-shield | auto-rebase | dependency-audit | dependabot-automerge | dependabot-rebase | pr-review-mention)" >&2
Comment on lines +70 to +82
# idea-enhancer's reusable is hosted cross-repo in petry-projects/.github, brought
# under the versioned-release model in #515.
@test "valid_agent: idea-enhancer is accepted" {
run valid_agent "idea-enhancer"
[ "$status" -eq 0 ]
}

@test "agent_host_repo: idea-enhancer resolves to petry-projects/.github (cross-repo)" {
run agent_host_repo "idea-enhancer"
[ "$status" -eq 0 ]
[ "$output" = "petry-projects/.github" ]
}

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
- ✅ **0 Security Hotspots**
- ✅ **0 Duplication** on new code
- ✅ Quality Gate: **PASSED**
**CI Status:** All critical checks are passing. No Tier 1 blockers exist.
**Review Status:** The `gemini-code-assist[bot]` review is informational (`COMMENTED`, not `CHANGES_REQUESTED`). It includes suggestions about adding `ci-failure-analyst` to usage comments, but that's outside the scope of this PR, which focuses specifically on adding `idea-enhancer` support. The PR's test cases for `idea-enhancer` are already included in the changes.
---
**Files changed:** 
- `scripts/cut-release.sh` — Added `idea-enhancer` to usage docs, cross-repo agent check, and error message
- `tests/test_cut_release.bats` — Added test cases for `idea-enhancer`
**No changes needed** — SonarCloud analysis is clean and the PR is ready.

@don-petry
don-petry enabled auto-merge (squash) July 11, 2026 04:08
@don-petry
don-petry merged commit 32537be into main Jul 11, 2026
38 of 46 checks passed
@don-petry
don-petry deleted the fix-515-cut-release-idea-enhancer branch July 11, 2026 04:08

@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 `@scripts/cut-release.sh`:
- Line 192: Update the unknown-agent error message in the release script to
include ci-failure-analyst in the expected agents list, keeping it consistent
with the agents accepted by valid_agent.
🪄 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 56d35735-7a89-4425-8f06-f72cbf3a1984

📥 Commits

Reviewing files that changed from the base of the PR and between d1c57a4 and 2979af8.

📒 Files selected for processing (2)
  • scripts/cut-release.sh
  • tests/test_cut_release.bats

Comment thread scripts/cut-release.sh

if ! valid_agent "$agent"; then
echo "::error::unknown agent '$agent' (expected: pr-review | dev-lead | feature-ideation | agent-shield | auto-rebase | dependency-audit | dependabot-automerge | dependabot-rebase | pr-review-mention)" >&2
echo "::error::unknown agent '$agent' (expected: pr-review | dev-lead | feature-ideation | idea-enhancer | agent-shield | auto-rebase | dependency-audit | dependabot-automerge | dependabot-rebase | pr-review-mention)" >&2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Error message omits ci-failure-analyst from the expected agents list.

valid_agent (Line 63) accepts ci-failure-analyst as a valid agent, but the error message on Line 192 does not list it. A user who misspells ci-failure-analyst would receive a misleading error message that doesn't include the correct agent name.

🛠️ Proposed fix
-    echo "::error::unknown agent '$agent' (expected: pr-review | dev-lead | feature-ideation | idea-enhancer | agent-shield | auto-rebase | dependency-audit | dependabot-automerge | dependabot-rebase | pr-review-mention)" >&2
+    echo "::error::unknown agent '$agent' (expected: pr-review | dev-lead | ci-failure-analyst | feature-ideation | idea-enhancer | agent-shield | auto-rebase | dependency-audit | dependabot-automerge | dependabot-rebase | pr-review-mention)" >&2
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
echo "::error::unknown agent '$agent' (expected: pr-review | dev-lead | feature-ideation | idea-enhancer | agent-shield | auto-rebase | dependency-audit | dependabot-automerge | dependabot-rebase | pr-review-mention)" >&2
echo "::error::unknown agent '$agent' (expected: pr-review | dev-lead | ci-failure-analyst | feature-ideation | idea-enhancer | agent-shield | auto-rebase | dependency-audit | dependabot-automerge | dependabot-rebase | pr-review-mention)" >&2
🤖 Prompt for 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.

In `@scripts/cut-release.sh` at line 192, Update the unknown-agent error message
in the release script to include ci-failure-analyst in the expected agents list,
keeping it consistent with the agents accepted by valid_agent.

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.

2 participants