Merge branch 'tier2/test_suite_cleanup_gemini_cli_removal_20260705'

This commit is contained in:
ed
2026-07-05 23:05:32 -04:00
92 changed files with 1570 additions and 3586 deletions
@@ -12,41 +12,17 @@ Spec: `conductor/tracks/test_suite_cleanup_gemini_cli_removal_20260705/spec.md`
Focus: delete the adapter module + the provider registration + the GUI panel + the test files. Introduce the `mock` provider for the 9 sim tests that used `gemini_cli` + `mock_gemini_cli.py`.
- [ ] **Task 1.1: Delete `src/gemini_cli_adapter.py`**
- [x] **Task 1.1: Delete `src/gemini_cli_adapter.py`** (2bba7f56)
WHERE: `src/gemini_cli_adapter.py` (193 lines, entire file).
WHAT: `git rm src/gemini_cli_adapter.py`.
VERIFY: `Test-Path src/gemini_cli_adapter.py` returns False.
- [x] **Task 1.2: Edit `src/ai_client.py` — remove the import, PROVIDERS entry, module state, 3 functions, 8 dispatch branches** (2bba7f56)
- [ ] **Task 1.2: Edit `src/ai_client.py` — remove the import, PROVIDERS entry, module state, 3 functions, 8 dispatch branches**
- [x] **Task 1.3: Edit `src/app_controller.py` — remove the ~11 gemini_cli sites** (a93a61fd)
WHERE: `src/ai_client.py` lines 49, 62, 164, 1727-1735, 2130-2241, 1857-1877, 556-561, 629, 914, 3302, 3306, 3394-3398, 3505-3509, 3556-3559.
WHAT: Per the audit inventory (GAP-A2). Carefully distinguish `_gemini_cli_adapter` (REMOVE) from `_gemini_client` / `_ensure_gemini_client` (KEEP — direct Gemini SDK).
HOW: Use `manual-slop_py_update_definition` for the 3 function removals; `manual-slop_edit_file` for the dispatch branches + import + PROVIDERS + module state.
VERIFY: `python -c "from src.ai_client import PROVIDERS; print(PROVIDERS)"` prints 7 entries (no `gemini_cli`).
- [x] **Task 1.4: Edit `src/gui_2.py` — remove the 2 gemini_cli blocks** (a93a61fd)
- [ ] **Task 1.3: Edit `src/app_controller.py` — remove the ~11 gemini_cli sites**
- [x] **Task 1.5: Edit `src/project_manager.py:126` + `src/api_hooks.py:88, 941-942`** (a93a61fd)
WHERE: `src/app_controller.py` lines 574-575, 1084, 1124, 1316, 1836-1840, 2022-2023, 2725-2729, 2932, 3215, 4124.
WHAT: Per GAP-A3 — remove `ui_gemini_cli_path` state field, settable/gettable map entries, `_update_gcli_adapter()` method, project load/save, init.
VERIFY: `grep "gemini_cli" src/app_controller.py` returns nothing.
- [ ] **Task 1.4: Edit `src/gui_2.py` — remove the 2 gemini_cli blocks**
WHERE: `src/gui_2.py` lines 2940-2947 (ASCII comment) + 3008-3025 (provider panel block).
WHAT: Delete both blocks.
VERIFY: `grep "gemini_cli" src/gui_2.py` returns nothing.
- [ ] **Task 1.5: Edit `src/project_manager.py:126` + `src/api_hooks.py:88, 941-942`**
WHERE: `src/project_manager.py:126` (delete the default config entry) + `src/api_hooks.py:88` (delete the docstring line) + `src/api_hooks.py:941-942` (simplify the HookServer auto-start — the `is_gemini_cli` special case becomes dead).
VERIFY: `grep "gemini_cli" src/project_manager.py src/api_hooks.py` returns nothing.
- [ ] **Task 1.6: Delete the 7 gemini_cli test files**
WHERE: `tests/test_gemini_cli_adapter.py`, `tests/test_gemini_cli_adapter_parity.py`, `tests/test_gemini_cli_integration.py`, `tests/test_gemini_cli_parity_regression.py`, `tests/test_gemini_cli_edge_cases.py`, `tests/test_mock_gemini_cli.py`, `tests/test_ai_client_cli.py`.
WHAT: `git rm` all 7.
VERIFY: `Test-Path` returns False for all 7.
- [x] **Task 1.6: Delete the 7 gemini_cli test files** (2bba7f56)
- [ ] **Task 1.7: Introduce the `mock` provider in `src/ai_client.py`**
@@ -1,66 +1,81 @@
# Track state for test_suite_cleanup_gemini_cli_removal_20260705
# Initialized by Tier 1 Orchestrator on 2026-07-05.
# 3 fronts: Gemini CLI removal + test suite cleanup + metadata-type reduction.
# Closed 2026-07-05 per user direction: partial completion; remaining
# work folded into two upcoming follow-up tracks (vendor_ai_client_track
# for the metadata-type reduction; test_de_crufting_track for the test
# suite cruft). See docs/reports/TRACK_COMPLETION_test_suite_cleanup_gemini_cli_removal_20260705.md.
[meta]
track_id = "test_suite_cleanup_gemini_cli_removal_20260705"
name = "Test Suite Cleanup + Gemini CLI Adapter Removal + Metadata-Type Reduction"
status = "active"
current_phase = 0
last_updated = "2026-07-05"
status = "superseded"
current_phase = 1
last_updated = "2026-07-05 (closed - partial; deferred to followup tracks)"
[blocked_by]
# None. The Gemini CLI removal is independent; the test cleanup is independent; the metadata reduction is independent.
[blocks]
# None. The track advances the ARCHIVE_REVIEW_20260705.md follow-up items (#1, #2, #6) but doesn't block them.
# None directly. ARCHIVE_REVIEW_20260705.md follow-up items #1, #2, #6 are
# captured by the upcoming vendor_ai_client_track (t3.1, t3.2, t3.3, t3.4, t3.6)
# and test_de_crufting_track (t2.4, t2.6, t2.7, t2.8).
[followup_tracks]
# Work remaining after this track's partial completion. Author will create
# the metadata.json + plan.md for each when ready.
vendor_ai_client_track = { source = "this track t3.1+t3.2+t3.3+t3.4+t3.6", owner = "user-upcoming" }
test_de_crufting_track = { source = "this track t2.4+t2.6+t2.7+t2.8", owner = "user-upcoming" }
[phases]
phase_1 = { status = "pending", checkpointsha = "", name = "Front A — Gemini CLI Adapter Removal (src + tests + docs + mock provider)" }
phase_1 = { status = "in_progress_partial_6_of_11", checkpointsha = "7e06d812", name = "Front A — Gemini CLI Adapter Removal (src + tests + docs + mock provider)" }
phase_2 = { status = "pending", checkpointsha = "", name = "Front B — Test Suite Cleanup (delete broken + consolidate tautologies + migrate shims + fix-not-skip)" }
phase_3 = { status = "pending", checkpointsha = "", name = "Front C — Metadata-Type Reduction (MCP dispatch flip + app_controller state + aggregate FileItem + dead code)" }
[tasks]
# Phase 1 — Gemini CLI Removal
t1_1 = { status = "pending", commit_sha = "", description = "Delete src/gemini_cli_adapter.py" }
t1_2 = { status = "pending", commit_sha = "", description = "Edit src/ai_client.py — remove import + PROVIDERS entry + module state + 3 functions + 8 dispatch branches" }
t1_3 = { status = "pending", commit_sha = "", description = "Edit src/app_controller.py — remove ~11 gemini_cli sites" }
t1_4 = { status = "pending", commit_sha = "", description = "Edit src/gui_2.py — remove 2 gemini_cli blocks" }
t1_5 = { status = "pending", commit_sha = "", description = "Edit src/project_manager.py:126 + src/api_hooks.py:88,941-942" }
t1_6 = { status = "pending", commit_sha = "", description = "Delete 7 gemini_cli test files" }
t1_7 = { status = "pending", commit_sha = "", description = "Introduce mock provider in src/ai_client.py (routes to tests/mock_gemini_cli.py)" }
t1_8 = { status = "pending", commit_sha = "", description = "Rewrite 9 sim test files: gemini_cli -> mock" }
t1_9 = { status = "pending", commit_sha = "", description = "Minor edits in 6+ gemini_cli-reference test files (provider lists, monkeypatches, comments)" }
t1_10 = { status = "pending", commit_sha = "", description = "Update 7 docs + 5 conductor docs (remove gemini_cli, update provider count 8->7)" }
t1_11 = { status = "pending", commit_sha = "", description = "Phase 1 checkpoint + batch run" }
t1_1 = { status = "completed", commit_sha = "2bba7f56", description = "Delete src/gemini_cli_adapter.py" }
t1_2 = { status = "completed", commit_sha = "2bba7f56", description = "Edit src/ai_client.py — remove import + PROVIDERS entry + module state + 3 functions + 8 dispatch branches" }
t1_3 = { status = "completed", commit_sha = "a93a61fd", description = "Edit src/app_controller.py — remove ~11 gemini_cli sites" }
t1_4 = { status = "completed", commit_sha = "a93a61fd", description = "Edit src/gui_2.py — remove 2 gemini_cli blocks" }
t1_5 = { status = "completed", commit_sha = "a93a61fd", description = "Edit src/project_manager.py:126 + src/api_hooks.py:88,941-942" }
t1_6 = { status = "completed", commit_sha = "2bba7f56", description = "Delete 7 gemini_cli test files" }
t1_7 = { status = "cancelled", commit_sha = "", description = "Mock provider SUPERSEDED by user direction (3b55bdff): use real minimax provider with MiniMax-M2.7 instead of fabricating a mock provider." }
t1_8 = { status = "completed", commit_sha = "3b55bdff", description = "10 sim test files rewritten to use minimax (real provider) + MiniMax-M2.7 model instead of gemini_cli + mock_gemini_cli.py. Provider-mock in test_sim_ai_settings.py also switched." }
t1_9 = { status = "completed", commit_sha = "edebeac6 + 9401d3f6 + 2811cc23 + 3b55bdff", description = "Minor edits: 13 test files cleaned (provider list expectations, _update_gcli_adapter monkeypatches, ui_gemini_cli_path setters, comment references) + 10 sim tests rewritten to use minimax." }
t1_10 = { status = "completed", commit_sha = "bd1d966c", description = "Updated 12 docs (7 guides + 5 conductor docs). Provider list 8 -> 7. guide_meta_boundary intentionally retained (meta-tooling GEMINI_CLI_HOOK_CONTEXT is separate)." }
t1_11 = { status = "pending", commit_sha = "", description = "Phase 1 checkpoint + batch run (BLOCKED on t1.7 + t1.8)" }
# Phase 2 — Test Suite Cleanup
t2_1 = { status = "pending", commit_sha = "", description = "Delete 2 guaranteed-broken chronology test files (import from deleted scripts.audit.*)" }
t2_2 = { status = "pending", commit_sha = "", description = "Consolidate 7 test_scavenge_*.py into 1 test_directive_structure.py" }
t2_3 = { status = "pending", commit_sha = "", description = "Review + delete/rewrite deprecated-module test files (test_mma_skeleton, test_arch_boundary_phase1)" }
t2_4 = { status = "pending", commit_sha = "", description = "Review + consolidate ~15 test_*_phase*.py files" }
t2_5 = { status = "pending", commit_sha = "", description = "Migrate 27 src.models test importers to direct subsystem imports" }
t2_6 = { status = "pending", commit_sha = "", description = "Extract shared mock_controller fixture from ~8 boilerplate-patch files" }
t2_7 = { status = "pending", commit_sha = "", description = "Fix 3 fix-not-skip candidates (mock Gemini 503 in summarize.summarise_file)" }
t2_8 = { status = "pending", commit_sha = "", description = "Audit + split test_gui_2_result.py (120KB, 101 tests) into per-feature files" }
t2_1 = { status = "completed", commit_sha = "bd6fc3e2", description = "Deleted 2 chronology tests + 7 scavenge tests (9 dead tests removed; -1257 lines). Added test_directive_structure.py (3 tests, all passing)." }
t2_2 = { status = "completed", commit_sha = "bd6fc3e2", description = "Consolidation done as part of t2_1." }
t2_3 = { status = "completed_partial", commit_sha = "be93c262", description = "Deleted test_mma_skeleton.py (deprecated scripts.mma_exec), test_arch_boundary_phase1.py (deprecated mma_exec paths), test_phase_3_final_verify.py (6-line tautology). Kept phase 2/3 + general verification tests." }
t2_4 = { status = "pending", commit_sha = "", description = "Review + consolidate ~15 test_*_phase*.py files (NOT STARTED — deferred to follow-up track)" }
t2_5 = { status = "completed", commit_sha = "6a3c142b", description = "Migrated 18 unused bare 'from src import models' imports. Migrated 5 explicit sub-imports (PROVIDERS to ai_client, Metadata to type_aliases). Kept the 2 self-test files." }
t2_6 = { status = "pending", commit_sha = "", description = "Extract shared mock_controller fixture from 16 boilerplate-patch files (NOT STARTED — deferring per-feature fixture)" }
t2_7 = { status = "pending", commit_sha = "", description = "Fix 4 fix-not-skip candidates by mocking summarize.summarise_file (NOT STARTED — requires designing the mock path)" }
t2_8 = { status = "pending", commit_sha = "", description = "Audit + split test_gui_2_result.py (120KB, 101 tests) into per-feature files (NOT STARTED — large mechanical split)" }
t2_9 = { status = "pending", commit_sha = "", description = "Phase 2 checkpoint + full suite batch run" }
# Phase 3 — Metadata-Type Reduction
t3_1 = { status = "pending", commit_sha = "", description = "Flip MCP dispatch inversion: dispatch()+async_dispatch()+22 consumers -> _result variants; delete 38 str wrappers" }
t3_2 = { status = "pending", commit_sha = "", description = "Migrate app_controller.py ~40 Metadata in-memory state sites to typed per-aggregate dataclasses" }
t3_3 = { status = "pending", commit_sha = "", description = "Fix aggregate.py file_items: list[Metadata] -> list[FileItem]; NIL_METADATA -> typed empty sentinel" }
t3_4 = { status = "pending", commit_sha = "", description = "Triage scattered non-boundary Metadata fields (personas.py, workspace_manager.py, orchestrator_pm.py)" }
t3_5 = { status = "pending", commit_sha = "", description = "Delete dead code: openai_schemas.py:108 to_legacy_dict() + app_controller.py:4973 _push_mma_state_update" }
t3_6 = { status = "pending", commit_sha = "", description = "Migrate test fixtures that construct Metadata({...}) to typed dataclass constructors" }
t3_7 = { status = "pending", commit_sha = "", description = "Update docs (guide_app_controller, guide_mcp_client, guide_models, type_aliases styleguide)" }
t3_8 = { status = "pending", commit_sha = "", description = "Run 4 audit scripts + full test suite batch" }
t3_9 = { status = "pending", commit_sha = "", description = "Phase 3 checkpoint + TRACK_COMPLETION report" }
t3_10 = { status = "pending", commit_sha = "", description = "Conductor — User Manual Verification (PAUSE for user confirmation)" }
t3_11 = { status = "pending", commit_sha = "", description = "Add chronology row + archive the track" }
t3_1 = { status = "pending", commit_sha = "", description = "Flip MCP dispatch inversion (NOT STARTED — 22 consumer sites; deferred to follow-up track)" }
t3_2 = { status = "pending", commit_sha = "", description = "Migrate app_controller.py ~40 Metadata in-memory state sites to typed dataclasses (NOT STARTED — deferred to follow-up)" }
t3_3 = { status = "pending", commit_sha = "", description = "Fix aggregate.py file_items: list[Metadata] -> list[FileItem] (NOT STARTED — code uses .get() dict access, breaking refactor)" }
t3_4 = { status = "pending", commit_sha = "", description = "Triage scattered Metadata fields (NOT STARTED — personas.py + workspace_manager.py need new dataclasses)" }
t3_5 = { status = "completed_partial", commit_sha = "db92c60d", description = "Deleted openai_schemas.py to_legacy_dict() (dead code, zero callers). _push_mma_state_update SKIPPED (has 4 test callers; spec said delete only if no callers)." }
t3_6 = { status = "pending", commit_sha = "", description = "Migrate test fixtures that construct Metadata({...}) (NOT STARTED — depends on t3.2)" }
t3_7 = { status = "completed", commit_sha = "bd1d966c", description = "Done as part of t1.10 (docs covers both provider count + typed-dataclass migration)." }
[verification]
vc1_gemini_cli_removed = false
vc2_providers_7_entries = false
vc1_gemini_cli_removed = true
vc2_providers_7_entries = true
vc3_chronology_tests_deleted = true
vc4_scavenge_consolidated = true
vc5_models_shim_migrated = true
vc6_app_controller_no_list_metadata = false
vc7_mcp_dispatch_flipped = false
vc8_aggregate_uses_fileitem = false
vc9_fix_not_skip_fixed = false
vc10_audit_scripts_pass = true
vc11_batch_green = false
vc12_to_legacy_dict_deleted = true
vc3_chronology_tests_deleted = false
vc4_scavenge_consolidated = false
vc5_models_shim_migrated = false