Skip to content

fix: /release skill changes based on latest release - #994

Open
bennyz wants to merge 1 commit into
jumpstarter-dev:mainfrom
bennyz:worktree-agent-a4acb134beb3ccc48
Open

fix: /release skill changes based on latest release#994
bennyz wants to merge 1 commit into
jumpstarter-dev:mainfrom
bennyz:worktree-agent-a4acb134beb3ccc48

Conversation

@bennyz

@bennyz bennyz commented Aug 10, 2026

Copy link
Copy Markdown
Member

Address issues like user assumption, branching and more

Address issues like user assumption, branching and more

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
@bennyz
bennyz requested a review from mangelajo August 10, 2026 09:29
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The release skill detects the authenticated GitHub user. Protected version bumps use fork pull requests and merge queues. Bundle generation validates the checkout. Community-operator contributions create required forks and use the detected user.

Changes

Release workflow updates

Layer / File(s) Summary
Authenticated user detection
.claude/skills/release/SKILL.md
The workflow detects GITHUB_USER with gh api user and reuses it in release prompts.
Protected release-branch version bump
.claude/skills/release/SKILL.md
Version bumps use a temporary branch, a fork, a pull request, and the merge queue. The local release branch resets to the merged remote state before tagging.
Bundle checkout validation
.claude/skills/release/SKILL.md
Bundle generation verifies the expected release branch and operator version, then corrects the checkout when needed.
Community-operator fork and pull requests
.claude/skills/release/SKILL.md
The workflow verifies or creates both required forks. Contribution commands and pull requests use the detected GITHUB_USER.

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

Sequence Diagram(s)

sequenceDiagram
  participant ReleaseSkill
  participant UserFork
  participant GitHub
  participant ReleaseBranch
  ReleaseSkill->>UserFork: Push version-bump branch
  ReleaseSkill->>GitHub: Create pull request
  GitHub->>GitHub: Process merge queue
  ReleaseSkill->>ReleaseBranch: Reset to merged remote branch
  ReleaseSkill->>ReleaseBranch: Tag release
Loading

Possibly related PRs

Poem

A rabbit checks the username bright,
Then hops through forks by moonlit light.
A queued-up bump joins branch and tag,
Bundles stay on the proper track.
Community PRs now know the way—
Hoppy releases ship today! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies changes to the /release skill and relates to the updated release process.
Description check ✅ Passed The description identifies user assumptions and branching issues addressed by the release skill changes.
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 unit tests (beta)
  • Create PR with unit tests

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.

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

Actionable comments posted: 5

🤖 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 @.claude/skills/release/SKILL.md:
- Around line 362-373: Update the branch/version guard in the release
verification section to abort before make bundle when git checkout or git pull
fails, and re-check CURRENT_BRANCH and CURRENT_VERSION after a successful
correction. Continue only when the post-correction values match release-X.Y and
X.Y.Z; otherwise exit with an error.
- Around line 272-274: Update the release workflow around the git add step after
creating BUMP_BRANCH so it stages only the explicitly listed release files from
the earlier file list, rather than using git add -A. Alternatively, validate
that the worktree contains no unexpected changes and abort before staging when
it does; preserve the version-bump commit behavior for the intended files.
- Around line 289-297: Update the Phase 1.5 sync instructions around the git
reset sequence to check for a clean worktree and confirm local state before
executing the destructive reset. Abort when tracked changes or unreviewed local
commits are present, and only run reset --hard after the user explicitly
confirms or preserves that state.
- Around line 41-43: Validate that GITHUB_USER is non-empty immediately after
its assignment from the existing environment value or gh api user lookup. If
resolution fails or produces an empty value, stop the release workflow with a
clear error before any later fork PR or make contribute steps reuse GITHUB_USER.
- Around line 276-285: Update the community-operator pre-checks and fork setup
in .claude/skills/release/SKILL.md at lines 276-285 and 399-406 to verify that
the authenticated GitHub account matches GITHUB_USER before running gh repo
view, gh repo fork, or using the configured fork remote; fail with a clear error
when they differ, preventing creation or use of a fork under the wrong account.
🪄 Autofix

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: CHILL

Plan: Pro Plus

Run ID: 5c20144e-4372-4364-a9ba-5fed2247ad3e

📥 Commits

Reviewing files that changed from the base of the PR and between c18ac85 and 445fb3e.

📒 Files selected for processing (1)
  • .claude/skills/release/SKILL.md

