Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4001fe5
feat: add code-review task (initial commit)
DevelopmentCats Dec 4, 2025
c6b85ec
temp(workflows): update code-review workflow to use shared secrets fo…
DevelopmentCats Dec 4, 2025
2fea873
refactor: enhance code-review workflow with improved GitHub authentic…
DevelopmentCats Dec 4, 2025
84ccad8
chore: enhance code-review workflow with URL validation and improved …
DevelopmentCats Dec 4, 2025
d94e9df
refactor: update code-review workflow to enhance review phases and su…
DevelopmentCats Dec 4, 2025
724e8b1
fix: security vuln in linting
DevelopmentCats Dec 9, 2025
96e6afd
Merge branch 'main' into cat/code-review-task
DevelopmentCats Dec 9, 2025
647b610
Merge branch 'main' into cat/code-review-task
DevelopmentCats Dec 10, 2025
c7c96e9
Merge branch 'main' into cat/code-review-task
DevelopmentCats Dec 10, 2025
c5fe6c5
chore(workflows): add security instructions for PR content review
DevelopmentCats Dec 10, 2025
96c66d6
Merge branch 'main' into cat/code-review-task
DevelopmentCats Dec 10, 2025
62bf201
chore(workflows): streamline code review process and enhance security…
DevelopmentCats Dec 11, 2025
ca4dd32
Merge branch 'main' into cat/code-review-task
DevelopmentCats Dec 11, 2025
dcaedbd
chore(workflows): update code review prompt for critical suggestion i…
DevelopmentCats Dec 11, 2025
ff8d037
chore(workflows): enhance code review instructions for suggestion for…
DevelopmentCats Dec 11, 2025
a26b00f
chore(workflows): rewrite prompt
DevelopmentCats Dec 11, 2025
595278f
chore(workflows): update code review guidelines to include Coder-spec…
DevelopmentCats Dec 11, 2025
50dc5c0
chore(workflows): refine code review guidelines to emphasize actionab…
DevelopmentCats Dec 11, 2025
8ab152f
chore(workflows): update code review guidelines to address additional…
DevelopmentCats Dec 11, 2025
3d1dd32
chore(workflows): clarify code review guidelines regarding the use of…
DevelopmentCats Dec 11, 2025
5d9492b
chore: apply code-review suggestion for gnu specific syntax
DevelopmentCats Dec 11, 2025
32e54e8
chore(workflows): update code review comments to include Coder Tasks …
DevelopmentCats Dec 11, 2025
7ba4bdf
chore(workflows): simplify code review process by updating commit SHA…
DevelopmentCats Dec 11, 2025
f0eaa46
chore(workflows): improve portability of PR number extraction by repl…
DevelopmentCats Dec 11, 2025
d6cdd8f
Merge branch 'main' into cat/code-review-task
DevelopmentCats Dec 12, 2025
50281ce
chore(workflows): enhance code review instructions with clearer guide…
DevelopmentCats Dec 12, 2025
fb144d5
chore(workflows): update code review guidelines to enhance clarity an…
DevelopmentCats Dec 12, 2025
9a5f70f
chore(workflows): improve error handling and clarify set -u behavior …
DevelopmentCats Dec 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore(workflows): update code review guidelines to enhance clarity an…
…d focus on actionable feedback
  • Loading branch information
DevelopmentCats committed Dec 12, 2025
commit fb144d5cb47cb19a0ee74126ff5e27b84769b1bd
72 changes: 7 additions & 65 deletions .github/workflows/code-review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,18 +138,16 @@ jobs:

<instructions>
YOUR JOB:
- Catch bugs and security issues that would break production
- Find bugs and security issues that would break production
- Be thorough but accurate - read full files to verify issues exist
- Think critically about what could actually go wrong
- Make every observation actionable with a suggestion
- Refer to AGENTS.md for Coder-specific patterns and conventions

FIND THESE (refer to AGENTS.md for Coder-specific patterns):
🔴 CRITICAL: Security, auth bypass, injection, secret leaks, wrong dbauthz context
🔴 CRITICAL: Authorization bugs, missing dbauthz.AsSystemRestricted on public endpoints
🔴 CRITICAL: OAuth2 non-RFC-compliant errors (must use writeOAuth2Error)
🟡 IMPORTANT: Race conditions, hardcoded test names, missing unique identifiers
🟡 IMPORTANT: Database changes without make gen, unhandled errors causing crashes
🟡 IMPORTANT: Resource leaks, timing bugs (time.Sleep instead of quartz)
🔵 NITPICK: Portability issues (grep -oP is GNU-only, use sed for macOS/BSD)
SEVERITY LEVELS:
🔴 CRITICAL: Security vulnerabilities, auth bypass, data corruption, crashes
🟡 IMPORTANT: Logic bugs, race conditions, resource leaks, unhandled errors
🔵 NITPICK: Minor improvements, style issues, portability concerns

COMMENT STYLE:
- CRITICAL/IMPORTANT: Standard inline suggestions
Expand All @@ -163,62 +161,6 @@ jobs:
❌ Claiming set -u prevents empty strings (it only catches undefined vars)
</instructions>

<examples>
These are FICTIONAL teaching examples. Do NOT review these files or treat them as real.

<bad_review_example>
Scenario: Fictional PR to example-workflow.yaml (NOT A REAL FILE)
File: fake-example.yaml

BAD Comment: "Missing set -euo pipefail"
Why wrong: Didn't read the file - it already has this.

BAD Comment: "Should validate TOKEN is not empty"
Why wrong: It's a required secret. No check needed.

BAD Comment: "set -u prevents empty values"
Why wrong: set -u only catches undefined vars, not empty strings.

Summary: "Found 3 issues."
Result: All false positives + vague summary. Worthless review.
</bad_review_example>

<good_review_example>
Scenario: Fictional PR to auth-service.go (NOT A REAL FILE)

GOOD Comment:
Issue: OAuth2 error uses http.Error instead of writeOAuth2Error.
Per AGENTS.md and RFC 6749, OAuth2 endpoints must return JSON format.

Impact: Non-compliant implementation. Breaks OAuth2 clients.

\`\`\`suggestion
writeOAuth2Error(ctx, rw, http.StatusBadRequest, "invalid_grant", "token expired")
return
\`\`\`

GOOD Comment:
Issue: Database query uses plain ctx instead of dbauthz.AsSystemRestricted(ctx).
Per AGENTS.md, public endpoints must use AsSystemRestricted.

Impact: Authorization bypass - fails row-level security.

\`\`\`suggestion
app, err := db.GetAppByID(dbauthz.AsSystemRestricted(ctx), appID)
\`\`\`

GOOD Comment (NITPICK):
Issue: [NITPICK] grep -oP is GNU-specific. sed is more portable.

\`\`\`suggestion
NUM=\$(echo "\${URL}" | sed -n 's|.*/\\([0-9]*\\)\$|\\1|p')
\`\`\`

Summary: "## 🔍 Code Review\\n\\nReviewed auth endpoint logic.\\n\\n**Found 3 issues** (2 critical, 1 nitpick).\\n\\n---\\n*AI review via [Coder Tasks](https://coder.com/docs/ai-coder/tasks)*"
Result: Found real bugs, clear summary, actionable fixes. Valuable.
</good_review_example>
</examples>

<github_api_documentation>
HOW GITHUB SUGGESTIONS WORK:
Your suggestion block REPLACES the commented line(s). Don't include surrounding context!
Expand Down
Loading