@dev submitted PR#42 "feat(tasks): add task filtering by status". You're @lead reviewing it.
โฑ ~15 min ยท Hands-on
Your teammate @dev has opened PR#42 with a new task filtering feature. The PR adds a FilterService, updates TaskController, and includes new tests. You're @lead โ it's your job to review before this merges to develop.
Before running any commands, read the diff and understand what changed. Don't jump to nitpicking โ understand intent first.
Files changed: 4 files, +187 lines, -12 lines
src/services/FilterService.java โ NEW (92 lines)src/controllers/TaskController.java โ modified (+14 lines)test/services/FilterServiceTest.java โ NEW (68 lines)test/controllers/TaskControllerTest.java โ modified (+13 lines)Use /agile-code-pr-review for a systematic, severity-classified review.
/agile-code-pr-review
PR Review โ #42 feat(tasks): add task filtering by status
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ด S0 โ BLOCKS MERGE
โโโโโโโโโโโโโโโโโโโโ
[1] SQL Injection in FilterService.java:34
String query = "SELECT * FROM tasks WHERE status = '" + status + "'";
โ User input concatenated directly into SQL. Must use parameterized query.
๐ S1 โ MUST FIX
โโโโโโโโโโโโโโโโโโโโ
[2] SRP Violation in FilterService.java
FilterService handles both filtering AND sorting (methods: filterByStatus,
filterByPriority, sortByDate, sortByPriority). These are two responsibilities.
โ Split into FilterService and SortService.
๐ก S2 โ SHOULD FIX
โโโโโโโโโโโโโโโโโโโโ
[3] Poor naming in TaskController.java:67
List<Task> data = filterService.filterByStatus(status);
โ 'data' is generic. Use 'filteredTasks' for clarity.
๐ต S3 โ NIT
โโโโโโโโโโโโโโโโโโโโ
[4] Import order in FilterService.java:1-8
Imports are not grouped (java.util mixed with org.springframework).
โ Follow project convention: java.* โ javax.* โ org.* โ com.*
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Verdict: โ CHANGES REQUESTED (1 blocker, 1 must-fix)
| Severity | Label | Action | Blocks Merge? |
|---|---|---|---|
| ๐ด S0 | Critical | Security vulnerability, data loss, crash | YES |
| ๐ S1 | Major | Design flaw, SRP violation, missing error handling | YES |
| ๐ก S2 | Minor | Naming, readability, minor improvements | No (should fix) |
| ๐ต S3 | Nit | Style, formatting, personal preference | No (optional) |
Rule: Any ๐ด S0 or ๐ S1 finding blocks the merge. ๐ก S2 should be fixed but doesn't block. ๐ต S3 is at the author's discretion.
@dev pushes fixes for each finding:
String query = "SELECT * FROM tasks WHERE status = '" + status + "'";
String query = "SELECT * FROM tasks WHERE status = ?";
PreparedStatement stmt = conn.prepareStatement(query);
stmt.setString(1, status);
@dev extracts sorting logic into a new SortService:
FilterService โ filterByStatus(), filterByPriority()SortService (new) โ sortByDate(), sortByPriority()// Before
List<Task> data = filterService.filterByStatus(status);
// After
List<Task> filteredTasks = filterService.filterByStatus(status);
@dev reorders imports to follow project convention. Quick fix, no debate needed.
@dev pushes the fixes and requests re-review. Run /agile-code-pr-review again.
/agile-code-pr-review
PR Re-Review โ #42 feat(tasks): add task filtering by status
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Previous Findings:
๐ด S0 [1] SQL Injection .............. โ
RESOLVED (parameterized query)
๐ S1 [2] SRP Violation .............. โ
RESOLVED (SortService extracted)
๐ก S2 [3] Poor naming ................ โ
RESOLVED (renamed to filteredTasks)
๐ต S3 [4] Import order ............... โ
RESOLVED (reordered)
New Findings: (none)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Verdict: โ
APPROVED โ merge to develop
With the PR approved, merge the feature branch using the agile command:
/agile-code-merge
๐ Merge โ PR #42
โโโโโโโโโโโโโโโโโโโ
Pre-merge checks:
โ
PR approved by @lead
โ
CI passing on branch
โ
No merge conflicts
โ
Branch up to date with develop
Merging: feature/task-filtering โ develop
Strategy: merge --no-ff (project convention)
Merge complete.
Branch feature/task-filtering deleted (was 7b2e4d1).
โ
PR #42 merged to develop.
The task filtering feature lands on develop with a critical SQL injection caught before it reached users. /agile-code-merge verified all pre-merge conditions, applied the project's merge strategy, and cleaned up the branch automatically. This is why code review exists.
/agile-code-pr-review for structured, severity-classified review/agile-code-merge to merge the approved PR after all blockers are resolvedWhich severity levels block a PR merge?