Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
chore: correct stale comments and tighten a statusline width test (#4479)
Worktrunk Bot8ba948e2cacd
diff --git a/benches/AGENTS.md b/benches/AGENTS.mdindex 960093c2e..38462b80f 100644--- a/benches/AGENTS.md+++ b/benches/AGENTS.md@@ -1,6 +1,6 @@# Benchmark guidelines-Bench groups and examples are documented at the top of their Rust files. Criterion takes a positional substring filter or --exact; it has no --skip. For example, cargo bench --bench list skeleton/warm runs one warm group. Large imported fixtures are opt-in and must not run on hosted CI.+Bench groups and examples are documented at the top of their Rust files. Criterion takes a positional substring filter or --exact; it has no --skip. For example, cargo bench --bench list skeleton/warm runs one warm group. The large-repository prune fixture is opt-in through the large-repository-benches feature and must not run on hosted CI.## Fixtures and benchesdiff --git a/benches/picker_preview.rs b/benches/picker_preview.rsindex a0554a709..57a23e879 100644--- a/benches/picker_preview.rs+++ b/benches/picker_preview.rs@@ -21,11 +21,9 @@// `WORKTRUNK_PREVIEW_BENCH=1`, which runs the full picker prelude (collect,// speculative spawn, skeleton, initial precompute, deferred precompute) and// then exits right after `orchestrator.wait_for_idle()` — before skim-// launches and before any JSON serialization / stderr drain. The PTY route-// (option 2 from the task: "spawn → first interactive-ready point") would-// require a TTY harness; the documented nextest/SIGTTOU pain on-// `shell-integration-tests` (see project `AGENTS.md`) makes that a follow-up-// rather than a prerequisite. The headless path captures the initial pool+// launches and before any JSON serialization / stderr drain. Measuring+// spawn to the first interactive-ready point would need a PTY harness, so+// it is left as a follow-up. The headless path captures the initial pool// workload, which is the variable the optimization work in #2662 / #2683 /// #2685 / #2704 actually pushes on.//diff --git a/src/commands/list/model/statusline_segment.rs b/src/commands/list/model/statusline_segment.rsindex 1ddde71b1..9284f5e32 100644--- a/src/commands/list/model/statusline_segment.rs+++ b/src/commands/list/model/statusline_segment.rs@@ -261,11 +261,14 @@ mod tests {StatuslineSegment::new("x".to_string(), 10), // 1 char, low priorityStatuslineSegment::new("y".to_string(), 10), // 1 char, low priority];- // Budget is 25 - only fits the important segment (22) or x+y (1+2+1=4), not both- let result = StatuslineSegment::fit_to_width(segments, 25);- assert!(- result.iter().any(|s| s.content == "very_important_segment"),- "Should keep the high-priority segment"+ // Budget is 23: the important segment (22) fits alone, but adding+ // either narrow segment (22+2+1=25) does not+ let result = StatuslineSegment::fit_to_width(segments, 23);+ let contents: Vec<_> = result.iter().map(|s| s.content.as_str()).collect();+ assert_eq!(+ contents,+ ["very_important_segment"],+ "Should drop the narrow low-priority segments, not the wide high-priority one");}}diff --git a/src/commands/remove.rs b/src/commands/remove.rsindex bfb6de958..4ca80bd37 100644--- a/src/commands/remove.rs+++ b/src/commands/remove.rs@@ -518,12 +518,12 @@ pub fn handle_remove_command(args: RemoveArgs, yes: bool) -> anyhow::Result<()>return Ok(());}- // Approve hooks (only if we have valid plans). Each removed- // worktree's `pre-remove` / `post-remove` is approved against- // that worktree's config, and its `post-switch` against the- // worktree the user lands in — see `approve_remove` above.+ // Approve hooks (only if we have valid plans): `pre-remove` /+ // `post-remove` anchored at each removed worktree and+ // `post-switch` at each destination, all selected from the+ // invoking worktree's config — see `approve_remove` above.// (`destination_targets` is mostly the primary worktree- // repeated; the helper dedups by template.)+ // repeated; the helper dedups destinations by path.)let all_plans = || {plans.othersdiff --git a/src/trace/parse.rs b/src/trace/parse.rsindex a5fff4b5b..0bfbcf42e 100644--- a/src/trace/parse.rs+++ b/src/trace/parse.rs@@ -70,7 +70,7 @@ pub struct TraceEntry {pub context: Option<String>,/// The kind of trace entrypub kind: TraceEntryKind,- /// Start timestamp in microseconds since Unix epoch (for Chrome Trace Format)+ /// Start timestamp in microseconds since the trace epoch (for Chrome Trace Format)pub start_time_us: Option<u64>,/// Thread ID that executed this command (for concurrency analysis)pub thread_id: Option<u64>,