Skip to content

fix(shell): don't delete user lines that only quote the init command - #3589

Merged
max-sixty merged 3 commits into
mainfrom
fix-uninstall-exec-context-adjacency
Jul 25, 2026
Merged

max-sixty merged 3 commits into
mainfrom
fix-uninstall-exec-context-adjacency

Conversation

@max-sixty

@max-sixty max-sixty commented Jul 25, 2026 •

Copy link
Copy Markdown
Owner

Two places asked whether text was worktrunk's by testing a blob for substrings, and deleted the user's data when it guessed wrong. Both are replaced by asking, per line, whether the line invokes the init command.

1. An rc line that only quotes the command

wt config shell uninstall asked two independent questions of the whole line — is there an exec keyword anywhere, and is there a <name> config shell init anywhere — with nothing tying them together. An exec keyword inside a quoted string satisfies the first, so this line in ~/.bashrc

alias setup='echo "run: wt config shell init fish | source"'

classified as worktrunk's integration (source appears; wt precedes the marker) and was removed.

One question replaces both: does the line invoke <name> config shell init?

pub fn is_shell_integration_line_for_uninstall_any_cmd(line: &str) -> bool {
    let code = line_code_portion(line);
    code.match_indices(INIT_MARKER)
        .any(|(pos, _)| command_invocation_precedes(code, pos))
}