Comment on lines 41 to +43
```bash
GITHUB_USER="${GITHUB_USER:-$(gh api user -q .login)}"
echo "GitHub user: $GITHUB_USER"

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.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Validate GITHUB_USER before reuse.

If gh api user -q .login fails, the assignment leaves GITHUB_USER empty. Later blocks still use it for fork PRs and make contribute; require a non-empty value before the workflow proceeds.

🧰 Tools
🪛 SkillSpector (2.5.1)

[error] 299: [YR1] YARA rule 'agent_skill_destructive_autonomous_actions': Autonomous destructive filesystem, shell history, or repository actions in AI agent skills [agent_skills]: YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Remediation: Remove the malware payload or compromised file entirely. Investigate how it entered the skill and audit all other artifacts for additional indicators of compromise.

(YARA Match (YR1))

🤖 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 @.claude/skills/release/SKILL.md around lines 41 - 43, Validate that
GITHUB_USER is non-empty immediately after its assignment from the existing
environment value or gh api user lookup. If resolution fails or produces an
empty value, stop the release workflow with a clear error before any later fork
PR or make contribute steps reuse GITHUB_USER.

Comment on lines +272 to +274
git checkout -b "$BUMP_BRANCH"
git add -A
git commit -m "chore: bump version to X.Y.Z"

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.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Stage only the intended release files.

Line [273] stages every tracked and untracked change in the checkout. This can include unrelated changes in the version-bump PR, despite the explicit file list in lines [264-266]. Use explicit paths or abort when unexpected worktree changes exist.

🧰 Tools
🪛 SkillSpector (2.5.1)

[error] 299: [YR1] YARA rule 'agent_skill_destructive_autonomous_actions': Autonomous destructive filesystem, shell history, or repository actions in AI agent skills [agent_skills]: YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Remediation: Remove the malware payload or compromised file entirely. Investigate how it entered the skill and audit all other artifacts for additional indicators of compromise.

(YARA Match (YR1))

🤖 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 @.claude/skills/release/SKILL.md around lines 272 - 274, Update the release
workflow around the git add step after creating BUMP_BRANCH so it stages only
the explicitly listed release files from the earlier file list, rather than
using git add -A. Alternatively, validate that the worktree contains no
unexpected changes and abort before staging when it does; preserve the
version-bump commit behavior for the intended files.

Comment on lines +276 to +285
# Push to fork — use the remote pointing to GITHUB_USER's fork.
# Common names: "upstream" or the user's username. Check with `git remote -v`.
git push <fork-remote> "$BUMP_BRANCH"

gh pr create \
--title "chore: bump version to X.Y.Z" \
--body "Version bump for release X.Y.Z" \
--head "${GITHUB_USER}:${BUMP_BRANCH}" \
--base release-X.Y
```

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.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== locate file =="
git ls-files | grep -F '.claude/skills/release/SKILL.md' || true

echo "== relevant sections =="
if [ -f .claude/skills/release/SKILL.md ]; then
  sed -n '240,310p' .claude/skills/release/SKILL.md | cat -n -v
  echo "----"
  sed -n '360,430p' .claude/skills/release/SKILL.md | cat -n -v
fi

echo "== search GITHUB_USER and fork remotes =="
rg -n "GITHUB_USER|github|fork|gh repo fork|pr create|contribute" .claude/skills/release/SKILL.md || true

echo "== git diff stat/name =="
git diff --stat || true
git diff -- .claude/skills/release/SKILL.md | sed -n '1,220p' || true

Repository: jumpstarter-dev/jumpstarter

Length of output: 8959


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== upstream and contribute files =="
git ls-files | rg '(^|/)Contribution|contribute|Makefile|SKILL\.md$' | sed -n '1,120p'

echo "== search contribute/user/remote/user =="
rg -n "contribute|GITHUB_USER|user=|remote.*user|git remotes|git remote -v|github_pr_create|community-operators|community-operators-prod|user" .claude/skills/release/SKILL.md Makefile Makefile.* controller .github 2>/dev/null || true

echo "== read likely contribute files =="
for f in $(git ls-files | rg 'Contribution|contribute|Makefile' | sed -n '1,30p'); do
  echo "---- $f ($(wc -l < "$f") lines) ----"
  sed -n '1,260p' "$f" | cat -n | sed -n '1,240p'
done

Repository: jumpstarter-dev/jumpstarter

Length of output: 50384


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== contribution scripts =="
f=controller/deploy/operator/contribute/update-contributions.sh
if [ -f "$f" ]; then
  wc -l "$f"
  sed -n '1,160p' "$f" | cat -n
fi

echo "== release script environment section =="
f=.claude/skills/release/SKILL.md
if [ -f "$f" ]; then
  sed -n '1,60p' "$f" | cat -n
fi

Repository: jumpstarter-dev/jumpstarter

Length of output: 9344


🌐 Web query:

GitHub CLI gh repo fork forked repo default branch owner authenticated user --clone=false

💡 Result:

The command gh repo fork with the --clone=false flag creates a fork of the specified repository on your authenticated GitHub account without cloning it locally to your machine [1][2]. By default, the gh repo fork command targets your authenticated user account as the owner of the new fork [1][2]. When running the command: - If you provide a repository argument (e.g., gh repo fork OWNER/REPO --clone=false), it creates a fork of that repository in your account [1][2]. - If you run it without an argument inside a git repository, it forks the current repository to your account [1][2]. The --default-branch-only flag, when included, ensures that only the default branch is copied over to the new fork instead of all branches [1][3][4]. Example command: gh repo fork OWNER/REPO --default-branch-only --clone=false This command is particularly useful for automation and scripting, as it skips interactive prompts that would otherwise appear when running the command without explicit flag settings [5][2].

