Skip to content

fix: resolve project-specific no-cd config in picker path - #1484

Closed
worktrunk-bot wants to merge 38 commits into
switch-no-cd-configfrom
fix/picker-project-config-no-cd
Closed

worktrunk-bot wants to merge 38 commits into
switch-no-cd-configfrom
fix/picker-project-config-no-cd

Conversation

@worktrunk-bot

Copy link
Copy Markdown
Collaborator

Summary

  • Fix picker path (wt switch without arguments) to respect project-specific [switch] no-cd config
  • Pass the CLI flag pair into handle_select instead of pre-resolving it, so repo.config() (which includes project overrides) is used

The picker path was resolving config with resolved(None), missing project-specific overrides. Since handle_select already opens a repo via current_or_recover(), the fix passes the flag pair through and resolves change_dir inside where project-aware config is available.

Stacked on #1401.

Test plan

  • All existing no_cd integration tests pass (9/9)
  • Unit tests pass (458/458)
  • CI green across platforms

🤖 Generated with Claude Code

dependabot Bot and others added 30 commits March 8, 2026 21:41
Broken internal anchor links in docs (like the `#command-approval` →
`#security` fix in #1391) were only caught post-merge by `publish-docs`.
This adds pre-merge validation and extends the auto-fix safety net.

**Changes:**
- New `check-docs` CI job runs `zola build` on PRs when `docs/**` or
`src/cli/mod.rs` changes, catching broken anchors before merge
- `claude-ci-fix` now watches `publish-docs` failures in addition to
`ci`, so docs build failures on main get auto-fixed
- `publish-docs` path filter extended to include `src/cli/mod.rs` (CLI
help text is the source of truth for docs content)

> _This was written by Claude Code on behalf of @max-sixty_

Co-authored-by: Claude <[email protected]>
The JSON context section had two issues:

- It described hook_type and hook_name as extras "plus" the template
variables, but they're regular template variables already in the table.
Fixed to say "all template variables".
- It showed a floating Python script without the toml hook definition
that calls it. Added the toml entry so the reader sees how JSON stdin
gets wired up.

Also trimmed the example (removed bridge text and filename comment) to
keep it concise.

> _This was written by Claude Code on behalf of @max-sixty_

---------

Co-authored-by: Claude <[email protected]>
The `claude-ci-fix` workflow watches both `ci` and `publish-docs`, but
the prompt injection threat model table in `.github/CLAUDE.md` only
mentioned "Failed CI logs." Updated the injection surface and attacker
control columns to reflect that docs build failures also trigger the
workflow.

> _This was written by Claude Code on behalf of @max-sixty_

Co-authored-by: Claude <[email protected]>
## Summary

- Remove the fork filter (`head.repo.full_name == github.repository`)
from the `pull_request_review_comment` trigger in `claude-mention.yaml`
- The filter was added in cd16545 based on the assumption that secrets
aren't available for fork PRs — but that restriction only applies to
`pull_request` events, not `pull_request_review_comment` (which runs on
the base repo and has full secret access)
- The `issue_comment` path already works on fork PRs, confirming this

Supersedes #1420 (workaround that only posted a redirect notice).

## Test plan

- [ ] Verify CI passes (workflow-only change, no code)
- [ ] Test by posting an inline review comment mentioning
`@worktrunk-bot` on a fork PR

Closes #1419

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: worktrunk-bot <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
## Summary

- Add `github.event.issue.user.login != 'worktrunk-bot'` to the `issues`
trigger in `claude-mention.yaml`
- Document the new filter in `.github/CLAUDE.md` "Does not trigger" list

## Problem

The hourly review workflow creates issues (like #1424) that incidentally
mention `@worktrunk-bot` in body text — e.g., "comment contained
`@worktrunk-bot`". This triggers `claude-mention` on the `issues` event,
which then duplicates the hourly review's work, including creating a
second fix PR (#1425 vs #1426 for the same issue).

## Fix

Add an author check to skip issues created by `worktrunk-bot` itself,
consistent with the existing `comment.user.login != 'worktrunk-bot'`
loop-prevention checks on `issue_comment` and
`pull_request_review_comment` events.

Closes #1428

## Test plan

- [ ] Verify the `if:` condition syntax is valid (CI should pass)
- [ ] Confirm the next hourly review run doesn't trigger a
claude-mention run on its issues


🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: worktrunk-bot <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
## Summary

For iOS developers, this PR add a `post-remove` hook recipe to Tips &
Patterns that cleans up Xcode's DerivedData when removing a worktree.

## Context

Xcode's DerivedData directory names are hashed from the `.xcodeproj`
path, making them hard to match by name alone. Each DerivedData
directory contains an `info.plist` with a `WorkspacePath` field that
records the original project path. This recipe leverages that to find
and remove only the matching cache.

---------

Co-authored-by: Claude Opus 4.6 <[email protected]>
## Summary

- Rewrite the hourly reviewer's Step 7 ("Report findings") to prefer
creating PRs over issues
- PRs are now the default for any fixable problem (skill edits, workflow
tweaks, CLAUDE.md updates)
- Issues are only for problems too large or ambiguous to fix directly
- PR descriptions carry the full analysis (run ID, log excerpts, root
cause) — replacing what would have been the issue body
- Instructs the bot to keep findings cohesive (grouped PRs, not many
small patches)

This eliminates the duplication problem from #1425/#1426, where the
hourly reviewer created an issue and the triage bot raced to also fix
it. With the reviewer going straight to PR, there's no issue for triage
to pick up.

Requested by @max-sixty in
#1425 (comment).

## Test plan

- [ ] Workflow YAML passes validation (CI lint check)
- [ ] Next hourly run creates PRs instead of issues for small fixes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: worktrunk-bot <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: Maximilian Roos <[email protected]>
…tes (#1436)

GitHub renders newlines as `<br>` in PR/issue bodies and comments. The
triage-issue skill's PR body examples and issue comment templates were
hard-wrapped at 72–80 chars, causing awkward mid-sentence breaks when
rendered on GitHub. Unwrapped all templates to single-line paragraphs so
the browser reflows text naturally.

The corresponding fix for the personal `github-gitlab` skill (which
contains the main PR body example Claude pattern-matches from) was
applied separately in Mackup.

> _This was written by Claude Code on behalf of @max-sixty_

Co-authored-by: Claude <[email protected]>
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from
7.3.1 to 7.4.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/setup-uv/releases">astral-sh/setup-uv's
releases</a>.</em></p>
<blockquote>
<h2>v7.4.0 🌈 Add riscv64 architecture support to platform detection</h2>
<h2>Changes</h2>
<p>Thank you <a
href="https://github.com/luhenry"><code>@​luhenry</code></a> for adding
support for riscv64 arch</p>
<h2>🚀 Enhancements</h2>
<ul>
<li>Add riscv64 architecture support to platform detection <a
href="https://github.com/luhenry"><code>@​luhenry</code></a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/791">#791</a>)</li>
</ul>
<h2>🧰 Maintenance</h2>
<ul>
<li>Delete .github/workflows/dependabot-build.yml <a
href="https://github.com/eifinger"><code>@​eifinger</code></a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/789">#789</a>)</li>
<li>Harden Dependabot build workflow <a
href="https://github.com/eifinger"><code>@​eifinger</code></a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/788">#788</a>)</li>
<li>Fix: check PR author instead of event sender for Dependabot
detection <a
href="https://github.com/eifinger-bot"><code>@​eifinger-bot</code></a>
(<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/787">#787</a>)</li>
<li>chore: update known checksums for 0.10.9 @<a
href="https://github.com/apps/github-actions">github-actions[bot]</a>
(<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/783">#783</a>)</li>
<li>Add workflow to auto-build dist on Dependabot PRs <a
href="https://github.com/eifinger-bot"><code>@​eifinger-bot</code></a>
(<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/782">#782</a>)</li>
<li>chore: update known checksums for 0.10.8 @<a
href="https://github.com/apps/github-actions">github-actions[bot]</a>
(<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/779">#779</a>)</li>
<li>chore: update known checksums for 0.10.7 @<a
href="https://github.com/apps/github-actions">github-actions[bot]</a>
(<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/775">#775</a>)</li>
</ul>
<h2>⬆️ Dependency updates</h2>
<ul>
<li>chore(deps): bump versions <a
href="https://github.com/eifinger"><code>@​eifinger</code></a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/792">#792</a>)</li>
<li>Bump actions/setup-node from 6.2.0 to 6.3.0 @<a
href="https://github.com/apps/dependabot">dependabot[bot]</a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/790">#790</a>)</li>
<li>Bump eifinger/actionlint-action from 1.10.0 to 1.10.1 @<a
href="https://github.com/apps/dependabot">dependabot[bot]</a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/778">#778</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/6ee6290f1cbc4156c0bdd66691b2c144ef8df19a"><code>6ee6290</code></a>
chore(deps): bump versions (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/792">#792</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/9f332a133a60f39d23361d5262fa95793aa02590"><code>9f332a1</code></a>
Add riscv64 architecture support to platform detection (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/791">#791</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/0acf9708cec26cdcd463dd57db30a4eb5b123bda"><code>0acf970</code></a>
Bump actions/setup-node from 6.2.0 to 6.3.0 (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/790">#790</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/fe3617d6e9d89d9b2ddd353e1b3c5d20d20c896f"><code>fe3617d</code></a>
Delete .github/workflows/dependabot-build.yml (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/789">#789</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/2ff70eebccce84d92853b5f8343657ea7c422348"><code>2ff70ee</code></a>
Harden Dependabot build workflow (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/788">#788</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/5ba8a7e5d0edc496a1a4eba89351373601667d41"><code>5ba8a7e</code></a>
Fix: check PR author instead of event sender for Dependabot detection
(<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/787">#787</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/4bc8fabc0c006b3ae503c65dde93c57e8374d126"><code>4bc8fab</code></a>
chore: update known checksums for 0.10.9 (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/783">#783</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/950b623541cbabb9ec910e89a8956ed098ea34f5"><code>950b623</code></a>
Add workflow to auto-build dist on Dependabot PRs (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/782">#782</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/09ff6fe0ae18efdaf100c858b9088655de5b7258"><code>09ff6fe</code></a>
chore: update known checksums for 0.10.8 (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/779">#779</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/bd870193dd98cea382bc44a732c2e0d17379a16d"><code>bd87019</code></a>
Bump eifinger/actionlint-action from 1.10.0 to 1.10.1 (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/778">#778</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/setup-uv/compare/v7.3.1...v7.4.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=astral-sh/setup-uv&package-manager=github_actions&previous-version=7.3.1&new-version=7.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: worktrunk-bot <[email protected]>
Co-authored-by: Claude <[email protected]>
Bumps
[taiki-e/install-action](https://github.com/taiki-e/install-action) from
2.68.25 to 2.68.26.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/taiki-e/install-action/releases">taiki-e/install-action's
releases</a>.</em></p>
<blockquote>
<h2>2.68.26</h2>
<ul>
<li>
<p>Update <code>vacuum@latest</code> to 0.25.0.</p>
</li>
<li>
<p>Update <code>syft@latest</code> to 1.42.2.</p>
</li>
<li>
<p>Update <code>shfmt@latest</code> to 3.13.0.</p>
</li>
<li>
<p>Update <code>prek@latest</code> to 0.3.5.</p>
</li>
<li>
<p>Update <code>mise@latest</code> to 2026.3.7.</p>
</li>
<li>
<p>Update <code>cargo-shear@latest</code> to 1.10.0.</p>
</li>
<li>
<p>Update <code>cargo-nextest@latest</code> to 0.9.130.</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md">taiki-e/install-action's
changelog</a>.</em></p>
<blockquote>
<h2>[2.68.26] - 2026-03-10</h2>
<ul>
<li>
<p>Update <code>vacuum@latest</code> to 0.25.0.</p>
</li>
<li>
<p>Update <code>syft@latest</code> to 1.42.2.</p>
</li>
<li>
<p>Update <code>shfmt@latest</code> to 3.13.0.</p>
</li>
<li>
<p>Update <code>prek@latest</code> to 0.3.5.</p>
</li>
<li>
<p>Update <code>mise@latest</code> to 2026.3.7.</p>
</li>
<li>
<p>Update <code>cargo-shear@latest</code> to 1.10.0.</p>
</li>
<li>
<p>Update <code>cargo-nextest@latest</code> to 0.9.130.</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/taiki-e/install-action/commit/64c5c20c872907b6f7cd50994ac189e7274160f2"><code>64c5c20</code></a>
Release 2.68.26</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/c666b62352a2cec719f4279b65bc4b9cb0118719"><code>c666b62</code></a>
Update <code>vacuum@latest</code> to 0.25.0</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/79a0b1fbf0a5a860e75575923cfd8071ef7731b1"><code>79a0b1f</code></a>
Update <code>syft@latest</code> to 1.42.2</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/79ae3e7195898d685a8f1a51e980eca2b85c6df3"><code>79ae3e7</code></a>
Update <code>shfmt@latest</code> to 3.13.0</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/bf7e2210ea8866c4311d44ebbf00cc7507da230f"><code>bf7e221</code></a>
Update <code>prek@latest</code> to 0.3.5</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/75095ac72d15f259c192f5bcd107758e0c04d639"><code>75095ac</code></a>
Update <code>mise@latest</code> to 2026.3.7</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/2c91e8323917c69463481a4f07f9acc57e4bb86b"><code>2c91e83</code></a>
Update <code>cargo-shear@latest</code> to 1.10.0</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/46a7c8ccfde426f1692a1d120c31e21ac7f3d20f"><code>46a7c8c</code></a>
Update <code>cargo-nextest@latest</code> to 0.9.130</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/14ee01d8e346def73b05bd652e46cddba4a46213"><code>14ee01d</code></a>
codegen: Mark coreutils 0.7.0 as broken</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/854cac6590aa759ac55db7f79e5866185f97cacd"><code>854cac6</code></a>
Update coreutils manifest</li>
<li>See full diff in <a
href="https://github.com/taiki-e/install-action/compare/v2.68.25...v2.68.26">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=taiki-e/install-action&package-manager=github_actions&previous-version=2.68.25&new-version=2.68.26)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
## Summary

- Narrows the self-authored PR early-exit: skip only review posting
(step 4) and thread resolution (step 6), but keep CI monitoring (step 5)
- Removes the "done, stop here" instruction from step 5 that previously
told the model to skip CI monitoring for silent self-authored PRs

## Context

Run
[22920083221](https://github.com/max-sixty/worktrunk/actions/runs/22920083221)
spent ~9 minutes polling CI after correctly staying silent on
self-authored PR #1429. The original fix skipped steps 4–6 entirely, but
[review
feedback](#1431 (comment))
correctly noted that CI monitoring is valuable for self-authored PRs —
the bot can self-fix failures via step 7.

Closes #1430

## Test plan

- [x] Verify the instruction reads naturally in context
- [ ] Monitor next self-authored PR review to confirm the model monitors
CI but skips posting

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: worktrunk-bot <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
…ers (#1435)

## Summary
- **`claude-mention` prompt**: Added explicit guidance to use the
`review-pr` skill for inline suggestions when providing code feedback on
PRs — both for `@worktrunk-bot` mentions and bot-engaged conversation
comments. This tells the bot to post inline suggestions on exact diff
lines (not prose in a conversation comment) and to offer pushing a
commit for mechanical fixes.
- **`review-pr` skill section 7**: Updated from "bot PRs only" to also
allow **offering** to push a commit on human PRs when fixes are
mechanical and correctness is obvious. The bot still posts inline
suggestions first and only pushes after the author accepts.

Addresses both failures from #1423: the bot will now (a) use inline
`suggestion` blocks instead of conversation comments, and (b) offer to
push the changes.

## Test plan
- [ ] Trigger `claude-mention` on a PR with a review request and verify
inline suggestions are posted
- [ ] Verify the bot offers to push mechanical fixes on human PRs
- [ ] Verify bot PRs still get direct pushes without asking

Closes #1433

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: worktrunk-bot <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
…1443)

## Summary

- Add "Before creating a PR" guidance: check for existing PRs and fix
branches before creating duplicates
- Add "Before committing code changes" guidance: run `cargo fmt`
(minimum) or full pre-merge before committing

## Evidence

In [run
22946109451](https://github.com/max-sixty/worktrunk/actions/runs/22946109451)
(`claude-mention` on issue #1415), the bot:

1. **Created a duplicate PR.** PR #1416 (created 2026-03-10) already
addressed the same issue — excluding remote branches from switch
completions. The bot created #1442 with a different approach without
checking for existing work. Both PRs are authored by `worktrunk-bot`.
The session log shows the bot went directly from reading the issue to
editing code — no `gh pr list` or branch check.

2. **Skipped `cargo fmt` before committing.** The bot ran `cargo check`
to verify compilation but not `cargo fmt`. CI failed on the pre-commit
hook's format check, requiring a second "style: rustfmt" commit and
another full CI polling cycle (~11 minutes of additional `sleep 60`
polls).

<details><summary>Session log: tool call sequence (run
22946109451)</summary>

```
Skill: running-in-ci
Bash: gh issue view 1415 ...
Read: src/completion.rs
Edit: src/completion.rs          ← code change
Grep: complete_branches          ← searched for tests, found none
Bash: cargo check                ← compilation only, no fmt
Bash: git checkout -b ...
Bash: git add && git commit      ← committed unformatted code
Bash: git push && gh pr create   ← created PR #1442 (duplicate of #1416)
... 11 CI poll cycles ...
Bash: gh run view --log-failed   ← discovered fmt failure
Bash: cargo fmt                  ← fixed formatting
Bash: git add && git commit      ← second commit
... 11 more CI poll cycles ...
```

</details>

## Root cause

The `running-in-ci` skill (loaded by all CI workflows) had no guidance
on either checking for existing PRs or formatting code before
committing. The `triage-issue` skill already had both — Step 3 ("Check
for duplicates") and Step 6.3 (`cargo run -- hook pre-merge --yes`) —
but this guidance didn't extend to the `claude-mention` workflow.

## Test plan

- [ ] Verify the skill file renders correctly
- [ ] Observe future `claude-mention` runs for improved behavior (check
for existing PRs, run `cargo fmt`)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: worktrunk-bot <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
Follow-up to #1238. Two small refinements to the CWD-removed hint
system:

- `cwd_removed_hint()` now returns `Option<String>` instead of `String`
— when no repository can be found, there's no actionable hint to give,
so `None` is more accurate than a plain string. The caller in `main.rs`
uses `info_message` for the no-hint case instead of `hint_message`.
- Dropped trailing period from the `wt list` fallback hint to match the
`wt switch ^` hint (consistency).

Ref #1168

> _This was written by Claude Code on behalf of @max-sixty_

---------

Co-authored-by: Claude <[email protected]>
## Summary

- Updates example heading from "Remove specific worktrees:" to "Remove
specific worktrees / branches:" to clarify that `wt remove` also works
on branches

Ref #1415

## Test plan

- [x] Snapshot test updated and passing
- [x] Doc sync test passes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: worktrunk-bot <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
Without this flag, `claude -p` saves the commit generation conversation
to session history. When the user later runs `claude --continue`, it
resumes that ephemeral commit session instead of their previous working
session.

> _This was written by Claude Code on behalf of @max-sixty_

---------

Co-authored-by: Claude <[email protected]>
…#1456)

The two Windows-only code paths (`handle_select_command` and
`handle_switch_command`) called `std::process::exit()` directly,
bypassing destructors, cleanup, and the centralized error handling in
`main()`. Replace with `WorktrunkError::AlreadyDisplayed` returns — the
established pattern for "message already printed, just exit with this
code". Exit codes (1 and 2) are preserved.

> _This was written by Claude Code on behalf of @max-sixty_

Co-authored-by: Claude <[email protected]>
Match the --progressive/--no-progressive pattern: the rarely-used
override (--cd) is hidden, the user-facing flag (--no-cd) is visible
with "Use --cd to override" in help text. Also switch from
conflicts_with to overrides_with for last-one-wins semantics.

Co-Authored-By: Claude <[email protected]>
## Summary

Draft implementation per @max-sixty's
[suggestion](#1404 (comment)):
reuse `--no-cd` to make the picker print-only instead of adding a
separate `--print` flag.

- When `wt switch --no-cd` opens the interactive picker (no branch
argument), selecting a branch prints its name to stdout and exits — no
switching, no cd directive, no hooks
- When `wt switch --no-cd <branch>` is used with an explicit branch,
behavior is unchanged (switches without cd)
- `alt-r` (remove) is blocked in print mode since it's a read-only
operation

This avoids adding a new CLI flag while giving the same scripting
capability that #1404 proposed.

## Test plan

- [x] Unit tests for `resolve_print_identifier` (switch, create, remove
cases)
- [x] PTY integration test: `--no-cd` picker prints branch name, emits
no cd directive
- [x] Existing `--no-cd` tests still pass (directive suppression, hooks,
execute)
- [x] Help snapshots and doc sync updated


🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: worktrunk-bot <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
worktrunk-bot and others added 8 commits March 11, 2026 22:12
## Summary

- Update the `review-pr` skill to clarify that bot-authored PR reviews
are valuable and wanted, not just a limitation to work around
- Adds explicit guidance that bot-authored PRs should be reviewed with
full scrutiny since they're more likely to duplicate APIs, miss design
intent, or diverge from conventions

Requested by @max-sixty in #1453.

## Test plan

- [ ] Verify the updated guidance reads clearly in context
- [ ] Confirm future bot-authored PR reviews apply full scrutiny

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: worktrunk-bot <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
The bot has pushed to `origin` on fork PRs three times (#1411, #1434,
run 22985929574), creating stray branches on the upstream repo. The
previous approach added workflow-level fork detection and system prompt
injection — but the root cause is simpler: Claude says `git push origin`
despite never being told to.

`gh pr checkout` already configures branch tracking to the correct
remote (including fork remotes). `git push` (without specifying a
remote) follows tracking and works correctly for both fork and non-fork
PRs. The fix is just telling the CI skill to use `git push`, matching
the guidance already in `developing-code` and `github-gitlab`.

Closes #1434.

> _This was written by Claude Code on behalf of @max-sixty_

---------

Co-authored-by: worktrunk-bot <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: Maximilian Roos <[email protected]>
## Problem

When removing the current worktree (`wt remove` from within the worktree
being removed), post-switch hooks don't fire even though the user is
implicitly switched back to the primary worktree.

**Root cause:** `spawn_hooks_after_remove` creates a fresh
`Repository::at(main_path)`, but `load_project_config()` internally
calls `current_worktree()` which uses the global process cwd — the
removed worktree. Since that path no longer exists (or lacks
`.config/wt.toml`), the config lookup silently returns `None` and no
project hooks are found.

## Solution

Pre-warm the project config cache from `main_path` before any hook
preparation in `spawn_hooks_after_remove`. This ensures both post-remove
and post-switch hooks can find the project config.

Added:
- `ProjectConfig::load_at()` — loads config from a specific worktree
root (refactored from `load()`)
- `Repository::load_project_config_at()` — loads and caches project
config from a specific worktree path

## Testing

- Added `test_remove_current_worktree_fires_post_switch_hook` —
reproduces the exact scenario from #1450 (create worktree, cd into it,
remove it, verify post-switch hook fires)
- Test confirmed failing before the fix and passing after
- All pre-existing tests continue to pass

---
Closes #1450 — automated triage

---------

Co-authored-by: worktrunk-bot <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Maximilian Roos <[email protected]>
Three root causes of intermittent PTY test failures under CI load:

1. **Timing assertion in `test_list_progressive_api`** — `total_duration
< 5s` fails under load due to the 1s minimum drain wait. Removed (tests
correctness, not performance).

2. **Insufficient stabilization timeout in switch_picker tests** —
skim's async item loading can exceed 10s under heavy CI. Increased to
30s (fast 10ms polling means no slowdown in normal case).

3. **Stability vs content race in `wait_for_stable_with_content`** —
required `screen_unchanged_500ms AND content_present` simultaneously,
but skim's cosmetic redraws (cursor positioning, border repaints) kept
resetting the stability timer. Added `content_found_at` fallback: once
expected content has been continuously present for 500ms, accept
stability regardless of cosmetic redraws. Also panics with diagnostics
when expected content never appears (previously warned silently, leading
to confusing snapshot mismatches).

Bonus: fixed incorrect expected content `"│orphan-branch"` →
`"orphan-branch"` in `test_switch_picker_respects_list_config`
(orphan-branch is in the list panel, not adjacent to the border).
Previously masked by the silent timeout.

> _This was written by Claude Code on behalf of max-sixty_

Co-authored-by: Claude <[email protected]>
The picker path (wt switch without arguments) was resolving config with
resolved(None), missing project-specific [switch] no-cd overrides. Since
handle_select already opens a repo via current_or_recover(), pass the
flag pair through and resolve change_dir inside where repo.config()
provides project-aware resolution.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@worktrunk-bot

Copy link
Copy Markdown
Collaborator Author

Superseded — cherry-picked the fix commit (154fdda) directly onto #1401's branch per max-sixty's request.

@max-sixty
max-sixty deleted the fix/picker-project-config-no-cd branch June 18, 2026 06:00
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.

4 participants