Skip to content

docs: establish performance and efficiency principle - #335

Merged
boadij merged 1 commit into
mainfrom
docs/performance-principles
Oct 9, 2026
Merged

boadij merged 1 commit into
mainfrom
docs/performance-principles

Conversation

@boadij

@boadij boadij commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Establish performance and efficiency as cross-cutting product goals for runtime, model-facing interactions, and development workflows.
  • Favor eliminating avoidable work and weighing optimization complexity against evidence, without weakening correctness, reliability, security, or recovery.
  • Keep the principle in its existing canonical owner, 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

  • Verified against the current main base (123848b): one commit, one file, 7 additions and 0 deletions.
  • Confirmed the original document and heading structure remain intact; Markdown paragraph lines fit the existing 80-column wrapping.
  • No automated tests or smoke tests run (documentation-only change). GitHub CI not yet verified.

No runtime behavior or public interface changes.

@boadij
boadij merged commit 7d1dfef into main Oct 9, 2026
5 checks passed
@boadij
boadij deleted the docs/performance-principles branch October 9, 2026 22:42
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>
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.

1 participant