The name at the marker has to start a command rather than sit inside one as an argument — at the start of the code, or after ; & | ( { `, optionally behind command or git.

The exec-keyword scan is gone from this path rather than kept alongside it. It read English words (eval, source, save) out of the whole line, matching them inside quoted strings as readily as in code, and it rejects nothing the positional rule doesn't: a line that merely mentions the command has it in argument position either way. Removing it changed no test outcome. That left is_execution_context with one caller always passing strict: true, so the parameter went too. Net on the classifier: 37 insertions, 42 deletions.

It survives for the cmd-specific detector, whose remaining job there is the PowerShell | Out-String check. That detector feeds messaging, not deletion — a false negative sends someone to reinstall over a working install — so its looser positional rule stays, with the asymmetry documented.

2. A whole file of the user's, deleted by install

Auditing for the same shape turned it up one file over, and worse. is_worktrunk_managed_content asked two whole-file substring questions, and cleanup_legacy_fish_conf_d deleted the entire file when both said yes:

content.contains(&format!("{cmd} config shell init")) && content.contains("| source")

So a user's own ~/.config/fish/conf.d/wt.fish —

# reminder: set up with wt config shell init fish
function wt_helpers
    cat ~/.aliases | source
end

— was deleted by wt config shell install, an operation that never offered to remove anything. A whole file rather than a line, during install rather than uninstall.

The cmd-agnostic twin sitting next to it already answers this correctly (generated header first, else every code line must be an integration line), so the substring version is deleted and the caller points at that one, which reclaims the plain name. Being cmd-agnostic costs nothing here: the path is already conf.d/{cmd}.fish, so the file name carries the binary name the content check was re-deriving.

3. The same shape elsewhere, audited

wt config shell uninstall was found by a bug report; the rest of the codebase was then swept for "classify text by looking for a word in a blob."

az failure classification (remote_ref/azure.rs) — removed. It scanned stderr for English and replaced it with a paraphrase: stderr.contains("login") alone meant "Azure CLI not authenticated", so an org, project, or repo whose name contains "login" was diagnosed as an auth failure, and bail! discarded the text that would have shown otherwise. az offers no structured error channel, but it does state the remedy itself, so its own words now reach the user through the cli_api_error fallback every unmatched failure already took. This costs the appended az extension add --name azure-devops command in the extension case — recorded in that test's doc comment so it isn't rediscovered as an oversight.

Host matching (remote_ref/mod.rs) — fixed, and here a structured answer does exist: dot-separated labels. contains("dev.azure.com") also accepted dev.azure.com.attacker.example; contains("github") took mygithubmirror.com for GitHub. github.com and self-hosted github.corp.example still resolve.

Deliberately left alone, since "fix the string matching" is not automatically the right call:

  • error.contains("not empty") in the worktree-removal hint. remaining_entries looks like the structured version of the same question but isn't — a permission-denied failure also leaves entries behind, and the hint is only right for ENOTEMPTY. Substituting it made the hint fire on the wrong case, which display_worktree_removal_failed_with_remaining_entries caught. The structured cause is flattened to a string upstream; recovering it means reworking the removal error path. Left as is, with the reasoning in a comment.
  • gitea.rs error classification. Same shape, but keyed on a parsed JSON field with status codes rather than raw prose, and its tests pin fabricated messages — so tightening it blind risks breaking a path that works against real tea output.

github.rs is the pattern the others should follow, and already does: it branches on the structured status first, uses text only to refine within it, and preserves the real message in the fallback.

Under-deleting vs over-deleting

A stale line the user can remove by hand is recoverable; a deleted one isn't. So the narrowing is guarded in the other direction too: test_any_cmd_detects_every_generated_config_line builds its assertion from Shell::config_line for every shell × wt/git-wt, and it passes on the old code as well — a real invariant, not an assertion fitted to the new behavior. The hand-written git wt, .exe, and absolute-path forms that existing tests cover (from #348, #885) all still match, as does the legacy conf.d content.

Two classifications change. A bare wt config shell init bash with nothing consuming its output now matches — a worktrunk invocation in an rc file whichever way it got there, and a broken one, since it prints to stdout. And eval "$($WORKTRUNK_BIN config shell init bash)" no longer matches, because a bare $VAR isn't a valid command name; the cmd-specific detector already rejected it, so the two now agree.

Shown, not just matched

Shell quoting is undecidable without running the line, so alias wtinit='eval "$(wt config shell init bash)"' still matches. Uninstall now prints every line it took — in the confirmation, and again after removal, so a --yes run sees them too:

✓ Removed shell extension & completions for bash @ ~/.bashrc
  if command -v wt >/dev/null 2>&1; then eval "$(command wt config shell init bash)"; fi
  eval "$(git wt config shell init bash)"
  source <(/usr/local/bin/wt config shell init bash)

That also collapsed prompt_for_uninstall_confirmation from ~28 duplicated lines into a call to the same preview the --dry-run path renders.

Testing

Both fixes were reproduced before being made, and both regression tests were run against the pre-fix code to confirm they fail: the rc-line case end-to-end against a real .bashrc under a fake $HOME, and the conf.d case via test_configure_shell_fish_preserves_user_conf_d_file, which watched install delete the file. Full gate green (4548 tests).

🤖 Generated with Claude Code

`wt config shell uninstall` asked two independent questions of the whole
line: is there an exec keyword anywhere, and is there a `<name> config
shell init` anywhere. An exec keyword inside a quoted string satisfies the
first, so a user's own

    alias setup='echo "run: wt config shell init fish | source"'

classified as worktrunk's integration and was deleted from their rc file.

Replace both with one question: does the line invoke
`<name> config shell init`? The name at the marker must start a command
rather than sit inside one as an argument. Every generated form still
matches (pinned by a test over `Shell::config_line`), as do the
hand-written `git wt` and absolute-path forms; a mention in an echo, an
alias body, or a comment does not.

The exec-keyword scan is gone from this path rather than kept alongside.
It read English words (`eval`, `source`, `save`) out of the whole line,
matching them inside quoted strings as readily as in code, and it rejects
nothing the positional rule doesn't: a line that merely mentions the
command has it in argument position either way. Dropping it leaves
`is_execution_context` with one caller and no need for its strict mode.
The one line whose classification changes is a bare
`wt config shell init bash`, which is a worktrunk invocation in an rc file.

Uninstall now lists the lines it matched, in the confirmation and again
after removal, so a `--yes` run also shows what it took.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

@worktrunk-bot worktrunk-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the classifier change closely since this is the wt config shell uninstall deletion path — is_shell_integration_line_for_uninstall_any_cmd in src/shell/detection.rs decides which rc-file lines uninstall_from_file (src/commands/configure_shell.rs) rewrites out with fs::write. Per this repo's data-loss-surface policy I'm leaving the merge call to you rather than auto-approving, but the logic reads as correct and a real safety improvement — no findings.

The change tightens toward under-deletion, which is the safe direction here, and I couldn't find a false-positive gap the old exec-keyword scan closed that the positional rule leaves open. The traced cases below all land the right way, and both invariants are pinned by tests (test_any_cmd_detects_every_generated_config_line, test_uninstall_preserves_user_lines_quoting_the_init_command).

Nice call keeping the residual undecidable case (alias wtinit='eval "$(wt config shell init bash)"' still matches) behind the print-every-line mitigation rather than trying to parse quoting — that's the right place to draw the line.

Cases I traced by hand

Preserved (name in argument position):

  • alias setup='echo "run: wt config shell init fish | source"' → word wt, preceding echo "run: ends in : → starts_command false ✓
  • echo "wt config shell init bash | source" → preceding echo " → trailing_word empty at " → false ✓

Removed (name in command position):

  • ... eval "$(command wt config shell init zsh)"; fi → command modifier ✓
  • eval "$(git wt config shell init bash)" → git modifier ✓
  • source <(/usr/local/bin/wt config shell init bash) → basename wt after <( ✓
  • bare wt config shell init bash at line start → starts_command("") → true ✓ (new match; a worktrunk invocation either way)

Rejected as intended:

  • eval "$($WORKTRUNK_BIN config shell init bash)" → $VAR fails validate_shell_command_name, so both detectors now agree ✓

Nushell/PowerShell generated forms round-trip through the {/( and & -call-operator branches of starts_command.

is_execution_context losing its strict param is a no-op for the cmd-specific detector — it always passed true, and the new single-branch body keeps the | Out-String requirement for the #885 messaging path.

The same defect the parent commit fixes, one file over and one step
worse: `is_worktrunk_managed_content` asked two whole-file substring
questions — is `<cmd> config shell init` anywhere in it, and is
`| source` anywhere in it — and `cleanup_legacy_fish_conf_d` deleted
the whole file when both said yes. So a user's own
`~/.config/fish/conf.d/wt.fish` holding

    # reminder: set up with wt config shell init fish
    function wt_helpers
        cat ~/.aliases | source
    end

was deleted by `wt config shell install`, an operation that never
offered to remove anything.

The cmd-agnostic twin next to it already answers this correctly — the
generated header first, else every code line must be an integration
line — so this deletes the substring version and points the caller at
that one, which reclaims the plain name. Being cmd-agnostic costs
nothing here: the path is already `conf.d/{cmd}.fish`, so the file name
carries the binary name the content check was re-deriving.

The unit test's negative cases already listed two files that carry both
substrings; they now also pin the install path end-to-end, verified by
running the new test against the old classifier and watching the file
disappear.

@worktrunk-bot worktrunk-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new commit extends the parent's classifier fix to the install-side twin: cleanup_legacy_fish_conf_d now recognizes worktrunk's legacy conf.d/{cmd}.fish through the same per-line detector as uninstall, replacing the two-substring contains("… config shell init") && contains("| source") test that would delete a user's own conf.d/wt.fish merely for mentioning the command and piping something unrelated to source. That's a real data-loss bug in an operation that never offered to remove anything, and the direction of the fix (share one definition of "an integration line", err toward under-deletion) is right. Good end-to-end test coverage on both the preserve case and the still-cleaned legacy case.

I traced the one regression risk — that the stricter "every code line must be an integration line" fallback could now strand a genuinely worktrunk-written legacy file. It doesn't: Shell::Fish.config_line is a single line (if type -q wt; command wt config shell init fish | source; end), so a legacy conf.d/{cmd}.fish is either one init line or a header-marked template, both of which still match. No findings.

Per this repo's data-loss-surface policy I'm not auto-approving — cleanup_legacy_fish_conf_d deletes a whole file via fs::remove_file, so the merge call stays with you.

`azure::fetch_pr_info` classified `az` failures by scanning stderr, then
replaced it with a paraphrase. `stderr.contains("login")` alone meant
"Azure CLI not authenticated", so an org, project, or repo whose name
contains "login" — or any Azure DevOps message mentioning a `loginId` —
was diagnosed as an auth failure, and `bail!` discarded the text that
would have shown otherwise. The words are also localized, which the
Structured Output policy already rules out relying on.

`az` has no error channel but prose on stderr, so there is nothing to
branch on structurally. It does write the remedy itself: "Please run 'az
login' to setup account." and "The command requires the azure-devops
extension." Those go to the user now, via the `cli_api_error` fallback
that every unmatched failure already took.

This costs one thing, kept in the test's doc comment so it isn't
rediscovered as an oversight: the extension case no longer appends the
exact `az extension add --name azure-devops` command. `az` names the
package but not the verb, and detecting that case needs the prose
matching this removes.

Host matching in the provider lookup gets the same treatment, where a
structured answer does exist — dot-separated labels. `contains("dev.azure.com")`
also accepted `dev.azure.com.attacker.example`, and `contains("github")`
took `mygithubmirror.com` for GitHub. `host_is_within` compares on a
label boundary and `host_has_label` matches a whole label, so `github.com`
and self-hosted `github.corp.example` still resolve; a host that only
spells the name inside a longer label names its provider explicitly
instead.

`error.contains("not empty")` in the worktree-removal hint is left as
is, now with a comment on why: `remaining_entries` looks like the
structured version of the same question but isn't, since a
permission-denied failure also leaves entries behind and the hint is
only right for ENOTEMPTY. Substituting it made the hint fire on the
permission-denied case, which
`display_worktree_removal_failed_with_remaining_entries` caught. The
structured cause is flattened to a string upstream; recovering it means
reworking the removal error path, which is the data-safety surface and
not this change.

@worktrunk-bot worktrunk-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the new refactor(remote-ref) commit — a distinct change from the shell-integration fix in the earlier commits. It reads correct, and it's a real improvement: dropping the az stderr-substring classification is exactly what the Structured Output policy calls for. az has no error channel but prose, so surfacing its own text (which already names the remedy — az login, the extension prompt) via the cli_api_error fallback is more reliable than a paraphrase keyed on a word that can appear in any org/project/repo name. cli_api_error_details prefers stderr and falls back to stdout, so the diagnostic line survives either way — the three snapshots confirm.

The host-matching swap is the other correctness win: host_is_within / host_has_label compare on label boundaries, so dev.azure.com.attacker.example and mygithubmirror.com no longer get taken for Azure DevOps / GitHub, while real subdomains and self-hosted forms still resolve. Both branches fall through to Unknown just as contains did, so there's no regression for legitimate hosts, and the new helpers are directly tested. No findings.

I'm not auto-approving: this PR still carries the shell-uninstall / cleanup_legacy_fish_conf_d deletion changes from the earlier commits, so per the repo's data-loss-surface policy the merge call stays with you.

@max-sixty
max-sixty merged commit b623d7f into main Jul 25, 2026
38 checks passed
@max-sixty
max-sixty deleted the fix-uninstall-exec-context-adjacency branch July 25, 2026 02:25
max-sixty added a commit that referenced this pull request Jul 25, 2026
Eleven commits landed on `main` while #3590 sat in CI, so they ship in
v0.69.2 with no changelog entry. Most are user-facing, and three are
data-loss fixes — exactly the drift the release skill's step-12 check
exists to catch. The tag is held until this lands.

Entries added, most-impactful first:

- **#3589** — two ways shell integration deleted user data on a
substring guess: an rc line that only *quotes* the init command, and a
user's own `conf.d/wt.fish` deleted outright by `install`'s legacy
cleanup. Plus forge detection moving from `host.contains("github")` to
label-wise matching.
- **#3585 + #3591** — truncate-in-place rc writes replaced by
write-temp-then-rename, then generalized to every user-file write.
- **#3578** — despite its `docs(step):` subject this carries three
behavior fixes, including `wt step push` succeeding mid-rebase and
moving the target branch onto a half-replayed history.
- **#3588 + #3587** — conflict markers can no longer reach a commit via
`wt step relocate --commit`, and `wt merge` refuses in its own name.
- **#3554** — OpenCode marker writes could land in another session's
worktree (thanks @4i3n6, who both reported and fixed it).

Not documented, per convention: #3574 (doc comments only, no runtime or
docs-site surface) and the three dependency bumps.

Also corrects `.github/CLAUDE.md`, which lists three required status
checks; there are four — `fast-checks` is required too, confirmed
against the branch-protection API.

Entries verified against the diffs by subagent. Two corrections came
back and are folded in: the #3589 entry originally promised "two of them
deleted" and described only one, and the #3578 entry mis-quoted the
success line as `✓ Pushed to main` when it carries a commit count.

> _This was written by Claude Code on behalf of max_
max-sixty added a commit that referenced this pull request Jul 25, 2026
…#3595)

Follow-ups from #3589's audit of brittle string matching, plus one live
bug the audit turned up.

## Gitea: the error path was unreachable

From tea's own `cmd/api.go`: `runApi` never inspects `resp.StatusCode` —
it copies the response body to stdout and returns nil. So `tea api`
**exits 0 for 404, 401, and 403**, which put the whole 404/401/403
classification behind an `if !output.status.success()` that those
responses never reach. A missing PR surfaced as `Failed to parse Gitea
API response for PR #N. This may indicate a Gitea API change.` The
fabricated `{"message":"403 Forbidden"}` fixtures hid this by mocking an
exit code tea does not produce.

The response *shape* now discriminates — the PR object, or Gitea's
`APIError` body whose message is surfaced verbatim. A non-zero exit
means `tea` itself failed (no login configured, transport error) and
keeps the existing `cli_api_error` path, which shows tea's own stderr.

## Azure: the install command, from JSON

#3589 dropped the appended `az extension add --name azure-devops`
because detecting the case needed prose matching. `az extension list
--output json` answers it structurally instead, and the whole `az repos`
command group ships in that extension — so it's a precondition of the
call, not one guess among many. The check runs only after a failure, so
the happy path pays nothing, and an `az` that can't answer counts as
installed: an unanswered check never becomes an accusation the user
would act on.

## Statusline detection

`is_statusline_configured` matched the substring `"wt "`, which `newt
status` also satisfies. That is not only a wrong diagnostic line —
`install-statusline` early-returns on it, so a foreign statusline made
install refuse. It now asks for the adjacent token pair `list
statusline`, which is the actual question and stays agnostic to `wt` /
`git-wt` / an absolute path.

## Worktree removal: comment only

The remaining `error.contains("not empty")` stays. There is no
structured form to recover: the text is `git worktree remove`'s own
stderr, so the failure never passes through a Rust `io::Error`, and
`remaining_entries` can't substitute because permission-denied also
leaves entries behind. The comment claiming an `io::ErrorKind` was lost
upstream is corrected.

## Testing

Every changed path is covered by an integration test with realistic
mocks: the four Gitea tests now mock exit 0 with `APIError` bodies
(`gitea_server_error` became `gitea_request_failed`, since a 5xx no
longer exits non-zero), the Azure tests mock `az extension list` on both
sides — present, and failing so the check comes back unanswered — and a
new `install_statusline_foreign_command` test asserts a foreign
statusline gets replaced rather than mistaken for worktrunk's.

> _This was written by Claude Code on behalf of max_

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Jul 25, 2026
…em (#3602)

`wt config shell install` decided whether the file at a legacy location
was worktrunk's by reading it — a substring test for the wrapper header,
falling back to "every code line looks like an integration line".
Anything that didn't match was left in place. Fish sources `conf.d` at
startup, so whatever `conf.d/{cmd}.fish` defines is already loaded by
the time fish would autoload the `functions/{cmd}.fish` the install just
wrote — the stale definition wins and the new wrapper may never load.

Ownership is now the path. `conf.d/{cmd}.fish` and the stranded nushell
`{cmd}.nu` candidates are paths worktrunk itself computes for the
command name being installed, so install takes them back whole without
reading them. Only that exact filename is touched: a neighbour under
another name is not worktrunk's, and each removal is still reported.

`wt config shell uninstall` still reads the header, because it takes no
`--cmd` and so genuinely doesn't know the name — it lists the
shell-owned directories and has to tell our `{cmd}.fish` from the user's
own files beside it. That is the one place ownership can't come from the
path, and it prompts and previews every file before removing it, which
install does neither of. `is_worktrunk_managed_content`'s docstring now
says so; `is_worktrunk_managed_nushell` existed only to gate the
install-time deletion and is gone.

Audited the rest of the surface for the same principle: the OpenCode
plugin (`~/.config/opencode/plugins/worktrunk.ts`) is already removed by
path with no inspection, the Claude plugin delegates to `claude plugin
uninstall`, Gemini installs through `gemini extensions install` and
leaves nothing of ours on disk, and fish is the only shell with a
separate completion file — which uninstall already covers. No other
gaps.

## Data safety

This deliberately widens what install deletes, so it's worth naming: two
tests asserted the old conservatism and now assert the new boundary —
`test_configure_shell_fish_reclaims_conf_d_path` (was
`..._preserves_user_conf_d_file`, from #3589) and
`test_nushell_install_reclaims_only_the_command_name` (was
`..._keeps_unmanaged_legacy_file`, from #2992). Both put a neighbour
file in the same directory to pin that only `{cmd}.{ext}` is taken. The
FAQ's "What can Worktrunk delete?" inventory is updated to describe
path-based ownership rather than the old content-marker rule.

> _This was written by Claude Code on behalf of max_

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
worktrunk 0.69.2

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>## Release Notes

### Improved

- **`wt remove` resolves every fsmonitor daemon in one `lsof` call**: The end-of-command sweep forked one `lsof` per `git fsmonitor--daemon` on the machine — with `core.fsmonitor` enabled globally that is one daemon per repo ever touched, routinely over a hundred — and the spawn cost compounds under load rather than staying fixed per call. All daemons now resolve in a single call: 108 spawns to 1 on a live machine. ([#3581](max-sixty/worktrunk#3581))

### Fixed

- **Shell integration no longer deletes user data that merely quotes the init command**: Three places decided whether text was worktrunk's by testing a blob for substrings, and two of them deleted on a wrong guess. `wt config shell uninstall` removed an rc line like `alias setup='echo "run: wt config shell init fish | source"'`; `wt config shell install`'s legacy cleanup deleted a user's own `~/.config/fish/conf.d/wt.fish` outright when the file happened to mention the init command. Both now require the command name in command position, not merely somewhere in the text. ([#3589](max-sixty/worktrunk#3589))

- **Forge detection matches host labels, not substrings**: `wt switch pr:<n>` and friends picked their provider with `host.contains("github")` / `contains("dev.azure.com")`, so a host that only spells the name inside a longer one — `github-mirror.example`, `dev.azure.com.attacker.example` — resolved as that provider. Matching is now label-wise, accepting the domain and its subdomains only; a self-hosted deployment this misses can still name its provider explicitly. ([#3589](max-sixty/worktrunk#3589))

- **A crash mid-write no longer empties the file being written**: `wt config shell uninstall` ended its rc rewrite by truncating in place, so a crash, a full disk, or a lost power cable between the truncate and the write left `~/.bashrc`, `~/.zshrc`, or a PowerShell profile empty or half-written, taking every line the user had ever added. Every user-file write now goes through one writer that writes a temp file beside the target and renames it into place. ([#3585](max-sixty/worktrunk#3585), [#3591](max-sixty/worktrunk#3591))

- **`wt step push` refuses to run out of a half-finished operation**: Mid-rebase the detached HEAD looks like a linear extension of the target, so `wt step push main` reported `✓ Pushed to main (1 commit)` while moving the target branch onto a half-replayed history and leaving the rebase open; it now runs the same operation gate as `wt step rebase` and `wt merge`. The same change fixes an annotated-tag target always reporting as needing a rebase — the tag object's SHA was compared against a `merge-base` that peels it — and makes both push paths refuse a target worktree whose directory is gone, rather than `--no-ff` moving the ref over the stale registration. ([#3578](max-sixty/worktrunk#3578))

- **Conflict markers can't reach a commit, and the refusal names the command you ran**: `wt step relocate --commit` staged with `git add -A` and committed straight through an unresolved merge, reaching neither gate added for the other staging commands; every staging path is now gated on an unmerged index. `wt merge` already refused, but in a sub-step's name. ([#3588](max-sixty/worktrunk#3588), [#3587](max-sixty/worktrunk#3587))

- **OpenCode activity markers land in the worktree they belong to**: The plugin issued its marker commands through the process-global Bun shell without scoping them, so each ran in whatever the process-wide cwd happened to be — under concurrent parallel-agent sessions, a marker write could land in another session's worktree. ([#3554](max-sixty/worktrunk#3554), thanks @4i3n6)

### Documentation

- **`wt step rebase` and `wt step push` render on the docs site**: the only two of twelve step operations whose help was terminal-only. Both bodies are rewritten, correcting (among others) the claim that conflicts abort immediately — nothing aborts; the worktree is left mid-rebase with git's markers — and a `wt step squash` note promising a backup ref unconditionally, when a clean-tree squash writes none. ([#3578](max-sixty/worktrunk#3578))

- **Troubleshooting no longer suggests disabling `core.fsmonitor` globally**: the guidance for a wedged daemon keeps to the targeted fixes — kill the daemon serving that worktree, or let the next `wt list` respawn the live ones. ([#3581](max-sixty/worktrunk#3581))

### Internal

- **The Windows zip ships the signed binary**: SignPath names its download after the GitHub artifact, so the signed zip landed beside the unsigned build as `worktrunk-x86_64-pc-windows-msvc.zip.zip` while the checksum step and the release upload both kept reading the original — so v0.69.1 shipped an unsigned binary under a green run and a completed signing request. (v0.69.0's unsigned binary was the separate upload bug fixed in [#3566](max-sixty/worktrunk#3566), where the request failed outright.) The signed file now replaces the built one only after it verifies, and a final step reads the shipped zip and reports any executable without a certificate. Signing remains non-blocking on a self-signed test certificate pending SignPath's OSS review, so Windows will not show a trusted publisher yet. ([#3590](max-sixty/worktrunk#3590))

## Install worktrunk 0.69.2

### Install prebuilt binaries via shell script

```sh
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/max-sixty/worktrunk/releases/download/v0.69.2/worktrunk-installer.sh | sh && wt config shell install
```

### Install prebuilt binaries via powershell script

```sh
powershell -ExecutionPolicy Bypass -c "irm https://github.com/max-sixty/worktrunk/releases/download/v0.69.2/worktrunk-installer.ps1 | iex"; git-wt config shell install
```

### Install prebuilt binaries via Homebrew

```sh
brew install worktrunk && wt config shell install
```

## Download worktrunk 0.69.2

|  File  | Platform | Checksum |
|--------|----------|----------|
| [worktrunk-aarch64-apple-darwin.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.69.2/worktrunk-aarch64-apple-darwin.tar.xz) | Apple Silicon macOS | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.69.2/worktrunk-aarch64-apple-darwin.tar.xz.sha256) |
| [worktrunk-x86_64-apple-darwin.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.69.2/worktrunk-x86_64-apple-darwin.tar.xz) | Intel macOS | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.69.2/worktrunk-x86_64-apple-darwin.tar.xz.sha256) |
| [worktrunk-x86_64-pc-windows-msvc.zip](https://github.com/max-sixty/worktrunk/releases/download/v0.69.2/worktrunk-x86_64-pc-windows-msvc.zip) | x64 Windows | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.69.2/worktrunk-x86_64-pc-windows-msvc.zip.sha256) |
| [worktrunk-aarch64-unknown-linux-musl.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.69.2/worktrunk-aarch64-unknown-linux-musl.tar.xz) | ARM64 MUSL Linux | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.69.2/worktrunk-aarch64-unknown-linux-musl.tar.xz.sha256) |
| [worktrunk-x86_64-unknown-linux-musl.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.69.2/worktrunk-x86_64-unknown-linux-musl.tar.xz) | x64 MUSL Linux | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.69.2/worktrunk-x86_64-unknown-linux-musl.tar.xz.sha256) |



### Install via Cargo

```sh
cargo install worktrunk && wt config shell install
```

### Install via Winget (Windows)

```sh
winget install max-sixty.worktrunk && git-wt config shell install
```

### Install via AUR (Arch Linux)

```sh
paru worktrunk-bin && wt config shell install
```
</pre>
  <p>View the full release notes at <a href="https://github.com/max-sixty/worktrunk/releases/tag/v0.69.2">https://github.com/max-sixty/worktrunk/releases/tag/v0.69.2</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!15133
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.

2 participants