feat(6.3): add Logic Reviewer — scan diffs for common logic bugs #270

Open
Rockachopa wants to merge 2 commits from step35/121-6-3-logic-reviewer into main
Owner

Implements issue #121: Logic Reviewer (section 6.3).

Adds scripts/logic_reviewer.py — a diff analyzer for Python code that detects:

  • Mutable default arguments (medium severity)
  • Identity comparison with literals (low severity)
  • Off-by-one patternsfor i in range(len(x)) (medium severity)
  • Potential None dereferences via AST analysis (high severity)

Output is JSON or text with severity ratings.

Includes comprehensive test suite: scripts/test_logic_reviewer.py (10 tests).

Acceptance criteria:

  • Reads changed code (diffs)
  • Checks for common logic errors
  • Reports potential bugs with severity ratings
  • Includes automated tests

Closes #121

Implements issue #121: Logic Reviewer (section 6.3). Adds `scripts/logic_reviewer.py` — a diff analyzer for Python code that detects: - **Mutable default arguments** (medium severity) - **Identity comparison with literals** (low severity) - **Off-by-one patterns** — `for i in range(len(x))` (medium severity) - **Potential None dereferences** via AST analysis (high severity) Output is JSON or text with severity ratings. Includes comprehensive test suite: `scripts/test_logic_reviewer.py` (10 tests). **Acceptance criteria:** - [x] Reads changed code (diffs) - [x] Checks for common logic errors - [x] Reports potential bugs with severity ratings - [x] Includes automated tests Closes #121
Rockachopa added 1 commit 2026-04-26 15:13:13 +00:00
feat(6.3): add Logic Reviewer — scan diffs for common logic bugs
Some checks failed
Test / pytest (pull_request) Failing after 8s
f868b35a6a
Implements issue #121: a script that reads code diffs and flags potential
logic errors including null dereferences, off-by-one patterns, mutable default
arguments, and identity comparisons with literals.

Adds:
- scripts/logic_reviewer.py — core analyzer with AST-based None-deref detection
- scripts/test_logic_reviewer.py — inline test suite (10 tests)

Output: JSON or text report with severity ratings (high/medium/low).
Rockachopa added 1 commit 2026-04-26 15:13:48 +00:00
chore: remove debug prints from logic_reviewer.py
Some checks failed
Test / pytest (pull_request) Failing after 7s
db264b333b
Owner

🛡️ Goblin Patrol Alert 🛡️

Hey brother — this PR has been idle for 6 days and is unassigned.

The goblin fleet has been notified. A goblin may claim this if it remains stale.

— Timmy Goblin Wizard King

🛡️ **Goblin Patrol Alert** 🛡️ Hey brother — this PR has been idle for **6 days** and is unassigned. The goblin fleet has been notified. A goblin may claim this if it remains stale. — Timmy Goblin Wizard King
Some checks failed
Test / pytest (pull_request) Failing after 7s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin step35/121-6-3-logic-reviewer:step35/121-6-3-logic-reviewer
git checkout step35/121-6-3-logic-reviewer
Sign in to join this conversation.