From 241f5b46ffc52b7ac48ec61459a19afd132f0021 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Wed, 17 Jun 2026 18:53:44 -0400 Subject: [PATCH] conductor(plan): Mark task 1.1.1-1.1.3 (visit_Try walker fix) complete --- .../tracks/result_migration_small_files_20260617/plan.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conductor/tracks/result_migration_small_files_20260617/plan.md b/conductor/tracks/result_migration_small_files_20260617/plan.md index aed3467c..9fddf038 100644 --- a/conductor/tracks/result_migration_small_files_20260617/plan.md +++ b/conductor/tracks/result_migration_small_files_20260617/plan.md @@ -12,13 +12,13 @@ ### 1.1 Fix `visit_Try` walker bug -- [ ] **Task 1.1.1: Write failing test for the `visit_Try` walker** +- [x] **Task 1.1.1: Write failing test for the `visit_Try` walker** [eb9b8aad] - WHERE: `tests/test_audit_exception_handling_bug_fixes.py` (new file) - WHAT: A test fixture with a `try/except/except/raise` pattern where the FIRST `except` handler has a `raise` statement. The test asserts the audit classifies the first handler's raise as `INTERNAL_RETHROW` (or whatever the correct category is). - HOW: Use the `subprocess` pattern from `tests/test_audit_exception_handling_heuristics.py` (write a fixture to a temp dir, invoke the audit, parse the JSON) - COMMIT: not yet (this is the RED step; commit follows the GREEN step) -- [ ] **Task 1.1.2: Fix the `visit_Try` walker** +- [x] **Task 1.1.2: Fix the `visit_Try` walker** [eb9b8aad] - WHERE: `scripts/audit_exception_handling.py:759-784` - WHAT: The `for handler in node.handlers` loop at L771 leaves `handler` bound to the last handler. The `for child in handler.body if node.handlers else []` at L774 only walks the last handler's body. Fix: move the `for child in ...` loop INSIDE the `for handler in node.handlers` loop so each handler's body is walked. - HOW: Surgical edit. The current code is roughly: @@ -39,7 +39,7 @@ - COMMIT: `fix(scripts): visit_Try walker now visits ALL except handlers (bug from review pass ยง4.4 #1)` - GIT NOTE: Per-site count delta (the `src/rag_engine.py:31` raise is now in the findings; expected 5-15 new INTERNAL_RETHROW findings across the codebase) -- [ ] **Task 1.1.3: Verify the fix doesn't break existing tests** +- [x] **Task 1.1.3: Verify the fix doesn't break existing tests** [eb9b8aad] - WHERE: `tests/test_audit_exception_handling_heuristics.py` + the 11 test tiers - WHAT: Run the existing 10 heuristic tests + the full test suite to verify no regression - HOW: `uv run pytest tests/test_audit_exception_handling_heuristics.py -v` + `uv run python scripts/run_tests_batched.py`