Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
1 change: 1 addition & 0 deletions action/build-review-prompt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ fetch_review_rules() {
- Null/undefined handling, missing error paths
- Resource leaks (connections, file handles, memory)
- Incorrect algorithm complexity for data size
- End-to-end feature functionality: verify new features work in their real execution environment

**Robustness**:
- Missing input validation at trust boundaries
Expand Down
4 changes: 3 additions & 1 deletion action/review-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ shell escaping issues. Always write to a file first, then use `--body-file`.

## When to Approve vs Request Changes

- **Request changes**: Security vulnerabilities, logic errors, correctness issues, missing error handling, resource leaks, breaking changes, violations of codebase patterns. When in doubt, request changes.
- **Request changes**: Security vulnerabilities, logic errors, correctness issues, non-functional features (core purpose doesn't work end-to-end), missing error handling, resource leaks, breaking changes, violations of codebase patterns. When in doubt, request changes.
- **Approve**: No blocking issues found after thorough review. Minor advisory suggestions are fine to include. If you include non-blocking suggestions, add `<!-- has-suggestions -->` anywhere in the review body so the feedback-addressing workflow picks them up. The marker is position-independent—it can appear at the beginning, middle, or end of the review body.
- **Comment**: Non-blocking suggestions, questions, ideas for future improvement.

**Key distinction**: A feature that doesn't work is a correctness issue, not a style issue. If the feature's core functionality is broken — not just degraded or missing edge cases — always request changes, even if the code structure looks reasonable or matches an existing pattern.

## Self-Authored PRs

When reviewing a PR authored by the same bot account, **use `--comment` instead of
Expand Down
24 changes: 22 additions & 2 deletions shared/prompts/code-review-criteria.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- Null/undefined handling, missing error paths
- Resource leaks (connections, file handles, memory)
- Incorrect algorithm complexity for data size
- **End-to-end feature functionality**: For new features, verify the feature actually works in its real execution environment, not just that the code is well-structured. Trace the full path from trigger to effect. If a feature's core functionality is broken (e.g., config is read at build time but only available at runtime), that is a blocking correctness issue regardless of code quality.

**Robustness**:
- Missing input validation at trust boundaries
Expand Down Expand Up @@ -48,8 +49,27 @@
1. **Examine every changed file systematically**. Do not skim.
2. **Read surrounding context**—check how changed code integrates with the rest of the codebase. Use file reads and grep liberally.
3. **Trace data flow** from input to output, especially for security-sensitive paths.
4. **Consider edge cases** the author may not have tested.
5. **Research when uncertain**—look up library behavior, check documentation, verify assumptions.
4. **Verify end-to-end functionality**: For new features, trace the complete execution path in the real deployment environment. Check that config files, environment variables, and dependencies are actually available where the code runs. A feature that reads config from a path that doesn't exist in its runtime environment is non-functional, not just suboptimal.
5. **Consider edge cases** the author may not have tested.
6. **Research when uncertain**—look up library behavior, check documentation, verify assumptions.

### Severity Classification

**Blocking** (request changes):
- Security vulnerabilities
- Non-functional features — the feature's core purpose does not work end-to-end
- Logic errors that produce incorrect results
- Breaking changes to existing functionality
- Resource leaks or crashes

**Non-blocking** (suggestions):
- Code quality improvements (naming, structure, duplication)
- Defense-in-depth additions
- Missing edge case handling that doesn't affect the core feature
- Documentation gaps
- Style or convention deviations not caught by linters

**Beware of false analogies**: When comparing new code to existing patterns, verify the analogy holds at the execution-model level. Two features may look structurally similar in config but have completely different execution paths. If the existing pattern works via mechanism A but the new code relies on mechanism B that doesn't exist, the comparison is invalid — classify based on actual functionality, not superficial similarity.

### Skip

Expand Down
Loading