Skip to content
Prev Previous commit
Next Next commit
Add pre-commit review to invetigate-test-failure command
  • Loading branch information
moreal committed Jan 30, 2026
commit 2712f2b2b391d24db69afd4aad1413ae7be0ddc0
12 changes: 10 additions & 2 deletions .claude/commands/investigate-test-failure.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
allowed-tools: Bash(python3:*), Bash(cargo run:*), Read, Grep, Glob, Bash(git add:*), Bash(git commit:*)
allowed-tools: Bash(python3:*), Bash(cargo run:*), Read, Grep, Glob, Bash(git add:*), Bash(git commit:*), Bash(cargo fmt:*), Bash(git diff:*), Task
---

# Investigate Test Failure
Expand All @@ -21,9 +21,17 @@ Investigate why a specific test is failing and determine if it can be fixed or n
- Document the expected output

3. **Determine fix feasibility**
- **Simple fix** (import issues, small logic bugs): Fix and commit
- **Simple fix** (import issues, small logic bugs): Fix code → Run `cargo fmt --all` → Pre-commit review → Commit
- **Complex fix** (major unimplemented features): Collect issue info and report to user

**Pre-commit review process**:
- Run `git diff` to see the changes
- Use Task tool with `general-purpose` subagent to review:
- Compare implementation against cpython/ source code
- Verify the fix aligns with CPython behavior
- Check for any missed edge cases
- Proceed to commit only after review passes

4. **For complex issues - Collect issue information**
Following `.github/ISSUE_TEMPLATE/report-incompatibility.md` format:

Expand Down