refactor: Remove all platform-specific conditional skips from tests - #6
Merged
Conversation
Adds support for creating a new worktree/branch without specifying a base branch. If no base is specified, the command now attempts to resolve the repository's default branch. This makes the `--create` behavior more convenient for typical new branch workflows.
The merge command now provides a more explicit confirmation message when a worktree is preserved with the `--no-remove` flag, replacing the previous hint about using `wt remove`. For the push command, a new note is added to the progress output to acknowledge when the `--allow-merge-commits` flag is used and merge commits are present. This enhances clarity about why a typically disallowed operation was permitted.
Adds specific ordering to the `list` command: 1. Main worktree first. 2. Current worktree second (if not main). 3. Remaining worktrees by most recent commit timestamp. A new integration test `test_list_ordering_rules` is included to verify these rules.
Removes defensive programming patterns that gracefully adapted to missing dependencies or platform differences. Tests now fail fast with clear errors instead of silently skipping, aligning with "trust boundaries" and "low cardinality" principles (one code path per test, not multiple branches). Changes: - Remove 8 bash/fish availability checks (e2e_shell*.rs) - Remove 7 Windows/Unix command syntax conditionals (switch.rs, configure_shell.rs) - Remove 2 macOS/Linux bash config path conditionals (configure_shell.rs) - Keep Unix-only PermissionsExt (required for cross-platform compilation) All 233 tests pass on Unix. Tests will fail clearly on unsupported platforms. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
max-sixty
added a commit
that referenced
this pull request
May 23, 2026
Consolidates the spec for what runs before the `wt switch` / `wt list` skeleton appears, since the previous "Fixed Command Count" table mixed logical fetches with actual forks (most of the listed commands are now cache hits served from the prewarmed in-memory config map) and didn't break down the `git log --no-walk` batch. Two doc-only edits, no behavior change: - `commands/list/collect/mod.rs` — replaced `### Fixed Command Count` with `### Forks on the Critical Path`: five git forks on the path to the skeleton for a normal repo (six in repos with `extensions.worktreeConfig=true`, where `Repository::all_config` re-forks from `git_common_dir` because `--list` from a linked worktree misses main-worktree `config.worktree` overrides). Each row carries its source method and role; #3 is explicitly tagged Conditional with the regime spelled out. A "looks like a fork but isn't" list enumerates the `config_last` lookups served from the in-memory map. A callout flags `default_branch()`'s one-per-repo `git ls-remote` fallback (worktrunk's one accepted wire-path exception per CLAUDE.md → "Network Access"). A new `### #6 — the batched commit-details fork` subsection breaks down `git log --no-walk --no-show-signature --format=%H%x00%h%x00%ct%x00%s` field by field: which downstream cell each format field feeds, why each flag is there, the ARG_MAX bound on argv length. - `commands/picker/mod.rs` — a one-sentence pointer onto the existing "Time-to-skeleton" line directing readers to the new collect section. Verified locally with `RUSTDOCFLAGS='-Dwarnings' cargo doc --no-deps --document-private-items` (intra-doc links to `Repository::prewarm`, `at`, `all_config`, `list_worktrees`, `local_branches`, `url_template`, `is_bare`, `default_branch` all resolve). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes 17 conditional skips from tests that were defensive programming patterns. Tests now fail fast with clear errors instead of silently adapting to platform differences or missing dependencies.
Changes:
Alignment with development principles:
All 233 tests pass on Unix (macOS/Linux). Tests will fail with clear errors on unsupported configurations.
Test plan
🤖 Generated with Claude Code