Repository navigation
feat(#515): teach cut-release.sh about idea-enhancer (cross-repo) - #1167
Conversation
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>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
📝 WalkthroughWalkthroughThe release script now accepts Changesidea-enhancer agent support
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 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.
|
|
||
| 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 |
There was a problem hiding this comment.
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.
| 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 |
| # <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 | |
There was a problem hiding this comment.
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.
| # <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 | |
| @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" ] | ||
| } |
There was a problem hiding this comment.
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 ]
}
There was a problem hiding this comment.
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-enhancerto the cross-repo agent classification incut-release.sh. - Update the CLI usage/help text and unknown-agent error message to include
idea-enhancer. - Add Bats coverage to assert
idea-enhanceris 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. |
| # <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 | |
|
|
||
| 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 |
| # 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" ] | ||
| } | ||
|
|
Dev-Lead — fix-bot-comment (no-changes)Agent reasoning |
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
scripts/cut-release.shtests/test_cut_release.bats
|
|
||
| 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 |
There was a problem hiding this comment.
🎯 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.
| 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.



PR-A of #515. idea-enhancer's reusable is hosted cross-repo in
petry-projects/.githubbut wasn't incross_repo_agent, socut-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 tocross_repo_agent+ the usage/error agent lists. Dry-run resolvesidea-enhancer/v1.0.0+stableagainst.github. Tests 48/48.Next: cut v1.0.0 + channels → register in canary-rings.json.
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
idea-enhancercross-repository release agent.Bug Fixes
idea-enhancer.Tests