Skip to content

Honor Command interruption during repository lock acquisition - #474

Merged
JacobStephens2 merged 1 commit into
mainfrom
issue-473
Oct 7, 2026
Merged

JacobStephens2 merged 1 commit into
mainfrom
issue-473

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

Ordinary Runs now stop waiting for a repository lock when their Command is interrupted. Completion views still acquire the lock and finish cleanup without clearing the recorded request.

Git::lock(name) -> owned File
  resolve repository common git directory
  check bound policy before opening and before each attempt
  try exclusive lock
    WouldBlock -> wait 100 ms -> retry without a deadline
    other error -> return path-specific diagnostic
    acquired -> check policy -> return File (ownership until drop)

Closes #473

Evidence

  • Before: ordinary_repository_lock_contention_stops_before_the_holder_releases failed on SIGINT with acquisition waited for holder release while testing the original blocking implementation.
    After: the same regression passes for SIGINT, SIGTERM, and SIGHUP. All 11 Git execution tests pass, including completion through arriving and recorded signals, retained ordinary policy, shared worktree locking, and ownership until drop.
  • cargo check --all-targets, cargo fmt --check, and cargo clippy --all-targets -- -D warnings pass.
  • Full cargo test rerun passes: 1285 tests passed, 1 existing test ignored. The first run stopped on harness::settings::tests::an_interrupted_model_check_is_an_error_instead_of_retrying_the_pair (expected interrupted, received the Setup EOF error). That unchanged test passed in isolation and on the full rerun.
  • Linux and macOS CI pass on 7414bc8; both release-build checks also pass.
  • Reviewed against main (b2c0028) with thirdshift-code-review: Standards 0 findings; Spec 0 findings.

Seams under test

  • Existing Git::lock, Git::completion, and ordinary Git execution interfaces, using real temporary repositories and independent file opens for contention and ownership.

Merge Danger

Door: two-way

Blast Radius: repository

Affects Worktree serialization and Base fix lock acquisition. Existing ordinary/completion caller choices, native Git command retry behavior, lock paths, and file ownership remain intact.

Unaddressed findings

Standards

None; the review reported no findings.

Spec

None; the review reported no findings.

Built with codex · gpt-6.1-sol · xhigh

@JacobStephens2
JacobStephens2 merged commit dcf2ed8 into main Oct 7, 2026
13 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-473 branch October 7, 2026 02:02
This was referenced Oct 7, 2026
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.

Deepen Git repository locking behind Command interruption policy

1 participant