Fix #76: the default branch always ships, regardless of CLAUDE.md designation - #126
Merged
Merged
Conversation
…ignation Two worktrees with different CLAUDE.md files returned different verdicts for the same commit: a worker on an integration line with a Ship branch designation reported master commits as NOT_SHIPPED. A commit is now considered shipped if it reached the designated ship branch OR the repo's default branch. The default branch is resolved independently of any local CLAUDE.md (via origin/HEAD, then gh), so the verdict is consistent regardless of which worktree runs the check. Also handles stale designations: if the named ship branch no longer exists but the commit is on the default branch, the script now reports SHIPPED instead of exiting 2. Mirrors verify-shipped.sh into .agent/scripts/, which had no copy. This is a self-contained fix that does not depend on PR #77 (the /dev-line merge referenced in #76's original filing) -- it makes the verdict correct regardless of which branch is designated as the ship branch, rather than requiring the designation itself to be updated. Reapplies the one real commit from PR #115, which carried this fix on a branch 24 commits behind master (CONFLICTING) with unrelated already-landed history.
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.
Closes #76
Supersedes #115, which carried this fix 24 commits behind master (CONFLICTING) with a pile of unrelated already-landed history. The one real commit is reapplied here cleanly, verbatim, on current master.
Why this doesn't need PR #77 first
Issue #76's original filing asked for a manual CLAUDE.md/.envrc cleanup that depends on PR #77 (the /dev-line merge) landing first. This fix takes a different, self-contained approach instead: verify-shipped.sh now treats a commit as shipped if it reached EITHER the designated ship branch OR the repo's default branch (resolved independently of any local CLAUDE.md). That makes the verdict correct regardless of which worktree runs the check and regardless of whether #77 ever lands -- it doesn't require updating any branch designation.
Verification