Private
Public Access
0
0
Files
manual_slop/tests
ed 142d04749d test(app_controller): scaffold tests/test_app_controller_result.py with 5 Result-pattern tests
Adds 5 tests to lock in the data-oriented error handling contract for
src/app_controller.py:

1. test_offload_entry_payload_returns_dict
   - Shape contract: _offload_entry_payload returns a dict.

2. test_migrated_method_returns_result_on_success
   - Pattern template: methods migrated to Result[T] return Result[None]
     with no errors on the success path. Currently FAILS because
     _handle_custom_callback returns None implicitly.

3. test_migrated_method_returns_result_with_error_on_failure
   - Pattern template: methods migrated to Result[T] return Result
     with errors when the underlying call raises. Currently FAILS for
     same reason.

4. test_app_controller_does_not_use_broad_except
   - Static AST check: no 'except Exception:' clauses left in
     src/app_controller.py after migration. Currently FAILS (32 sites).

5. test_offload_entry_payload_preserves_unchanged_payload
   - Verifies the no-op path for non-tool entries.

The 3 currently-failing tests will turn green as the 32 INTERNAL_BROAD_CATCH
sites are migrated across Phase 2's 4 batches. The 2 currently-passing
tests verify the existing shape contract.

Refs: spec.md FR6, plan.md Task 2.1
2026-06-18 19:42:01 -04:00
..