Skip to content

Phase 7: every error message names its fix - #22

Merged
loganthomas merged 1 commit into
devfrom
phase-7-error-messages
Oct 3, 2026
Merged

loganthomas merged 1 commit into
devfrom
phase-7-error-messages

Conversation

@loganthomas

Copy link
Copy Markdown
Owner

Audits all ~80 error sites. Most already ended with a next step; the ~15 that only stated the problem now name the fix:

Error Now ends with
branch already checked out (new, claim) `wt go <branch>` jumps there
invalid config value fix it in <repo wt.toml> or <global config.toml>
unknown config key remove it or fix its spelling
setup / refresh hook failed fix hooks.setup with `wt config --edit` (and hooks.refresh)
wt sync can't fast-forward the base `git log <up>..<base>` lists the local commits in the way; move them to a branch, then rerun (was "resolve it by hand")
wt sync fetch failed check `git remote -v` and your network, then rerun
not inside a git repository cd into one first
bare repository run wt from a clone with a working tree
wt release on an unclaimed slot `wt pool ls` shows the claimed slots
editor exited non-zero set $VISUAL or $EDITOR to a working editor
copy-list file unreadable fix the file, or drop it from copy in wt.toml
current tree unregistered `git worktree repair` re-registers it
unsupported shell wt supports zsh only: `wt shell-init zsh`
wt doctor found issues each fix is listed above

Fixes live at the source so chained messages don't repeat themselves: wt init's provisioning wrapper drops its own hooks hint now that the hook error carries it, and bare wt's --help pointer joins with a semicolon. Internal invariant errors (slot-path guards, unexpected git output) are left as they are. A new errors-name-fix test script pins one case per family; no existing tests changed.

Audited all error sites; the ~15 that stated a problem without a next
step now end with one. Hook failures carry their own fix, so init's
wrapper no longer repeats it, and the not-a-repo hint joins the
`wt --help` pointer with a semicolon instead of a second dash.
@loganthomas
loganthomas merged commit eb32cf5 into dev Oct 3, 2026
4 checks passed
@loganthomas
loganthomas deleted the phase-7-error-messages branch October 3, 2026 16:16
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