Context
Follow-up (UX) from the mysql readiness-race investigation whose root cause is fixed in #90 / v0.9.29. Ranked #4 in that handover.
Problem
bough create is best-effort by default: --strict (internal/cli/create.go:60) is false unless passed, so once the worktree directory exists the command exits 0 even if every post_create DB hook failed. The only signal is a WARNING line (create.go:198):
[bough] WARNING: create finished with N problem(s); the worktree exists but its environment may be incomplete: ...
When create-database → migrate → seed-force all fail (e.g. the readiness race this repo just fixed, or any future post_create breakage), the worktree looks "created" and claude --worktree proceeds into it. The user only discovers the empty DB later, when the app can't find its tables — far from the actual failure.
Proposal (pick one / discuss)
- Make
post_create DB-hook failures non-zero by default (invert --strict, or add a narrower default-on gate for post_create specifically while keeping worktree-add best-effort).
- Keep exit 0 but make the failure summary much more prominent — e.g. a boxed/colored final summary that names each failed hook and the remediation (
bough remove --name X / re-run), instead of a single WARNING line that scrolls past.
- At minimum, document the
--strict flag prominently in the README/quickstart so CI and scripted bough create callers opt into it.
Notes
Context
Follow-up (UX) from the mysql readiness-race investigation whose root cause is fixed in #90 / v0.9.29. Ranked #4 in that handover.
Problem
bough createis best-effort by default:--strict(internal/cli/create.go:60) isfalseunless passed, so once the worktree directory exists the command exits 0 even if everypost_createDB hook failed. The only signal is a WARNING line (create.go:198):When
create-database→migrate→seed-forceall fail (e.g. the readiness race this repo just fixed, or any futurepost_createbreakage), the worktree looks "created" andclaude --worktreeproceeds into it. The user only discovers the empty DB later, when the app can't find its tables — far from the actual failure.Proposal (pick one / discuss)
post_createDB-hook failures non-zero by default (invert--strict, or add a narrower default-on gate for post_create specifically while keeping worktree-add best-effort).bough remove --name X/ re-run), instead of a single WARNING line that scrolls past.--strictflag prominently in the README/quickstart so CI and scriptedbough createcallers opt into it.Notes
--strictmechanism already exists (create.go:60, error at:209) — this issue is about the default and visibility, not a missing capability.