Skip to content

Make finish wait and clean up by default#545

Merged
NagyVikt merged 1 commit into
mainfrom
agent/codex/ensure-claude-finish-merges-and-pulls-ma-2026-05-11-10-00
May 11, 2026
Merged

Make finish wait and clean up by default#545
NagyVikt merged 1 commit into
mainfrom
agent/codex/ensure-claude-finish-merges-and-pulls-ma-2026-05-11-10-00

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Automated by gx branch finish (PR flow).

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 NagyVikt merged commit ab32d5b into main May 11, 2026
@NagyVikt NagyVikt deleted the agent/codex/ensure-claude-finish-merges-and-pulls-ma-2026-05-11-10-00 branch May 11, 2026 08:19
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>
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