Skip to content

Releases

v0.1.42

Choose a tag to compare

@eharriett0 eharriett0 released this 25 Nov 17:32
65cad69

A window wt can't read is now named, never shown as "(no changes)" or counted in a clear.

  • #254 (#253): unread windows. When git status fails in a window (a branch holding an object the repository lacks, an unreadable index, a directory git can't enter, a checkout git no longer recognises), wt used to show it as "(no changes)" and call every path clear of it.
    • Now wt status marks it UNREAD with the reason. wt check, both edit hooks, the per-turn context, pre-commit, pre-push and MCP name it, and every clear says it covers only the windows wt could read. Being unread never blocks.
    • JSON: unread and not_compared (uncommitted, some_uncommitted or all) on each window in wt status --json and MCP wt_status; unread_windows in wt check --json and MCP wt_check.
    • git status can also exit 0 yet skip paths it could not read (a directory it can't list or search), naming them only on stderr. wt reads that and names the window as partly unread, keeping what it read. A line counts only when it names a path in that window or one of its submodules.
    • An unread window that committed a change to a path is still graded where git can read its branch; its unreadable working copy makes that grade indeterminate, so HIGH, tagged working tree unread.
  • Which entries count:
    • Not unread: a worktree whose directory was deleted (prunable), and the bare repository of a bare-plus-worktrees layout.
    • Unread: a locked worktree on an unmounted volume, a directory git can't enter, and a worktree nested in a bare repository that lost its .git file.
    • Listed by its git directory: the main work tree of a --separate-git-dir repository, and a submodule's checkout with linked worktrees. From inside, wt reads it as itself; v0.1.41 graded a submodule checkout's own edit as a collision.
  • #255: a nested worktree without its own .git (deleted, or an unmounted volume's empty mount point, locked or not) was read as the work tree around it: "(no changes)" under the enclosing branch, or that window's edits taken as its own. It is now unread, under its own branch and claim, with nothing attributed to it.
  • Paths are read verbatim: a worktree path ending in a space was trimmed to one that doesn't exist, and its edits read clear.
  • Known: #256 (compare an unreachable window's commits from the repository) and #257 (a listed path that is not this repository's work tree, such as a symlinked .git).

v0.1.41

Choose a tag to compare

@eharriett0 eharriett0 released this 24 Nov 15:56
df5bb22

Section grading catches conflicts it read as clear for a window behind base and for a repo with no base branch; wt check and pre-push say when no base branch resolves.

  • #252 (#247): a window behind base is read in base's copy too. When base renamed, added or removed a heading after a window forked, that window's edits were read only under the headings it forked with, so editing the same lines as a current window could grade as another section (advisory) while git conflicts. Its edits are now also moved into base's line numbers, as the hunk grade moves them, and read under base's headings, in wt check, pre-push and both edit hooks.
    • A base copy, listing or diff that can't be read, or a base entry that is no regular file (a symlink, a directory), grades every section edited, never fewer.
  • No base branch (neither origin/<base> nor <base> resolves):
    • The section grade reads one diff from HEAD, so an uncommitted deletion of the section another window edits is HIGH, as git would conflict. A HEAD git can't read (a branch holding a missing object, a tree or garbage, or a bad symref) grades every section; a branch with no commits yet keeps the uncommitted-only reading.
    • Committed changes have no frame to compare in. wt check (text and --blocking, on stderr) and pre-push (once per push) say so instead of a bare clear, and wt check --json and MCP wt_check carry base_unresolved: true. Set base in .wt.conf to the branch windows start from.
  • Known: a window whose git status fails still reads as "(no changes)" and every path as clear of it (#253).

v0.1.40

Choose a tag to compare

@eharriett0 eharriett0 released this 18 Nov 20:50
70125f7

Collisions and holds name the live Claude session behind them; a silent session shows in the checkout it shares; wt clean fetches from the PR's own repository; section grading counts deletions.

  • #251 (#250): wt names the live Claude session to talk to. wt detects, Claude talks: where wt reports a collision, a hold or an announcement, it names the live Claude Code session behind it, read from claude agents --json, so the agent can reach it with SendMessage. wt sends nothing itself.
    • Collisions (wt check, the Claude and Codex edit hooks, the per-turn banner): notes.txt ← wb [active] (live: api-worker, idle; coordinate with SendMessage).
      • A session counts as working in the window of its latest record from a wt command in the last day, else of its latest presence mark. It is never matched by the directory Claude Code lists, which is where it was started.
      • A session that moved after its last wt command is named on that command's window until it runs another.
      • This session is never named.
    • Holds and announcements (wt inbox, the per-turn hook, merge-pr's hold gate, the status banner) name the live session that placed them. A live holder is to be asked, and is never offered wt all-clear.
    • other_sessions (status --json, doctor --json, MCP wt_status) carries name and status, and the "checkout shared" warning names a live session.
    • Annotation only. No claude, a failing or slow listing (2s bound), or WT_PEERS=0 leaves every output as it was. The listing runs at most once per command, only when there is something to name; with a collision shown it costs about one listing (~140 ms).
  • #248 (#197 item 2): presence marks. The per-turn hooks write a presence mark at most hourly per checkout, so a session that never runs a coordination command still shows in the "checkout shared" warning, other_sessions and wt doctor. A mark alone counts for 2h; wt prune-coord drops marks older than a day.
  • #246 (#197 item 2): block reservations count. A session whose only records are block-id reservations now shows as sharing the checkout too.
  • #249 (#243): wt clean fetches a merged PR's head from the PR's own repository: remotes on the PR's host first, then other remotes, then the PR's URL, then origin. A fetch timeout ends the walk, and a remote name is never read as an option.
  • #244 (#237): section grading counts deleted lines. Deleting the section another window edits, emptying a structured doc, or deleting it now grades as overlapping in wt check, pre-push and both edit hooks, as git would conflict.
  • #245 (#197 item 5): docs. Codex session identity needs Codex 0.148.0 or later; under an older Codex, start it with WT_SESSION set.

v0.1.39

Choose a tag to compare

@eharriett0 eharriett0 released this 17 Nov 18:27
b65e595

merge-pr reads the PR it merges, wherever it is; the coordination log's writers no longer hang on a stopped holder.

  • #228: wt merge-pr with a forwarded -R, or a PR given by its URL, reads that PR.
    • The bug. Only the checks gate, the base .wt.conf read and the deploy gate passed -R along. The precheck, the guard, the close check and the post-merge reads went to this clone's PR of the same number. A merged PR of that number here made merge-pr skip the merge as "already merged" and auto-clean this clone's lane.
    • The fix.
      • The PR is resolved once in its repository, and its URL is what every read and gh pr merge take.
      • Issues are read in that repository, and its squash settings on its own host.
      • A PR that can't be resolved is refused.
    • A PR URL is resolved the same way, read as gh reads one (…/pull/5.diff included).
    • Auto-clean touches a lane only when the PR's repository or its branch's is this clone's origin. With origin a fork and -R naming upstream, it fetches the PR's head from the PR's own repository.
    • Command hints carry the forwarded -R and never spell a PR #5, which a shell reads as a comment. That covers gh pr ready, gh pr checks --watch and wt merge-pr … --bypass.
  • #235: the coordination log's writers wait at most 30s, and say so.
    • The bug. A wt prune-coord stopped with Ctrl-Z, or a wt block-id stuck on a network mount, made every announce, ack and block-id wait silently for as long as it stayed that way.
    • The fix.
      • A writer says it is waiting after a second and gives up at 30s, with the file's path and how to find the holder (lsof <path>).
      • It says to resume the holder (fg, kill -CONT), never to kill it: a prune killed mid-rewrite leaves the log empty.
      • wt append's doc lock is bounded the same way.
    • A filesystem that can't lock at all (ENOTSUP, EOPNOTSUPP, ENOSYS: macOS NFS nolocks, some FUSE and SMB mounts) lets announce, ack, all-clear and block-id --written/--abandon write unlocked, with one warning. Before, they failed there.
    • A lock service that is down (NFS lockd unreachable: ENOLCK) is not that. Every write fails and merge-pr's hold gate refuses until it is back, since writing or reading unlocked then could lose a hold.
    • prune-coord prunes past a locked block ledger, lists the locked ones, and shares one 30s deadline across them.

v0.1.38

Choose a tag to compare

@eharriett0 eharriett0 released this 17 Nov 16:33
dadaed9

Data-loss fixes to the removal paths, locking for the coordination log, and section-aware edit hooks.

  • #230: auto-clean and wt clean delete only what they checked.
    • The bug. merge-pr's auto-clean usually runs inside the worktree it removes, so the branch delete ran in the removed directory and failed. The cd hint named that same directory. Making the delete work exposed guards the failure had been hiding.
    • The fix. The removal and the branch delete run from the main checkout (in a bare repository, the repository itself), and the cd hint names it.
    • Every remover now:
      • deletes the branch only at the tip it checked, in one step (update-ref -d <ref> <tip>), so a commit landing after the check is never deleted with it;
      • makes a relative path absolute from the cwd first;
      • keeps a case twin of the base (Main under core.ignorecase is main's loose ref).
    • wt clean:
      • A merged PR reaps a worktree only when the branch's tip is the PR's head or an ancestor of it. A commit made after the merge keeps the worktree, and clean says how many commits the PR lacks.
      • When the PR's head was never fetched here, it fetches refs/pull/<n>/head once.
      • It removes the cwd's worktree last.
    • release --clean:
      • It removes only a worktree still on the claim's branch.
      • It reads origin from the main checkout.
      • It deletes origin's placeholder with a lease on the tip it checked.
    • The no-prompt fetch has a deadline and stops its whole process group.
  • #229 and #234: the coordination log is locked for writes and reads.
    • wt announce, ack and every other write takes the log's lock, so a record written while wt prune-coord rewrites the log is never lost (#229).
    • Readers take a shared lock, so a read during the rewrite never sees an empty log. That empty read was how merge-pr's hold gate could let a merge through past a hold (#234).
    • A reader waits at most 5s for a stopped writer, then reads as before. The hold gate refuses instead, and says to resume the stopped process, not kill it.
  • #226: the edit hooks re-grade a structured doc by section.
    • An edit moving into another window's section warns (or denies under the block switch), and one moving out stops warning, as wt check grades it after the edit. Before, both hooks ignored sections.
    • A section HIGH whose heading the edit deletes stays a heads-up (#237 tracks the real fix in the grader).
  • #238: a relative worktree_root or active_work is read from the main checkout, so it names one directory from every window. A claim recorded relative before this is found by its branch.

v0.1.37

Choose a tag to compare

@eharriett0 eharriett0 released this 17 Nov 14:21
e282131

One safety fix to merge-pr's gates, session-owned block-id reservations, and grading polish.

  • #223: merge-pr's gate settings come from the base branch too, and the stricter applies.
    • The bug. merge-pr read merge_is_deploy, merge_is_deploy_paths, merge_min_checks, hold_max_age and coord_issue from the .wt.conf of the checkout it runs in. That is usually the PR's own worktree, so the branch being merged decided its own gate. A PR could turn the deploy gate off or shorten a hold, and a branch cut before the base added a deploy glob skipped the gate for a path that now deploys.
    • The fix. merge-pr now also reads the PR's base branch's .wt.conf from GitHub. When GitHub can't be read, it falls back to a fetched copy, but only when the PR's repository is origin; otherwise it fails closed.
    • Behavior changes:
      • WT_MERGE_IS_DEPLOY=0 and a shorter WT_HOLD_MAX_AGE no longer loosen what the base sets.
      • A base with no .wt.conf holds hold_max_age at the 24h default or longer.
      • When GitHub is unreachable, the deploy gate gates, saying the merge may auto-apply, and the checks gate refuses without --checks-ok.
      • A passthrough that merges nothing (--disable-auto, --help) reads no gate settings.
    • Also fixed. With -R, the deploy gate's file list and draft read now use that repository's PR. merge_is_deploy_paths = ! now fails closed.
  • #197 (items 1, 3, 4): block-id reservations are owned by session.
    • Another session in the same checkout can no longer mark or abandon yours; it is told whose it is.
    • Your own session's reservation from another worktree counts as yours.
    • A token-less reservation needs --not-mine to abandon.
    • A retried --written exits 0.
    • wt status --json and MCP wt_status carry session, other_sessions and sessions_unread.
  • #202: grading polish.
    • Dead code is gone.
    • The label no longer reads "just now ago".
    • A banner line for a file two OTHER windows contest now says their edits overlap each other.

v0.1.36

Choose a tag to compare

@eharriett0 eharriett0 released this 16 Nov 23:32
c51032e

One fix to merge-pr's deploy gate.

  • #221: a PR that renamed a file OUT of a merge_is_deploy_paths path (infra/x.yaml → docs/x.yaml, which deletes a deployed object) merged without the typed deploy confirm. gh pr diff --name-only, which the gate read, lists only the new path of a rename. The gate now reads the PR's file list from GitHub's REST API, where a renamed file counts under both its old and new paths. It gates whenever it cannot be sure of the whole list:
    • the list doesn't add up to the PR's file count, or reaches GitHub's 3,000-file cap;
    • a renamed file is listed without its old path;
    • only GraphQL answers and it shows a rename, since GraphQL never gives the old path.

v0.1.35

Choose a tag to compare

@eharriett0 eharriett0 released this 16 Nov 22:56
eb39fcc

Eleven merges since v0.1.34, from two passes over the open wt bugs. Each was adversarially reviewed, mutation-tested and smoke-tested end to end.

merge-pr

  • #179: merge-pr said verdict=ok while the PR's checks were still pending or had never started, and --admin bypasses GitHub's required checks too. It now reads the head commit's checks and what the base branch requires (branch protection and rulesets), refuses when they are not green (asks at a terminal), and pins the merge to the commit it read. --checks-ok merges anyway; --bypass and --admin don't.
  • #178: at the deploy gate, a GitHub Actions incident on githubstatus.com is now a warning. It never refuses.
  • #196: the close check now reads the squash SUBJECT too, and a merge that gh reported as failed after it had in fact merged (-- -d with the branch checked out) is verified and cleaned up like any other.
  • #217: with the account's REST quota used up, merge-pr called a 6-line diff EMPTY and pointed at --bypass, and every read said "gh is not available or not authenticated". It now says the rate limit is used up and when it lifts, and reads the diff, file list and PR state over GraphQL, which has its own quota. A diff it cannot read is refused as "could not be read", never as empty. wt doctor shows a rate-limited host as logged in.

Collision detection

  • #199: edits on adjacent lines (no unchanged line between them) graded low, but git's merge conflicts on them. Edits are now graded by git's own 3-way rule, aligned the way merge-ort aligns them.
  • #200, #204: a file with a non-ASCII name never collided (git quoted it), and a name with glob characters or a leading : matched the wrong files. Paths are now read NUL-separated and passed to git literally.
  • #201: wt check and the edit hooks now read a path argument the way the filesystem does. A relative path through a symlink, . at the top level, a path into another worktree and a name typed in another case all find the other window's edit. Both edit hooks name every window editing a file. Behaviour change: a wt check path outside every worktree of the repository (including one through an in-repo symlink to outside) is refused with exit 64 instead of reported clear.

Data safety

  • #177: wt discard <name> drops one deliberately throwaway worktree, and only drops unpushed commits with --drop-commits.
  • #208, #210: clean, merge-pr's auto-clean and release --clean deleted untracked files hidden by status.showUntrackedFiles=no, and edits hidden by --assume-unchanged, --skip-worktree or core.ignoreStat. Those now count as uncommitted work.
  • #198: wt new / wt claim could re-attach a stale or diverged same-named local branch. They now check it against origin first and never lose work on a rollback.

Coordination and auth

  • #211: records written before wt knew sessions read as every session's own, so wt holds offered all-clear for other sessions' holds. Only a session's own records are "yours" now, and releasing anything else asks first. wt prune-coord --legacy clears the old backlog.
  • #203: wt doctor tells an unreachable host from a dead token (gh 2.81+), and decides each host by its active account.

v0.1.34

Choose a tag to compare

@eharriett0 eharriett0 released this 09 Oct 13:38
v0.1.34
41124f8

Ten bug fixes from a pass over every open wt bug, three of them found along the way. Each one was adversarially reviewed, mutation-tested and smoke-tested end to end. Also ships five earlier merges that hadn't been released.

Data loss: merge-pr's auto-clean

  • #185 — merge-pr removed the PR's worktree and local branch whenever gh pr merge exited 0. But gh exits 0 without merging for --help, --auto, --disable-auto, a merge queue (no flags needed) and -R. Only a PR that reads MERGED afterwards is now verified and auto-cleaned; anything else keeps the lane.
  • #187 — even after a real squash merge, auto-clean ran git branch -D on a branch holding commits that were never pushed. The lane is now removed only when the local tip is the PR's merged head, or an ancestor of it. Otherwise it is kept, with a count of the commits that didn't ship.

Collision detection

  • #184 — a branch behind base was charged with every line base changed after it forked, giving false HIGHs that blocked pushes. Ranges are now the window's own edits in base line numbers, with git's 3-way conflict rule where a stale hunk touches a base change. The pre-edit hooks now re-grade the pending edit exactly.
  • #181 — a repo-root file collided with a same-named file in a subdirectory another window edits. A real path now matches exactly; only a wt check argument that names nothing is a fuzzy search. A committed move is listed under both its paths, and MCP wt_check paths are relative to the repo root.
  • #193 — when two windows shared a label, wt check and pre-push graded a conflict against the wrong window and could hide a HIGH.
  • #182 — the per-turn banner and wt status now grade overlaps the way wt check does: merged, dormant and closed windows are dropped, and HIGH means the pair blocks both ways. Contract change: status JSON overlaps[].windows omits suppressed windows, and --blocking can exit 0 where only suppressed windows were HIGH.

Coordination

  • #163 — two sessions in one checkout (two Claude Code sessions, Claude and a terminal, two Codex sessions) counted as one party, so one's hold never gated the other. Records now carry a session (WT_SESSION → CLAUDE_CODE_SESSION_ID → CODEX_SESSION_ID), and hold advice leads with wt ack. Note: /clear starts a new Claude session id, so a hold placed before /clear gates the session after it (the gate says so).

merge-pr, adopt, doctor

  • #180 — the close check judges the body that actually ships when one is forwarded (--body, --body-file, -F -), and wt's own --admin/--subject now go before the passthrough.
  • #167 — wt adopt <pr> checked out a stale same-named local branch instead of the PR head. It now checks the local branch against the PR head on origin, fast-forwards only when that's safe, and refuses a fork head that origin doesn't carry.
  • #183 — outside a repo, wt doctor now reads gh auth status per host instead of reporting "NOT authenticated" because one other host was unreachable.

Earlier, unreleased: #165 (negated/qualified close keywords gate the merge), #171 (PR lookup by tip commit; wt clean <name>...), #173 (gh auth check memoized per host), #176 (wt clean never lists a dirty worktree as removable).

v0.1.33

Choose a tag to compare

@eharriett0 eharriett0 released this 17 Sep 05:28
v0.1.33
69d33c6

Two wt coordination fixes.

  • #159 — wt release <issue> --clean left the pushed remote branch behind, so re-claiming the same issue pushed a fresh placeholder → non-fast-forward rejection + partial state. --clean now deletes the remote branch too — but only when it matches the local placeholder it proved abandoned (a diverged remote with real commits is left alone). A failed claim also rolls back (worktree + local branch + unassign) so a retry starts clean.
  • #160 (follow-up to #35) — a block-id reservation you decided not to write had no exit. New wt block-id <file> --abandon N, symmetric with --written: refuses a block that isn't yours, clears it from wt holds/the banner, and frees the id for reuse (keyed per-reservation so a later reservation of the freed id stays live). Plus a --pattern note that the default scan under-reports on decorated-heading logs.