From 68e727d71a4ccc7573fa17f54cfa3dcc33aff4b4 Mon Sep 17 00:00:00 2001 From: Alex Alecu Date: Fri, 15 May 2026 12:00:40 +0300 Subject: [PATCH 1/2] docs(review): add repository review instructions --- REVIEW.md | 148 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 REVIEW.md diff --git a/REVIEW.md b/REVIEW.md new file mode 100644 index 0000000000..272ac33242 --- /dev/null +++ b/REVIEW.md @@ -0,0 +1,148 @@ +# Code Review Instructions + +# WHAT TO REVIEW + +**Flag these (high confidence only):** + +- Security vulnerabilities (injection, XSS, auth bypass) +- Runtime errors (null/undefined access, missing await) +- Logic bugs (wrong conditions, off-by-one) +- Typos that cause runtime errors +- Breaking API changes + +**Skip these:** + +- Style preferences +- TODO comments +- console.log statements +- Generated files (lock files, migration snapshots & journals) +- Patterns already used elsewhere in the codebase + +**Database migrations (.sql files - DO review these):** + +- Table-locking DDL (`CREATE INDEX`, `ALTER TABLE`) on populated tables - flag if not using `CONCURRENTLY` +- Adding `NOT NULL` without a `DEFAULT` on existing columns +- Dropping columns/tables that may still be read by running application code +- Large backfills or data transforms without batching +- Missing partial index opportunities (e.g. `WHERE col IS NOT NULL`) + +# COMMENT FORMAT + +``` +**[SEVERITY]:** Brief description + +Explanation of the issue. +``` + +**Severities:** CRITICAL (blocks merge), WARNING (should fix), SUGGESTION (nice to have) + +## Suggestion Blocks (for typos and simple fixes) + +For single-line fixes, use GitHub's suggestion syntax. + +**CRITICAL RULES FOR SUGGESTION BLOCKS:** + +1. The suggestion block REPLACES the ENTIRE commented line +2. Put ONLY the corrected version of that ONE line inside the block +3. Do NOT include the old/wrong code +4. Do NOT include multiple lines or surrounding context +5. Do NOT include both before and after versions + +### CORRECT Example + +If line 42 has a typo: `return searchTerm ? `${baseUrl}&name=${searchTem}` : baseUrl;` + +Post this comment on line 42: + +````markdown +**CRITICAL:** Variable name typo - `searchTem` should be `searchTerm` + +```suggestion + return searchTerm ? `${baseUrl}&name=${searchTerm}` : baseUrl; +``` +```` + +### WRONG Examples (do NOT do these) + +**WRONG - includes both old and new code:** + +```suggestion + return searchTerm ? `${baseUrl}&name=${searchTem}` : baseUrl; + return searchTerm ? `${baseUrl}&name=${searchTerm}` : baseUrl; +``` + +**WRONG - includes multiple lines/context:** + +```suggestion +const buildUrl = (searchTerm: string): string => { + const baseUrl = `${API}/?page=1`; + return searchTerm ? `${baseUrl}&name=${searchTerm}` : baseUrl; +}; +``` + +**WRONG - shows a diff format:** + +```suggestion +- return searchTerm ? `${baseUrl}&name=${searchTem}` : baseUrl; ++ return searchTerm ? `${baseUrl}&name=${searchTerm}` : baseUrl; +``` + +The suggestion block replaces ONLY the line you commented on. Put ONLY the corrected version of that single line. + +## Summary Format + +Use this EXACT format for the summary comment. ALWAYS start with `` marker. + +### When Issues Found: + +```markdown + + +## Code Review Summary + +**Status:** X Issues Found | **Recommendation:** Address before merge + +### Overview + +| Severity | Count | +| ---------- | ----- | +| CRITICAL | X | +| WARNING | X | +| SUGGESTION | X | + +
+Issue Details (click to expand) + +#### CRITICAL + +| File | Line | Issue | +| ------------- | ---- | ----------- | +| `src/file.ts` | 42 | Description | + +
+ +
+Files Reviewed (X files) + +- `src/file.ts` - X issues + +
+``` + +### When No Issues Found: + +```markdown + + +## Code Review Summary + +**Status:** No Issues Found | **Recommendation:** Merge + +
+Files Reviewed (X files) + +- `src/file.ts` +- `src/other.ts` + +
+``` From d19028e5bcd57ea174c63a8671e5fe4e79badcd4 Mon Sep 17 00:00:00 2001 From: Alex Alecu Date: Fri, 15 May 2026 12:01:16 +0300 Subject: [PATCH 2/2] docs(review): improve summary guidance --- REVIEW.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/REVIEW.md b/REVIEW.md index 272ac33242..758a99e35c 100644 --- a/REVIEW.md +++ b/REVIEW.md @@ -102,6 +102,10 @@ Use this EXACT format for the summary comment. ALWAYS start with `