Skip to content

chore: reduce Greptile review noise from defensive coding suggestions#423

Open
andreatgretel wants to merge 3 commits intomainfrom
andreatgretel/chore/greptile-noise-reduction
Open

chore: reduce Greptile review noise from defensive coding suggestions#423
andreatgretel wants to merge 3 commits intomainfrom
andreatgretel/chore/greptile-noise-reduction

Conversation

@andreatgretel
Copy link
Contributor

@andreatgretel andreatgretel commented Mar 16, 2026

Summary

Reduce noise from Greptile's automated code reviews by raising the severity threshold, filtering to logic-only comments, and adding explicit instructions to skip defensive coding suggestions.

Changes

Changed

  • greptile.json - Added three noise-reduction settings:
    • strictness: 3 - only surface critical issues (was default 2)
    • commentTypes: ["logic"] - skip style and syntax comments
    • instructions - tell Greptile to avoid suggesting error handling, null checks, try/catch, input validation, logging, comments, or docstrings unless there's a concrete bug

Generated with AI

Set strictness to 3 (critical only), filter to logic-only comments,
and add instructions to skip defensive coding patterns like error
handling, null checks, and input validation unless there's an actual bug.
@andreatgretel andreatgretel requested a review from a team as a code owner March 16, 2026 20:57
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 16, 2026

Greptile Summary

This PR tightens the Greptile reviewer configuration to reduce low-signal comments by raising strictness to 3, restricting emitted comment types to logic only, and adding an explicit instructions string that mirrors custom instruction instruction-1 already active in this org.

Key changes:

  • strictness: 3 — raises the bar above the default (2) so only high-confidence issues are surfaced.
  • commentTypes: ["logic"] — suppresses style and syntax category comments entirely. Worth keeping in mind that real compilation/type errors classified as syntax by Greptile would no longer be reported inline; however, the accompanying instructions text directs the model to focus on concrete bugs, which should compensate.
  • instructions — aligns the per-repo instruction with the org-level instruction-1 custom rule, making the behaviour explicit and stable even if org-level rules change.
  • sequenceDiagramSection.defaultOpen — quietly changed from true to false (not mentioned in the PR description). This is a harmless UX tweak that collapses the sequence diagram section by default.

Confidence Score: 5/5

  • This PR is safe to merge — it only modifies a Greptile configuration file with no functional code changes.
  • Single-file, config-only change. The three new fields (strictness, commentTypes, instructions) are additive and well-understood. The defaultOpen tweak is cosmetic. No logic, tests, or production code are affected.
  • No files require special attention.

Important Files Changed

Filename Overview
greptile.json Adds three noise-reduction settings (strictness: 3, commentTypes: ["logic"], instructions) and collapses the sequence diagram section by default — straightforward config-only change with no logic issues.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[PR opened / updated] --> B[Greptile triggered]
    B --> C{strictness >= 3?}
    C -- "Yes (new)" --> D[Filter low-confidence findings]
    C -- "No (old default 2)" --> E[Surface all findings]
    D --> F{commentTypes check}
    F -- "logic only (new)" --> G[Emit logic comments]
    F -- "logic + style + syntax (old)" --> H[Emit all comment types]
    G --> I{instructions filter}
    I -- "No defensive-coding suggestions" --> J[Post final review comments]
    H --> J
Loading

Last reviewed commit: 17079b6

@andreatgretel andreatgretel changed the title Reduce Greptile review noise chore: reduce Greptile review noise from defensive coding suggestions Mar 16, 2026
eric-tramel
eric-tramel previously approved these changes Mar 16, 2026
nabinchha
nabinchha previously approved these changes Mar 16, 2026
"fixWithAI": true,
"strictness": 3,
"commentTypes": ["logic"],
"instructions": "Do not suggest defensive coding patterns such as adding error handling, null checks, try/catch blocks, or input validation unless there is a concrete, demonstrable bug. Focus on logic errors, correctness issues, and actual bugs. Do not suggest adding logging, comments, or docstrings.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated: may be we can collapse the sequence diagram by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, hasn't been super helpful! Added.

@andreatgretel andreatgretel dismissed stale reviews from nabinchha and eric-tramel via b27e577 March 17, 2026 00:09
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.

3 participants