Skip to content

Validate branch mutation preflights - #24

Merged
Raithlin merged 1 commit into
masterfrom
validate-branch-dry-runs
Sep 29, 2026
Merged

Raithlin merged 1 commit into
masterfrom
validate-branch-dry-runs

Conversation

@Raithlin

Copy link
Copy Markdown
Owner

Summary

  • Validate branch create, rename, and delete before returning a dry-run plan or making a change.
  • Reject unsafe or unverifiable origin operations before local mutation.

Changes

  • Check branch names, start commits, local and origin ref collisions, worktree use, merge state, and provider safety.
  • Read origin refs from Git's effective push target and match Git's upstream rule for local deletion.
  • Update command help, capabilities, and the command guide; move the completed dry-run item out of the roadmap priorities.

Validation

  • GOCACHE=/tmp/gha-review-fix-gocache make check — passed lint, race tests, and the 95.0% coverage gate.
  • Focused branch and safety tests passed in internal/git, internal/branch, and internal/commands.
  • git diff --check passed.

Checklist

  • Tests cover the changed behavior.
  • Documentation and command help are updated where needed.
  • Structured output contracts remain backward-compatible, or the compatibility decision is documented.
  • Mutating workflows disclose dry-run and confirmation behavior. Existing branch mutations still execute by default; this PR adds preflight validation and does not change their confirmation model.

@Raithlin Raithlin self-assigned this Sep 29, 2026
@Raithlin
Raithlin merged commit 9ba831b into master Sep 29, 2026
2 checks passed
@Raithlin
Raithlin deleted the validate-branch-dry-runs branch September 29, 2026 19:57
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