Repository navigation
docs: establish performance and efficiency principle - #335
Merged
Merged
Conversation
boadij
added a commit
that referenced
this pull request
Oct 9, 2026
Fixes #330 Implements [ADR 0019](docs/adr/0019-retire-project-assignments-when-worktrees-are-absent.md). ## Summary - Reconcile Manager-owned project assignments against a repository-verified `git worktree list --porcelain -z` inventory at startup, inspection, resume, and worktree-removal event boundaries. - Fail closed when checkout identity is ambiguous. Missing assignment provenance does not cause branch reassociation to retire a surviving linked checkout; detached worktrees do not block cleanup when a saved checkout path proves they are unrelated; without provenance, any surviving linked checkout remains conservatively ambiguous. Unreadable saved sessions are not treated as evidence of a surviving checkout. - Retirement revalidates the active Manager, repository/worktree scope, and exact assignment identity under the assignment lock. Ordinary supervision defers on lock contention; native removal-event reconciliation uses bounded, abortable retries. - Create and verify new checkouts before publishing assignments. Remove pending project messages before the exact assignment. Retire confirmed-missing work instead of reconstructing its worktree during `resume_project`. The original Herdr event-callback root cause remains unproven; this change does not attribute the original failure to a specific cause. ## External Review #3 follow-up - Corrected `reconcile-assignment-lock` so its mocked Git inventory contains no surviving linked checkout and the assignment lock is held before Manager activation. - The regression confirms the assignment and pending message survive the first Manager inspection while locked, then verifies a subsequent Manager inspection retires the assignment and removes the message after lock release. - Merged current `main` (`9ee5b397ac9aa0127dcc2f55f4ad79bbb965576e`, including #335 and #336) without rebasing or force-pushing. Resolved the `extension/commands.test.ts` overlap by retaining ADR 0019 retirement assertions and the coordination-only Lead defaults/tests from #336. PR remains open and unmerged. ## Verification - `npm test -- extension/controller-api.test.ts` — passed (111 tests). - `npm test -- extension/commands.test.ts` — passed (111 tests). - `npm run validate` — passed (907 total; 906 passed, 1 skipped), including build and package audit (66 files). - Final `npm run check` — passed (907 total; 906 passed, 1 skipped). - `git diff --check` — passed. - GitHub Actions for final commit `cd385e8c3a75e5cebeaddb1f166b4b8335d292cf` — **passed** ([run 38005869226](https://github.com/boadij/pi-herdsman/actions/runs/38005869226)): Ubuntu, macOS, and Windows validation; package build/audit; container checks; aggregate CI. - The branch is mergeable against current `main`; merge base: `9ee5b397ac9aa0127dcc2f55f4ad79bbb965576e`. - No new live smoke was run: conflict resolution changed tests only; the included `main` changes are the already-merged PR #336 behavior. ## Safeguards and limitations Reconciliation does not mutate/prune Git worktrees or delete branches or Pi sessions. Historical assignments without trustworthy checkout provenance remain conservatively ambiguous when another linked checkout survives. The native removal smoke recorded earlier in this PR verifies current user-facing cleanup behavior but does not prove the original #330 callback failure mechanism. --------- Co-authored-by: Jeffrey Boadi <25706638+boadij@users.noreply.github.com>
boadij
pushed a commit
that referenced
this pull request
Oct 9, 2026
🤖 I have created a release *beep* *boop* --- ## [0.22.2](v0.22.1...v0.22.2) (2026-10-09) ### Fixes * **manager:** reconcile project assignments with worktrees ([#334](#334)) ([bc679d7](bc679d7)) ### Refactoring * **lead:** default orchestrators to coordination-only tools ([#336](#336)) ([9ee5b39](9ee5b39)) ### Documentation * **adr:** define worktree-backed project assignment lifecycle ([#331](#331)) ([123848b](123848b)) * establish performance and efficiency principle ([#335](#335)) ([7d1dfef](7d1dfef)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/development/product-philosophy.md, rather than creating a separate ADR or implementation-specific guidance.This generalizes the lessons from merged PRs #325, #326, and #328 without prescribing their particular mechanisms or introducing an additional documentation source of truth.
Validation
mainbase (123848b): one commit, one file, 7 additions and 0 deletions.No runtime behavior or public interface changes.