Skip to content

feat: reduce blocking of urgent bugfixes via scope-aware review - #25

Merged
joaopereirajp merged 1 commit into
mainfrom
pr/reduce-urgent-bugfix-blocks-clean
Jul 25, 2026
Merged

feat: reduce blocking of urgent bugfixes via scope-aware review#25
joaopereirajp merged 1 commit into
mainfrom
pr/reduce-urgent-bugfix-blocks-clean

Conversation

@joaopereirajp

Copy link
Copy Markdown
Contributor

Summary

Reduces PR blocking on urgent bugfixes by keeping the LLM review scoped to the diff and dismissing findings the developer has already addressed or rejected.

Changes

Dismissal signals (replaces LLM-based reply evaluation)

  • respect-author-replies now defaults to true
  • Dismiss findings when the PR author resolves the review thread on GitHub (via GraphQL PullRequestReviewThread.isResolved)
  • Dismiss findings when the PR author replies to the bot's inline comment (any non-empty reply ≥10 chars)
  • No LLM judgment applied — if the dev says to ignore, it's ignored
  • Limited to PR author only (reviewers and bots cannot dismiss)

Scope-aware review

  • New diff-context-lines input (default: 15) — the LLM sees only the diff plus a window of context, not the full file
  • diff-context-lines: 0 sends only the raw diff patch
  • Reinforced shared-rules prompt: do not flag pre-existing issues outside the diff
  • Dynamic file labels: "Windowed file" when truncated, "Full file" when not

Stable finding IDs

  • Finding IDs generated from normalized descriptions (stop words removed, tokens sorted)
  • IDs survive LLM rephrasings between review rounds
  • Shared finding-format.ts module to avoid inverted dependency

Code review hardening

  • isBotLogin restricted to [bot] suffix (no more false positives like alicebot)
  • GraphQL pagination for review threads (>100 threads supported)
  • Safety net: windowed content that still exceeds token budget falls back to progressiveTruncate
  • Language-agnostic truncation markers (… (N lines truncated) …)
  • Fetch errors surfaced in DismissSignalFetchResult instead of silently swallowed
  • Bot detected anywhere in a resolved thread, not just the first comment

Scope-discipline guidance

  • Shared rules updated with explicit "stay within the diff" instruction
  • Agent examples (generalist, security, performance, architecture, code-quality) include scope discipline

Test plan

  • 308 tests passing
  • npm run typecheck clean
  • npm run format applied
  • npm run build generated

Commits squashed

Single commit to satisfy branch protection rules (no merge commits).

- Enable respect-author-replies by default
- Dismiss findings via resolved GitHub threads (GraphQL) and author replies
- Limit reply dismissal to PR author only
- Restrict isBotLogin to [bot] suffix
- Stable finding IDs via normalized descriptions
- Scope-discipline guidance in shared rules and agent examples
- diff-context-lines input (default 15) to restrict LLM to diff + context window
- Shared finding-format module to avoid inverted dependency
- GraphQL pagination for review threads
- Safety net for windowed content exceeding token budget
- Dynamic file labels (Windowed vs Full)
- Language-agnostic truncation markers
- Dismissal signals count and reply instructions in review body
@joaopereirajp
joaopereirajp merged commit 2afdad6 into main Jul 25, 2026
5 checks passed
@joaopereirajp
joaopereirajp deleted the pr/reduce-urgent-bugfix-blocks-clean branch July 25, 2026 02:34
@joaopereirajp
joaopereirajp restored the pr/reduce-urgent-bugfix-blocks-clean branch July 25, 2026 02:58
@joaopereirajp
joaopereirajp deleted the pr/reduce-urgent-bugfix-blocks-clean branch July 25, 2026 03:32
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