Skip to content

feat(worktree): make DefaultGitRunner timeout configurable via WorktreeConfig#4784

Merged
bug-ops merged 1 commit into
mainfrom
worktree-git-timeout
Jun 5, 2026
Merged

feat(worktree): make DefaultGitRunner timeout configurable via WorktreeConfig#4784
bug-ops merged 1 commit into
mainfrom
worktree-git-timeout

Conversation

@bug-ops

@bug-ops bug-ops commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds git_timeout_secs: u64 (default 30) to WorktreeConfig in zeph-config
  • Both DefaultGitRunner construction sites (src/runner.rs, src/commands/worktree.rs) now pass Duration::from_secs(config.worktree.git_timeout_secs.max(1)) instead of a hardcoded 30 s
  • Migration step 55 injects a commented # git_timeout_secs = 30 into existing [worktree] sections that lack the key

Test plan

  • cargo +nightly fmt --check — clean
  • cargo clippy --workspace -- -D warnings — 0 warnings
  • cargo nextest run --workspace --lib --bins — 10456 passed
  • 6 new unit tests for the WorktreeConfig field (default, serde round-trip, custom value, missing key)
  • 4 new migration tests for step 55 (key present → idempotent, key absent → comment injected, no section → noop)
  • Follow-up: migration comment insertion may silently no-op on CRLF line-endings (P4, filed separately)

Closes #4704

@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes enhancement New feature or request size/M Medium PR (51-200 lines) labels Jun 5, 2026
@bug-ops bug-ops enabled auto-merge (squash) June 5, 2026 11:08
…eeConfig

Add `git_timeout_secs: u64` (default 30) to `WorktreeConfig`. Both
`DefaultGitRunner` construction sites now use this value via `.max(1)`
clamp to prevent zero-duration timeouts. Migration step 55 injects the
commented field into existing `[worktree]` config sections.

Closes #4704
@bug-ops bug-ops force-pushed the worktree-git-timeout branch from 7e18e6c to 603dcd8 Compare June 5, 2026 11:13
@bug-ops bug-ops merged commit f68e061 into main Jun 5, 2026
32 checks passed
@bug-ops bug-ops deleted the worktree-git-timeout branch June 5, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request rust Rust code changes size/M Medium PR (51-200 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

enhancement(worktree): make DefaultGitRunner timeout configurable via WorktreeConfig

1 participant