Skip to content

chore: self-heal — 3 backlog items - #78

Merged
fxmaxvl merged 4 commits into
mainfrom
chore/self-heal-2026-10-04
Oct 4, 2026
Merged

fxmaxvl merged 4 commits into
mainfrom
chore/self-heal-2026-10-04

Conversation

@fxmaxvl

@fxmaxvl fxmaxvl commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Three items from #77. #77 stays open: items 1 and 4 remain in the backlog.

#77 item 2 — Untracked files in the review scope (bf:review)

Ask: stop scope.sh returning zero files for brand-new untracked files, and stop an empty gh pr diff ending the review at NOTHING_TO_REVIEW.

Change:

  • scope.sh gains an opt-in --with-untracked flag. In the working and paths modes, it diffs untracked, non-ignored files against /dev/null. The working mode skips .bf/. The -w pass includes them too, so they aren't misclassified as whitespace-only.
  • bf:review passes the flag. When gh pr diff comes back empty, review falls back to git diff origin/<base>...origin/<head> before the early exit.
  • Walkthrough and coherence don't pass the flag, so their documented "untracked is out of scope" contract is unchanged.

Verified: bash -n, then a fixture repo, plus the fallback run against #76:

Case Result
Untracked-only tree, with flag mode: working, both new files listed
Same tree, without flag Unchanged behaviour: falls back to branch with 0 files
Tracked + untracked, with flag Both listed
Paths mode naming an untracked file File included
Only .bf/ and ignored files untracked Excluded; falls back to branch
New text file vs new binary Text file not marked whitespace-only; binary marked, as the script already documents for binaries
Diff header format diff --git a/<f> b/<f>, parsed into hunks
PR fallback against #76 git diff origin/main...origin/feat/kit produced the 14-file diff

#77 item 3 — Waiting on bot reviews (bf:pr-comments)

Ask: handle bots that leave a standing status comment, which makes wait-for-review.sh return at once. Document polling the bot's CI check.

Change:

  • Cause: fetch-pr-comments.sh counts PR-level bot comments as actionable, so the wait reports findings on its first poll.
  • The skill now says that when every actionable item is a bot status post and the bot's check is pending, it waits with gh pr checks <pr> --watch. That is gh's own loop, so the "never hand-roll the loop" rule still holds.
  • --watch has no timeout, so the skill bounds it with the Bash timeout and maps that to the existing timeout row.
  • One new edge-case row.

Verified (decision rule, driven both ways):

#77 item 5 — Precedence inside the conventions

Ask: say which wins when the TestCtx end-of-file rule conflicts with dev.md's follow-the-existing-style rule, and define or explicitly leave undefined the order of functions within a module.

Change: dev.md gains a Precedence rule:

  • An established pattern in an existing file wins over the language and testing conventions.
  • Those conventions govern new files.
  • The order of public and private functions within a module is deliberately left undefined; follow the surrounding code.

testing.md, python.md and typescript.md, which each restated the end-of-file placement without exceptions, now point to it. Reviewer: this rule is a policy choice; veto here if it should go the other way.

Verified (documentation): read-back of each edited line against the ask. A grep finds no remaining unconditional end-of-file placement rule.


Refs #77

Addresses #77 item 2: Untracked files in the review scope (bf:review)
…-comments

Addresses #77 item 3: Waiting on bot reviews (bf:pr-comments)
…d test conventions

Addresses #77 item 5: Precedence inside the conventions

Rule: an established pattern in an existing file wins; the language and
testing conventions govern new files; public/private function ordering
within a module is deliberately left undefined.
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