Skip to content

Bind Failed run preservation retries to acquired Worktree ownership - #525

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

JacobStephens2 merged 1 commit into
mainfrom
issue-524

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

Closes #524

 ordinary synchronization → acquired Operation
-Failed run preservation → raw Git retries
+Failed run preservation → acquired Operation
+  every attempt and retry: inspect → Git → inspect

Bind execution, inspection interruption and ownership diagnostics at construction. Preserve the existing salvage policy and locks; retain local work on ownership loss, including after an earlier action succeeded. Preservation finishes after Command interruption without clearing it.

Evidence

  • Before: Against main (535c307), each new ownership-change regression failed: abort retried and discarded merge state; stage retried and staged unrelated work; commit retried on the unrelated branch; push retried after ownership changed. The valid-ownership retry regression passed.
    After: All four regressions pass through Worktree::preserve_failed_run; valid ownership permits each mutation to retry successfully.
  • Focused checks: cargo test --bin thirdshift worktree:: — 144 passed; cargo test --test failed_run — 13 passed.
  • cargo fmt --check and cargo clippy --all-targets -- -D warnings passed.
  • Full suite: cargo test — 1,484 passed, 0 failed, 1 existing ignored across 39 test binaries.

Test seams

  • Worktree::preserve_failed_run, observing real temporary checkout/index/branch state and a local bare origin with the existing isolated Git fault adapter.
  • Worktree cleanup on Drop after preservation failure or success, including both repository locks.
  • Ordinary Worktree synchronization and Git execution after recorded Command interruption.

Review

Reviewed with thirdshift-code-review using git diff main...HEAD, with main fixed at 535c307. Standards: 0 findings. Spec: 0 findings.

Unaddressed findings

Standards

None; the Standards review reported no findings.

Spec

None; the Spec review reported no findings.

CI notes

  • test-macos, run 37666755617 was cancelled after 24 minutes with 530/1,430 tests passed and no test failures logged; the same check passed on the exact base commit (535c307), and local Linux verification passed all 144 Worktree tests and the full cargo nextest run (1,484 passed, one existing ignored test), so no code change is warranted.

Merge Danger

Door: two-way

Private refactor; reverting restores the previous execution implementation. No migration or new dependency.

Blast Radius: Worktree

Ordinary synchronization and Failed run preservation share execution. Acquisition, cleanup, stale Architecture review disposal and confirmed Self-merge authority retain their existing implementations.

Built with codex · gpt-6.1-sol · xhigh

@JacobStephens2
JacobStephens2 merged commit 5ec943d into main Oct 7, 2026
14 of 15 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-524 branch October 7, 2026 19:03
@JacobStephens2 JacobStephens2 mentioned this pull request Oct 8, 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 acquired Worktree execution across Failed run preservation

1 participant