Make finish wait and clean up by default#545
Merged
NagyVikt merged 1 commit intoMay 11, 2026
Merged
Conversation
Claude finish flows could strand work at PR-created because the lower-level branch finish script defaulted wait and cleanup off while higher-level gx finish defaulted them on. Align the script and template defaults, keep explicit --no-wait-for-merge and --no-cleanup escape hatches, and make post-merge base refresh visible without pulling dirty local base worktrees. Preserve forwarded active-cwd pruning context when branch finish calls gx worktree prune through the CLI wrapper. Constraint: Claude AGENTS flow requires gx branch finish --via-pr to wait for merge and cleanup by default. Constraint: Local base refresh must not overwrite dirty user worktrees. Rejected: Require every Claude prompt to include --wait-for-merge --cleanup | the script defaults still permit stranded PR-created lanes. Confidence: high. Scope-risk: moderate. Directive: Do not make PR finish pending-by-default again; use --no-wait-for-merge or --no-cleanup for explicit opt-out tests and workflows. Tested: bash -n scripts/agent-branch-finish.sh templates/scripts/agent-branch-finish.sh; node --test test/finish.test.js; git diff --check; openspec validate --specs. Not-tested: Live GitHub branch protection timing against a real protected remote.
NagyVikt
added a commit
that referenced
this pull request
May 11, 2026
…I parity guard (#548) The gx CLI invokes templates/scripts/ at runtime (src/context.js:247) while scripts/ is bundled as the legacy workflow shim path that gets scaffolded into consumer repos (context.js:181). Both copies were tracked separately and drifted on every PR that touched one but not the other -- PR #546 fixed scripts/ but not templates/ (dead at runtime until PR #547); PR #545 fixed templates/ but not scripts/ (silent 2-file drift). 10 of 12 paired files were already byte-identical; only the 2 we touched today drifted. This change replaces the 10 paired files under scripts/ with symlinks into ../templates/scripts/ (or ../../templates/scripts/openspec/ for the two openspec/ subfiles), making templates/scripts/ the single filesystem source of truth. Drift becomes impossible by construction when scripts/X is the same inode as templates/scripts/X. To catch the last failure mode -- someone explicitly removing a symlink and committing a regular file -- scripts/check-script-symlinks.sh runs in CI and fails the test job with an exact "rm + ln -s" recipe. Smoke-verified: bash/python invocations through the symlinks reach the canonical implementations (--no-transfer + --auto-resolve=full both parse correctly). OpenSpec change at openspec/changes/agent-claude-canonicalize-templates-scripts-2026-05-11-11-06/. Co-authored-by: NagyVikt <nagy.viktordp@gmail.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
NagyVikt
added a commit
that referenced
this pull request
May 11, 2026
`.github/workflows/release.yml` was correctly wired to publish on `release: types: [published]` but nothing triggered it. `@imdeadpool/guardex@7.0.42` on npm lagged behind ~7 merged fixes (PRs #545-551 in today's audit alone) because the manual bump step never happened. This change adds googleapis/release-please-action@v4 as a parallel workflow on `push: main`: - .github/workflows/release-please.yml -- runs the action with config + manifest files. - release-please-config.json -- `release-type: node`, package name, changelog sections (feat / fix / perf visible; chore / docs / refactor / test / build / ci / style hidden), `include-v-in-tag: true` so the tag format matches what release.yml expects. - .release-please-manifest.json -- pins current version 7.0.42 as baseline. Flow after this merges: release-please scans commits since v7.0.42, opens a "release X.Y.Z" PR that bumps package.json + writes CHANGELOG.md; merging that PR creates a GitHub release at the new tag; release.yml fires on release: published and ships to npm with provenance + cosign signing. OpenSpec notes at openspec/changes/agent-claude-add-release-please-automation-2026-05-11-12-30/notes.md Co-authored-by: NagyVikt <nagy.viktordp@gmail.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated by gx branch finish (PR flow).