Skip to content

fix: harden v1 lease recovery#44

Merged
ferueda merged 3 commits into
ferueda:chore/v1-release-prepfrom
frueda-godaddy:codex/fix-v1-review-findings
Jun 12, 2026
Merged

fix: harden v1 lease recovery#44
ferueda merged 3 commits into
ferueda:chore/v1-release-prepfrom
frueda-godaddy:codex/fix-v1-review-findings

Conversation

@frueda-godaddy

@frueda-godaddy frueda-godaddy commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Persist new slot/lease intent before materializing a worktree so interrupted acquire can be repaired instead of disappearing during heal.
  • Quarantine failed postCreate/preRelease hook transitions and persist structured diagnostics.failedPhase instead of relying on hook error message prefixes.
  • Replay postCreate during resume-acquire when the failed pending acquire did not complete its creation hook, and cover preRelease replay during resume-cleanup.
  • Require explicit branch reuse through SDK/CLI, with --reuse-existing-branch as the opt-in path; document repair-time branch reuse semantics.
  • Add reset-release slot reuse coverage and tune Vitest worker/timeouts for the git/process-heavy suite.

Review follow-up

Addressed review nits from the approve-with-nits pass:

  • Replaced string-based postCreate replay heuristic with structured failedPhase.
  • Added resume-cleanup after preRelease hook failure regression.
  • Added acquire -> reset release -> second acquire clean slot regression.
  • Updated README fail-first branch creation example and repair reuse note.
  • Added comment for intentional postAcquire non-quarantine behavior.
  • Replaced review-noted err: any catches in pool.ts and git/branch.ts.

Verification

  • pnpm lint
  • pnpm build
  • pnpm typecheck
  • pnpm exec vitest run packages/grove/test/transitions.test.ts packages/grove/test/lease.integration.test.ts -t "structured|postCreate|preRelease|reset release returns a clean slot" --reporter=verbose
  • pnpm exec vitest run --reporter=verbose (12 files, 145 tests passed)

Note: direct push to ferueda/grove is not available to the active GitHub account, so this PR is opened from the frueda-godaddy/grove fork.

@ferueda
ferueda merged commit 52b6344 into ferueda:chore/v1-release-prep Jun 12, 2026
3 checks passed
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.

2 participants