Skip to content

v0.4.3

Latest

Choose a tag to compare

@earneet earneet released this 16 Sep 10:00
· 12 commits to master since this release
f695f48

Fixes (issue #7 follow-up)

Fixes the follow-up reported in #7 (comment): v0.4.2's zombie-binding fix did not cover the main path of "background task sub-sessions completing normally" — worktree_merge apply was blocked 100% by inherited: true bindings of finished sub-agents.

Inherited sub-agent bindings now have a full lifecycle

  • Event-driven release (root fix): new event hook — session.idle releases a sub-agent's inherited binding the moment its task finishes; session.deleted releases any binding. Audited as binding_released. If a released sub-agent resumes later, lazy parent-chain inheritance re-binds it transparently (self-healing).
  • Guard semantics corrected: merge/cleanup now refuse only when an independent session holds a binding for the worktree. Inherited bindings are, by construction, descendants of the owner session — they are released along with the worktree instead of blocking it.
  • Cascade clearing: after a worktree is removed (merge/cleanup) or detected missing, every binding pointing at it is cleared, including the in-process inheritance cache — finished background tasks can never leave residue in the state file, across restarts.

Cleanup preview / merged-detection fixes

  • git branch --merged prefixes linked-worktree branches with +; the old parser only stripped *, so every managed worktree was labeled unmerged and non-force worktree_cleanup apply always skipped them. Both markers are now stripped (lookahead-guarded so +foo-style branch names stay intact); detached-HEAD pseudo entries are skipped.
  • worktree_cleanup(action="preview") aggregates per worktree (sessions=N, no duplicate lines) and reaps bindings whose directories are gone.
  • The apply loop processes each worktree exactly once, driven by its direct binding (correct for both external and git-common state backends).

Full changelog: v0.4.2...v0.4.3