ed
5c871dacac
refactor(mcp_client): obliterate legacy _resolve_and_check wrapper; migrate 5 callers to _resolve_and_check_result (Phase 3)
...
Phase 3 (1 of 9 cruft sites obliterated):
The legacy wrapper _resolve_and_check(raw_path) returned tuple[Path|None, str],
dropping the structured ErrorInfo from _resolve_and_check_result. Callers in
dispatch_tool_call (py_remove_def, py_add_def, py_move_def, py_region_wrap) used
the pattern 'p, err = _resolve_and_check(path); if err: return err' which is
exactly the false drain the user wants obliterated.
Migration:
- DELETED: _resolve_and_check wrapper (lines 175-188 in src/mcp_client.py)
- UPDATED: 5 callers in dispatch_tool_call now call _resolve_and_check_result
directly with .ok check + NilPath check + structured error routing
- UPDATED: 4 test files that monkey-patched _resolve_and_check to mock the
Result helper instead:
- test_mcp_ts_integration.py (1 mock)
- test_ts_c_tools.py (2 mocks)
- test_ts_cpp_tools.py (8 mocks)
- test_cruft_removal.py (NEW; 4 tests including the wrapper-obliterated
invariant + the audit-script-finds-zero invariant + 2 dispatch tests)
Test result: 51/51 pass (31 baseline + 16 heuristic + 4 cruft).
Audit gate: src/mcp_client.py --strict exits 0 (no new violations introduced).
Baseline audit: --include-baseline --strict exits 1 only due to 4 pre-existing
non-baseline INTERNAL_RETHROW sites in outline_tool.py / warmup.py /
vendor_capabilities.py (out of scope per spec).
The wrapper IS DELETED. No pass-through. No backward compat. The dead code dies.
2026-06-20 19:48:00 -04:00
..
2026-06-20 19:41:48 -04:00
2026-06-20 16:28:02 -04:00
2026-06-08 00:46:12 -04:00
2026-06-08 00:33:21 -04:00
2026-06-19 10:59:18 -04:00
2026-06-08 00:47:21 -04:00
2026-06-18 12:09:00 -04:00
2026-06-17 00:38:29 -04:00
2026-06-17 00:38:29 -04:00
2026-06-17 00:38:29 -04:00
2026-06-15 13:54:57 -04:00
2026-06-11 14:48:03 -04:00
2026-06-13 18:05:12 -04:00
2026-06-17 00:32:33 -04:00
2026-06-17 00:38:29 -04:00
2026-06-08 20:46:41 -04:00
2026-06-08 17:49:34 -04:00
2026-06-08 15:19:30 -04:00
2026-06-07 19:54:17 -04:00
2026-06-08 20:46:41 -04:00
2026-06-07 10:20:17 -04:00
2026-06-08 10:13:07 -04:00
2026-06-06 22:02:35 -04:00
2026-06-08 23:45:25 -04:00
2026-06-19 14:25:53 -04:00
2026-06-19 12:40:26 -04:00
2026-06-19 19:13:20 -04:00
2026-06-19 16:24:01 -04:00
2026-06-08 23:45:25 -04:00
2026-06-08 20:46:41 -04:00
2026-06-07 19:54:17 -04:00
2026-06-07 10:23:45 -04:00
2026-06-07 10:54:51 -04:00
2026-06-17 18:53:25 -04:00
2026-06-18 09:37:28 -04:00
2026-06-20 11:59:20 -04:00
2026-06-07 15:24:57 -04:00
2026-06-20 01:47:23 -04:00
2026-06-07 19:54:17 -04:00
2026-06-20 12:15:15 -04:00
2026-06-08 00:41:20 -04:00
2026-06-08 01:14:12 -04:00
2026-06-08 00:27:04 -04:00
2026-06-09 17:01:14 -04:00
2026-06-09 16:40:18 -04:00
2026-06-17 19:15:51 -04:00
2026-06-17 00:29:21 -04:00
2026-06-17 00:33:36 -04:00
2026-06-09 18:42:53 -04:00
2026-06-17 22:38:17 -04:00
2026-06-18 12:09:00 -04:00
2026-06-17 23:15:57 -04:00
2026-06-17 22:38:17 -04:00
2026-06-17 00:38:29 -04:00
2026-06-20 19:48:00 -04:00
2026-06-17 00:38:29 -04:00
2026-06-07 19:54:17 -04:00
2026-06-15 18:21:58 -04:00
2026-06-18 17:55:05 -04:00
2026-06-07 21:21:38 -04:00
2026-06-19 14:25:53 -04:00
2026-06-16 19:06:09 -04:00
2026-06-07 10:10:53 -04:00
2026-06-17 00:38:29 -04:00
2026-06-17 00:38:29 -04:00
2026-06-17 00:38:29 -04:00
2026-06-15 14:15:52 -04:00
2026-06-07 21:21:38 -04:00
2026-06-20 17:54:48 -04:00
2026-06-15 13:04:45 -04:00
2026-06-17 00:38:29 -04:00
2026-06-09 15:37:47 -04:00
2026-06-20 02:26:42 -04:00
2026-06-07 14:43:36 -04:00
2026-06-07 19:54:17 -04:00
2026-06-19 12:36:21 -04:00
2026-06-19 09:40:01 -04:00
2026-06-07 19:54:17 -04:00
2026-06-06 21:29:03 -04:00
2026-06-08 15:19:30 -04:00
2026-06-17 00:38:29 -04:00
2026-06-17 00:38:29 -04:00
2026-06-07 19:54:17 -04:00
2026-06-17 22:42:10 -04:00
2026-06-17 22:42:10 -04:00
2026-06-08 17:51:39 -04:00
2026-06-07 19:54:17 -04:00
2026-06-07 01:34:48 -04:00
2026-06-15 09:41:39 -04:00
2026-06-09 15:37:47 -04:00
2026-06-17 00:38:29 -04:00
2026-06-15 11:04:46 -04:00
2026-06-09 15:42:00 -04:00
2026-06-18 14:26:12 -04:00
2026-06-08 21:17:54 -04:00
2026-06-15 13:52:38 -04:00
2026-06-15 13:25:31 -04:00
2026-06-15 18:27:40 -04:00
2026-06-07 21:21:38 -04:00
2026-06-12 18:07:16 -04:00
2026-06-20 19:48:00 -04:00
2026-06-13 18:57:44 -04:00
2026-06-07 19:54:17 -04:00
2026-06-07 17:57:36 -04:00
2026-06-10 09:16:46 -04:00
2026-06-07 10:01:40 -04:00
2026-06-07 19:54:17 -04:00
2026-06-18 14:40:04 -04:00
2026-06-13 17:50:43 -04:00
2026-06-17 00:38:29 -04:00
2026-06-19 12:36:21 -04:00
2026-06-17 00:30:48 -04:00
2026-06-17 22:31:35 -04:00
2026-06-07 19:54:17 -04:00
2026-06-19 12:36:21 -04:00
2026-06-17 00:38:29 -04:00
2026-06-07 19:54:17 -04:00
2026-06-19 09:40:01 -04:00
2026-06-07 16:56:05 -04:00
2026-06-11 16:38:09 -04:00
2026-06-11 16:38:09 -04:00
2026-06-20 08:25:27 -04:00
2026-06-08 00:47:03 -04:00
2026-06-15 18:05:45 -04:00
2026-06-09 17:10:33 -04:00
2026-06-12 20:14:01 -04:00
2026-06-12 20:14:40 -04:00
2026-06-17 00:38:29 -04:00
2026-06-10 17:20:57 -04:00
2026-06-10 14:43:27 -04:00
2026-06-16 00:09:02 -04:00
2026-06-09 10:37:14 -04:00
2026-06-10 15:14:35 -04:00
2026-06-12 16:29:22 -04:00
2026-06-17 00:38:29 -04:00
2026-06-09 16:14:40 -04:00
2026-06-17 22:29:36 -04:00
2026-06-17 00:38:29 -04:00
2026-06-19 12:36:21 -04:00
2026-06-17 00:38:29 -04:00
2026-06-09 16:25:44 -04:00
2026-06-07 19:54:17 -04:00
2026-06-19 14:25:53 -04:00
2026-06-17 14:20:17 -04:00
2026-06-17 10:26:32 -04:00
2026-06-15 14:26:32 -04:00
2026-06-20 01:45:34 -04:00
2026-06-16 19:13:30 -04:00
2026-06-16 20:25:44 -04:00
2026-06-17 14:50:01 -04:00
2026-06-19 07:41:15 -04:00
2026-06-16 22:26:04 -04:00
2026-06-17 00:38:29 -04:00
2026-06-17 00:38:29 -04:00
2026-06-17 00:38:29 -04:00
2026-06-09 16:14:40 -04:00
2026-06-20 19:48:00 -04:00
2026-06-20 19:48:00 -04:00
2026-06-11 21:46:41 -04:00
2026-06-10 15:13:25 -04:00
2026-06-10 15:45:44 -04:00
2026-06-06 22:48:50 -04:00
2026-06-07 16:02:30 -04:00
2026-06-09 20:45:24 -04:00
2026-06-10 15:14:35 -04:00