Citations:


Fail before creating or using community-ops forks when GitHub accounts differ. The community operator flow sets up and reads user remotes from ${GITHUB_USER}, but the pre-check gh repo view "${GITHUB_USER}/..." / gh repo fork "$REPO" only checks the authenticated account state. If those differ, make contribute can create a fork under someone else and later push to ${GITHUB_USER}’s nonexistent fork.

🧰 Tools
🪛 SkillSpector (2.5.1)

[error] 299: [YR1] YARA rule 'agent_skill_destructive_autonomous_actions': Autonomous destructive filesystem, shell history, or repository actions in AI agent skills [agent_skills]: YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Remediation: Remove the malware payload or compromised file entirely. Investigate how it entered the skill and audit all other artifacts for additional indicators of compromise.

(YARA Match (YR1))

📍 Affects 1 file
  • .claude/skills/release/SKILL.md#L276-L285 (this comment)
  • .claude/skills/release/SKILL.md#L399-L406
🤖 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 @.claude/skills/release/SKILL.md around lines 276 - 285, Update the
community-operator pre-checks and fork setup in .claude/skills/release/SKILL.md
at lines 276-285 and 399-406 to verify that the authenticated GitHub account
matches GITHUB_USER before running gh repo view, gh repo fork, or using the
configured fork remote; fail with a clear error when they differ, preventing
creation or use of a fork under the wrong account.

Comment on lines +289 to +297
#### Phase 1.5: Sync local branch after merge

After the merge queue merges the PR, the local branch diverges from the merge commit. Sync before tagging:

```bash
git checkout release-X.Y
git fetch origin
git reset --hard origin/release-X.Y
```

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.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Guard the destructive reset.

Line [296] can discard tracked worktree changes and move the local branch away from local commits. Users can modify the checkout while the merge queue runs. Abort on a dirty worktree and preserve or confirm local state before running git reset --hard.

🧰 Tools
🪛 SkillSpector (2.5.1)

[error] 299: [YR1] YARA rule 'agent_skill_destructive_autonomous_actions': Autonomous destructive filesystem, shell history, or repository actions in AI agent skills [agent_skills]: YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Remediation: Remove the malware payload or compromised file entirely. Investigate how it entered the skill and audit all other artifacts for additional indicators of compromise.

(YARA Match (YR1))

🤖 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 @.claude/skills/release/SKILL.md around lines 289 - 297, Update the Phase 1.5
sync instructions around the git reset sequence to check for a clean worktree
and confirm local state before executing the destructive reset. Abort when
tracked changes or unreviewed local commits are present, and only run reset
--hard after the user explicitly confirms or preserves that state.

Source: Linters/SAST tools

Comment on lines +362 to +373
#### Verify correct branch state

During long CI waits, the user may have switched branches. Before generating the bundle, verify the branch and version are correct — `make bundle` silently uses whatever is checked out:

```bash
CURRENT_BRANCH=$(git branch --show-current)
CURRENT_VERSION=$(grep '^VERSION ?= ' controller/deploy/operator/Makefile | awk '{print $3}')
if [ "$CURRENT_BRANCH" != "release-X.Y" ] || [ "$CURRENT_VERSION" != "X.Y.Z" ]; then
echo "ERROR: Expected branch release-X.Y with VERSION=X.Y.Z"
echo "Got branch=$CURRENT_BRANCH VERSION=$CURRENT_VERSION"
git checkout release-X.Y && git pull origin release-X.Y
fi

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.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Abort when checkout correction fails.

If git checkout or git pull fails, the && chain stops but the workflow continues to make bundle. The bundle can then use the wrong branch or version, which is the failure this guard is intended to prevent. Exit on either failure and re-check the branch and version after correction.

🧰 Tools
🪛 SkillSpector (2.5.1)

[error] 299: [YR1] YARA rule 'agent_skill_destructive_autonomous_actions': Autonomous destructive filesystem, shell history, or repository actions in AI agent skills [agent_skills]: YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Remediation: Remove the malware payload or compromised file entirely. Investigate how it entered the skill and audit all other artifacts for additional indicators of compromise.

(YARA Match (YR1))

🤖 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 @.claude/skills/release/SKILL.md around lines 362 - 373, Update the
branch/version guard in the release verification section to abort before make
bundle when git checkout or git pull fails, and re-check CURRENT_BRANCH and
CURRENT_VERSION after a successful correction. Continue only when the
post-correction values match release-X.Y and X.Y.Z; otherwise exit with an
error.

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.

1 participant