Skip to content

fix: SSH/.git Brain spec exclusion and phantom nested-branch parents - #9

Merged
Whamp merged 1 commit into
mainfrom
fix/review-followups
Aug 18, 2026
Merged

fix: SSH/.git Brain spec exclusion and phantom nested-branch parents#9
Whamp merged 1 commit into
mainfrom
fix/review-followups

Conversation

@Whamp

@Whamp Whamp commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Delivery-owner verification pass on #6 found two holes; both fixed test-first (red → green).

  1. Brain self-reload via git URL installs: isBrainExtensionSpec only matched github.com/Whamp/pi-brain/ (literal slash, no .git). An install via git@github.com:Whamp/pi-brain.git or https://github.com/Whamp/pi-brain.git would be forwarded to the committer child, re-enabling the self-append-to-log bug Committer follow-ups: subprocess isolation, SIGKILL escalation, YAML comment support #3 fixed. Regex now covers :// separator and .git suffix; pi-brain-fork lookalikes still pass through.
  2. Phantom nested-branch parents switchable: branchExists('feat') was true when only feat/auth existed (dir-without-commits.md), letting OTA writes orphan into an unlisted directory. Branches now require the commits.md marker — the same criterion collectBranchNames uses.

229 tests green, pnpm run check all green, aislop/slop-scan clean.

Delivery-owner verification of #6 found two holes:

- isBrainExtensionSpec matched only 'github.com/Whamp/pi-brain/' with a
  literal slash and no .git suffix, so pi-brain installed via
  git@github.com:Whamp/pi-brain.git (SSH) or an https URL with .git
  suffix would be forwarded to the committer child — re-enabling the
  self-reload onto log.md that --no-extensions exists to prevent. The
  regex now accepts ':' or '/' after github.com and an optional .git
  suffix; lookalike repos (pi-brain-fork) are still passed through.

- branchExists() treated any directory as a branch, so the parent dir
  of a nested branch (e.g. 'feat' for 'feat/auth') was switchable;
  OTA entries would then be appended to feat/log.md in a directory
  that listBranches never shows. A branch now requires commits.md,
  the same marker collectBranchNames uses.
@Whamp
Whamp merged commit 6409a02 into main Aug 18, 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.

1 participant