fix: clear five CLI UX/logistical papercuts from a feature audit#88
Merged
Conversation
Audited every command against a per-feature user-story spreadsheet (FEATURE_STORIES.csv) by driving the real binary in hermetic repos. Fixes the issues that surfaced: - worktree rm/add: a branch that lives only in the main worktree no longer leaks git's raw "is a main working tree" fatal or claims a dedicated worktree "already exists". LinkedOwnerOf/MainWorktree ignore the main worktree for add/rm. - create/rename: validate the branch name up front (git.CheckBranchName via check-ref-format) so an invalid name gives a one-line error instead of git's multi-line fatal + advice hints. - onto/modify/restack/sync: pass --quiet to the interactive rebase so a clean rebase stops leaking git's "Rebasing.../Successfully rebased" noise (conflict output is preserved). - sync --remote <missing>: error like submit does instead of silently reporting success as "skipped (no remote)"; a missing default origin still syncs locally. Adds Go regression tests for each; make ci green (coverage 86.5%).
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.
What
Audited every command against a per-feature user-story spreadsheet (
FEATURE_STORIES.csv, 122 stories) by driving the real binary in hermetic repos, then fixed every logistical/UX defect found.Fixes
worktree rm <branch>(branch only in main worktree)fatal: … is a main working tree"X is checked out in the main worktree, not a separate one; nothing to remove"worktree <current-branch>worktree already exists → <main repo path>(misleading)create/rename(invalid name)fatal: … not a valid branch name+ advice hints"X is not a valid branch name"(validated viagit.CheckBranchName)onto/modify/restack/sync(clean rebase)Rebasing (1/1)Successfully rebased…--quiet); conflict output preservedsync --remote <missing>remote "X" does not exist(consistent withsubmit); missing default origin still syncs locallyHow it was found
FEATURE_STORIES.csvtracks each feature's user story, expected behaviour, test result, fix, and re-test result.Tests
Adds Go regression tests for each fix (
cmd/regression_phase3_test.go, plusstack.LinkedOwnerOf/MainWorktreeandgit.CheckBranchNameunit tests).make cigreen — stdlib-only, lint 0 issues, race + e2e, coverage 86.5%.