Skip to content
This repository was archived by the owner on Jul 12, 2026. It is now read-only.

feat: add best practices from 2000+ PR reviews#49

Open
oddessentials wants to merge 1 commit into
mainfrom
feat/best-practices
Open

feat: add best practices from 2000+ PR reviews#49
oddessentials wants to merge 1 commit into
mainfrom
feat/best-practices

Conversation

@oddessentials

Copy link
Copy Markdown
Owner

Synthesized lessons learned from 407 PRs across 5 repositories:

  • ado-git-repo-insights (954 comments)
  • odd-ai-reviewers (544 comments)
  • ado-git-repo-seeder (151 comments)
  • odd-demonstration (128 comments)
  • repo-standards (124 comments)

Key findings:

  • Security: Path traversal (225), input validation (45), command injection (32)
  • Reliability: Empty catch blocks (26), error recovery paths (15)
  • Contracts: Schema versioning, documentation drift
  • CI/CD: Runtime version alignment, run ID uniqueness

Includes real P1/P2 examples from AI-assisted code review.

Synthesized lessons learned from 407 PRs across 5 repositories:
- ado-git-repo-insights (954 comments)
- odd-ai-reviewers (544 comments)
- ado-git-repo-seeder (151 comments)
- odd-demonstration (128 comments)
- repo-standards (124 comments)

Key findings:
- Security: Path traversal (225), input validation (45), command injection (32)
- Reliability: Empty catch blocks (26), error recovery paths (15)
- Contracts: Schema versioning, documentation drift
- CI/CD: Runtime version alignment, run ID uniqueness

Includes real P1/P2 examples from AI-assisted code review.
@github-actions

github-actions Bot commented Feb 1, 2026

Copy link
Copy Markdown

AI Code Review Summary

Severity Count
🔴 Errors 0
🟡 Warnings 2
🔵 Info 5

Findings by File

docs/BEST_PRACTICES.md

  • 🟡 (line 2) 🐺: The claim of '2,000+ PR reviews' in the title doesn't match the '407 PRs' mentioned in the source line below
    • 💡 Suggestion: Update the title to reflect the actual number analyzed (407 PRs) or clarify if 2,000+ refers to individual review comments rather than PRs
  • 🟡 (line 4) 🐺: Inconsistent statistics: '407 PRs' and '1,901 review comments' don't align with the title's '2,000+ PR reviews'
    • 💡 Suggestion: Clarify the distinction between PRs reviewed vs. review comments analyzed, and ensure all numbers are consistent throughout the document
  • 🔵 (line 1) 🐺: Excellent comprehensive documentation with real-world examples and specific remediation guidance. The structure and content provide significant value for code review standards.
    • 💡 Suggestion: Consider adding links to external resources (OWASP, CWE references) for readers who want to learn more about specific security topics
  • 🔵 (line 85) 🐺: The Python example for credential exposure shows a syntax that may not be standard (f-strings with simple variable interpolation)
    • 💡 Suggestion: Consider showing a more realistic example like logging request details that might accidentally include tokens
  • 🔵 (line 210) 🐺: The 'Real P2 finding' quote formatting could be more consistent - some use quotes while others use block quotes
    • 💡 Suggestion: Standardize the formatting of real findings throughout the document for better readability
  • 🔵 (line 390) 🐺: The Semgrep rule counts in the appendix (totaling ~357) don't align with the methodology section's claim of analyzing 1,901 review comments
    • 💡 Suggestion: Clarify how the 1,901 comments relate to the specific Semgrep rule counts, or provide a breakdown of comment types
  • 🔵 (line 420) 🐺: The document ends abruptly without a clear conclusion or call to action
    • 💡 Suggestion: Consider adding a brief conclusion summarizing key takeaways or next steps for readers

Comment thread docs/BEST_PRACTICES.md
@@ -0,0 +1,420 @@
# Best Practices: Lessons from 2,000+ PR Reviews

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Multiple issues found in this area (3):

🟡 Line 2 🐺: The claim of '2,000+ PR reviews' in the title doesn't match the '407 PRs' mentioned in the source line below
💡 Update the title to reflect the actual number analyzed (407 PRs) or clarify if 2,000+ refers to individual review comments rather than PRs

🟡 Line 4 🐺: Inconsistent statistics: '407 PRs' and '1,901 review comments' don't align with the title's '2,000+ PR reviews'
💡 Clarify the distinction between PRs reviewed vs. review comments analyzed, and ensure all numbers are consistent throughout the document

🔵 Line 1 🐺: Excellent comprehensive documentation with real-world examples and specific remediation guidance. The structure and content provide significant value for code review standards.
💡 Consider adding links to external resources (OWASP, CWE references) for readers who want to learn more about specific security topics

Comment thread docs/BEST_PRACTICES.md

---

### 🔴 Input Validation (45 occurrences)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 🐺: The Python example for credential exposure shows a syntax that may not be standard (f-strings with simple variable interpolation)
Rule: pr_agent/docs
💡 Suggestion: Consider showing a more realistic example like logging request details that might accidentally include tokens

Comment thread docs/BEST_PRACTICES.md
---

## API & Schema Contracts

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 🐺: The 'Real P2 finding' quote formatting could be more consistent - some use quotes while others use block quotes
Rule: pr_agent/docs
💡 Suggestion: Standardize the formatting of real findings throughout the document for better readability

Comment thread docs/BEST_PRACTICES.md
20 javascript.lang.security.detect-child-process
20 javascript.lang.security.audit.detect-non-literal-regexp
17 security/path-traversal
13 reliability/error-handling

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 🐺: The Semgrep rule counts in the appendix (totaling ~357) don't align with the methodology section's claim of analyzing 1,901 review comments
Rule: pr_agent/docs
💡 Suggestion: Clarify how the 1,901 comments relate to the specific Semgrep rule counts, or provide a breakdown of comment types

Comment thread docs/BEST_PRACTICES.md

---

*This document is living. As new patterns emerge from PR reviews, they should be added here.*

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 🐺: The document ends abruptly without a clear conclusion or call to action
Rule: pr_agent/docs
💡 Suggestion: Consider adding a brief conclusion summarizing key takeaways or next steps for readers

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant