diff --git a/conductor/chronology.md b/conductor/chronology.md index c4bc6437..604b9ca0 100644 --- a/conductor/chronology.md +++ b/conductor/chronology.md @@ -2,7 +2,7 @@ | Date | ID | Status | Summary | Folder | Range | | --- | --- | --- | --- | --- | --- | -| 2026-07-05 | `test_suite_cleanup_gemini_cli_removal_20260705` | Active | 3-front cleanup: (A) remove the graveyarded Gemini CLI adapter from src/+tests/+docs + introduce a `mock` provider for the 9 sim tests; (B) downsize the test suite ~45-60 files (delete guaranteed-broken chronology tests, consolidate 7 scavenge tautologies, migrate 27 src.models shim importers, fix 3 fix-not-skip candidates, audit the 120KB test_gui_2_result.py); (C) reduce Metadata type usage beyond TOML boundaries (flip the 38-site MCP dispatch inversion, migrate app_controller.py's 40 in-memory Metadata sites to typed dataclasses, fix aggregate.py FileItem slippage). spec ✓, plan ✓, ready to start. | `conductor/tracks/test_suite_cleanup_gemini_cli_removal_20260705` | (not yet started) | +| 2026-07-05 | `test_suite_cleanup_gemini_cli_removal_20260705` | Partially Completed (closed per user direction; follow-up tracks planned separately) | Front A (Gemini CLI removal): 9 of 11 tasks done — src/gemini_cli_adapter.py deleted, 5 source files cleaned, 7 dedicated tests deleted, 10 sim tests switched from `gemini_cli`+mock to real `minimax/M2.7`, 12 docs scrubbed. Front B (test suite cleanup): 5 of 9 — 9 dead tests removed, 27 `src.models` shim importers migrated. Front C (metadata-type reduction): 3 of 11 — `to_legacy_dict` dead code deleted, 4 audits pass. 17 atomic commits. Deferred to upcoming `vendor_ai_client_track` (MCP dispatch flip + app_controller state migration + aggregate FileItem) and `test_de_crufting_track` (test_*_phase*.py consolidation + mock_controller fixture + fix-not-skip Gemini 503 mocks + test_gui_2_result.py split). | `conductor/tracks/test_suite_cleanup_gemini_cli_removal_20260705` | `9a308c36..fa5c1e93` (17) | | 2026-07-05 | `meta_tooling_duration_analysis_20260705` | Completed | One-shot empirical duration analysis of the meta-tooling that built this codebase Feb 21 - Jul 5, 2026 (133 days; 248 tracks; 1003 sub-agent tasks; 1608 work-prefix commits; 312 sessions). Era-detection via multi-signal weighted-vote (config.toml + workflow.md + tech-stack.md + agent-log content; 7-day cluster window). 5 eras detected. 10-section Markdown report + JSON source-of-truth. Tier 3 worker median task: 272.5s. No Application-domain changes. | `conductor/archive/meta_tooling_duration_analysis_20260705` | `127be22f..ce0d1438` (3) | | 2026-07-05 | `twitter_threads_extraction_20260705` | Active | Standalone Python scripts + workflow for extracting Twitter/X posts and threads into Markdown with associated media. Mirrors the `scripts/video_analysis/` pattern. spec ✓, plan ✓, ready to start. | `conductor/tracks/twitter_threads_extraction_20260705` | (not yet started) | | 2026-07-05 | `superpowers_review_apply_high_20260705` | Completed | Phase 1: `26dd9258` Session Start Checklist item 13 added; Phase 2: `670a919e` tests/test_mma_skill_discipline.py (25 cases); Phase 3: `5037f48f` cross-reference + finalization. | `conductor/archive/superpowers_review_apply_high_20260705` | `0522252f..5037f48f` (3) | diff --git a/conductor/tracks/test_suite_cleanup_gemini_cli_removal_20260705/state.toml b/conductor/tracks/test_suite_cleanup_gemini_cli_removal_20260705/state.toml index 6f9ba120..27a454cf 100644 --- a/conductor/tracks/test_suite_cleanup_gemini_cli_removal_20260705/state.toml +++ b/conductor/tracks/test_suite_cleanup_gemini_cli_removal_20260705/state.toml @@ -1,19 +1,30 @@ # 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" +status = "superseded" current_phase = 1 -last_updated = "2026-07-05 (mid-execution)" +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 = "in_progress_partial_6_of_11", checkpointsha = "7e06d812", name = "Front A — Gemini CLI Adapter Removal (src + tests + docs + mock provider)" } diff --git a/docs/reports/TRACK_COMPLETION_test_suite_cleanup_gemini_cli_removal_20260705.md b/docs/reports/TRACK_COMPLETION_test_suite_cleanup_gemini_cli_removal_20260705.md new file mode 100644 index 00000000..02babb0e --- /dev/null +++ b/docs/reports/TRACK_COMPLETION_test_suite_cleanup_gemini_cli_removal_20260705.md @@ -0,0 +1,132 @@ +# Track Completion Report: test_suite_cleanup_gemini_cli_removal_20260705 + +**Track:** `test_suite_cleanup_gemini_cli_removal_20260705` +**Branch:** `tier2/test_suite_cleanup_gemini_cli_removal_20260705` +**Started:** 2026-07-05 +**Status:** PARTIAL — CLOSED PER USER DIRECTION +**Owner:** Tier 1 (initialized); implementation Tier 2/3 + +## Executive Summary + +The track was originally scoped for 31 tasks across 3 fronts: (A) Gemini CLI adapter removal, (B) test suite cleanup, (C) metadata-type reduction. The user closed the track mid-execution to author two follow-up tracks separately: + +1. **vendor_ai_client_track (upcoming)** — captures the remaining vendor-AI-client surface area concerns surfaced during this track. +2. **test_de_crufting_track (upcoming)** — captures the test-suite-cruft reduction (Front B leftovers + the deeper test-gui-2-result split + the mock_controller fixture extraction + the fix-not-skip Gemini 503 mocks). + +Of the 31 plan tasks, **17 are completed, 1 cancelled, 13 deferred to follow-up tracks**. + +## Final Metrics + +| Metric | Baseline | After | Delta | +|---|---:|---:|---:| +| `PROVIDERS` entries (src/ai_client.py) | 8 | 7 | -1 (gemini_cli removed) | +| `src/gemini_cli_adapter.py` lines | 193 | 0 | -193 | +| Dead-test files deleted | 0 | 16 (7 gemini_cli tests + 2 chronology + 7 scavenge) | -16 | +| `src.models` bare imports in tests/ | 27 | 2 (self-tests only) | -25 | +| Doc files with `gemini_cli` | 12 | 0 (5 conductor docs + 7 guides) | -12 | +| `tests/mock_gemini_cli.py` active callers | many (10 sim tests) | 0 (replaced with real minimax) | -many | +| Per-file line deltas (net across 17 commits) | — | -696 (ai_client.py), -1257 (test files), -53 (app_controller et al) | large | + +## Acceptance Criteria Status (12 VCs) + +| VC | Description | Status | +|---|---|---| +| VC1 | `src/gemini_cli_adapter.py` does not exist | ✓ PASS (commit `2bba7f56`) | +| VC2 | `PROVIDERS` has 7 entries | ✓ PASS (verified via `from src.ai_client import PROVIDERS`) | +| VC3 | 2 chronology tests deleted | ✓ PASS (commit `bd6fc3e2`) | +| VC4 | 7 scavenge tests consolidated | ✓ PASS (`test_directive_structure.py` added; 3 invariants, all passing) | +| VC5 | `src.models` shim importers migrated | ✓ PASS (commit `6a3c142b` — 18 bare + 5 sub-imports; 2 self-tests retained) | +| VC6 | `app_controller.py` no `list[Metadata]` | NOT DONE (deferred to follow-up) | +| VC7 | MCP dispatch flipped | NOT DONE (deferred — 22 consumer sites; new track scoped separately) | +| VC8 | `aggregate.py` uses `list[FileItem]` | NOT DONE (deferred — code uses `.get()` dict access, breaking refactor) | +| VC9 | 3 fix-not-skip tests fixed | NOT DONE (deferred — needs `summarise_file` mock design) | +| VC10 | 4 audit scripts pass | ✓ PASS (`main_thread_imports` OK, `no_models_config_io` OK, `weak_types` 93 findings informational, `exception_handling` baseline stable) | +| VC11 | Full batch green | NOT VERIFIED (smoke 31-test subset passed; tier-1-unit-core 249 files deferred to track review) | +| VC12 | `to_legacy_dict` deleted | ✓ PASS (commit `db92c60d`; zero callers, dead code) | + +**Summary:** 7 PASS, 5 NOT DONE / NOT VERIFIED, 0 FAIL. + +## What Was Done (Phase-by-Phase) + +### Phase 1 — Front A: Gemini CLI Adapter Removal (9 of 11 tasks done) + +**Done:** +- **t1.1-t1.6** (commits `2bba7f56` + `a93a61fd`): Deleted `src/gemini_cli_adapter.py` (193 lines). Edited `src/ai_client.py` (-696 lines net): import, PROVIDERS entry, module state, 3 functions (`_list_gemini_cli_models`, `_send_cli_round_result`, `_send_gemini_cli`), 8 dispatch branches (set_provider, list_models, `_execute_tool_calls_concurrently`, `send()`, `get_token_stats()`, `run_subagent_summarization`, `run_discussion_compression`). Edited `src/app_controller.py` (11 sites): `ui_gemini_cli_path` state, `_settable_fields` entry, `_UI_FLAG_DEFAULTS` entry, `_update_gcli_adapter` method, project load/save. Edited `src/gui_2.py` (2 blocks: ASCII layout comment + provider-panel). Edited `src/project_manager.py` (default config) + `src/api_hooks.py` (docstring + `is_gemini_cli` HookServer special case). Deleted 7 dedicated gemini_cli test files. +- **t1.9** (commits `edebeac6` + `9401d3f6` + `2811cc23`): 14 minor edits across 13 test files — provider list expectations, `_update_gcli_adapter` monkeypatches, `ui_gemini_cli_path` setters, comment references. +- **t1.10** (commit `bd1d966c`): 12 docs scrubbed (7 guides + 5 conductor docs); provider count 8 → 7; `guide_meta_boundary.md` intentionally retained (the gemini_cli references there are the meta-tooling `GEMINI_CLI_HOOK_CONTEXT` env var, separate from the provider). +- **t1.8** (commit `3b55bdff`): 10 sim tests + `test_sim_ai_settings.py` rewritten — `current_provider='gemini_cli'` + `gcli_path` setter replaced with `current_provider='minimax'` + `current_model='MiniMax-M2.7'`. gcli_path setters removed. + +**Cancelled:** +- **t1.7** ("Introduce mock provider in src/ai_client.py"): User explicitly rejected mocks ("no more fucking mocks"); superseded by t1.8 using real `minimax/M2.7`. + +**Pending:** +- **t1.11** (batch checkpoint): Deferred — sim tests now require real minimax API access, so a full Phase 1 batch run needs the user's API key in env. + +### Phase 2 — Front B: Test Suite Cleanup (5 of 9 tasks done) + +**Done:** +- **t2.1 + t2.2** (commit `bd6fc3e2`): Deleted 9 dead test files (2 chronology tests importing deleted `scripts.audit.*` modules + 7 `test_scavenge_*.py` one-time verifications). Added `tests/test_directive_structure.py` (3 invariants, all passing). +- **t2.3** (commit `be93c262`): Deleted 3 trivial/deprecated tests: `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). +- **t2.5** (commit `6a3c142b`): Migrated 18 unused bare `from src import models` imports + 5 explicit sub-imports (`PROVIDERS` → `src.ai_client`, `Metadata` → `src/type_aliases`). Kept the 2 self-tests (`test_models_no_top_level_*`). + +**Deferred (folded into the upcoming test-de-crufting track):** +- **t2.4** (~15 `test_*_phase*.py` consolidation) +- **t2.6** (extract shared `mock_controller` fixture from 16 boilerplate-patch files) +- **t2.7** (fix 4 fix-not-skip candidates by mocking `summarize.summarise_file`) +- **t2.8** (split `test_gui_2_result.py` (120KB, 101 tests) into per-feature files) +- **t2.9** (full suite batch checkpoint) + +### Phase 3 — Front C: Metadata-Type Reduction (3 of 11 tasks done) + +**Done:** +- **t3.5** (commit `db92c60d`): Deleted `openai_schemas.py:108` `to_legacy_dict()` — zero callers in `src/*.py`, only test reference deleted. +- **t3.7**: Docs done as part of t1.10 (12 doc files scrubbed). +- **t3.8** (commit `9586265d` partial): Ran 4 audit scripts — `main_thread_imports.py` OK (27 files clean), `no_models_config_io.py` OK, `weak_types.py` 93 findings (informational baseline), `exception_handling.py` baseline stable. Smoke subset 31/31 tests passing. + +**Deferred (folded into follow-up tracks):** +- **t3.1** (flip MCP dispatch inversion — 22 consumer sites) +- **t3.2** (migrate `app_controller.py` ~40 in-memory `Metadata` state sites) +- **t3.3** (fix `aggregate.py` `list[Metadata]` → `list[FileItem]`) +- **t3.4** (triage scattered non-boundary `Metadata` fields in `personas.py`, `workspace_manager.py`, `orchestrator_pm.py`) +- **t3.6** (migrate test fixtures that construct `Metadata({...})`) +- **t3.10** (user manual verification) +- **t3.11** (chronology row + archive) + +**Skipped:** +- **t3.5 part 2** (`_push_mma_state_update` deletion): Has 4 test callers; spec said "delete only if no callers," so kept per spec. + +## Branch State + +``` +tier2/test_suite_cleanup_gemini_cli_removal_20260705 +17 commits ahead of origin/master +Working tree clean (only the 4 sandbox-drift files in forbidden-files.txt) +``` + +## Risks Surfaced (consumed by track or carried forward) + +- **R1** (sim tests with mock provider → real provider): `mitigation applied` via t1.8 — switched to real `minimax/M2.7`. +- **R2** (MCP dispatch flip → 22 consumer sites): `carry-forward` to upcoming vendor_ai_client_track. +- **R3** (app_controller state migration → test fixture churn): `carry-forward` — fixtures that construct `Metadata({...})` need migration in lockstep. +- **R4** (test_gui_2_result.py audit reveals all-current-behavior): `not-yet-evaluated` — deferred. + +## Hand-off Notes + +- The branch is at `tier2/test_suite_cleanup_gemini_cli_removal_20260705` for merge review. To pull into the main repo: `pwsh -File scripts/tier2/fetch_tier2_branch.ps1 -TrackName test_suite_cleanup_gemini_cli_removal_20260705`. +- `tests/mock_gemini_cli.py` + `tests/mock_gcli.bat` retained as a backstop (no longer used by current tests but kept per the spec's note). May be deleted in a follow-up. +- `tests/test_sim_ai_settings.py` was rewritten in this track; if a vendor_ai_client_track revisits the simulation framework, this file is the reference. +- `guide_meta_boundary.md` references to `gemini_cli` / `GEMINI_CLI_HOOK_CONTEXT` are META-tooling (external-agent bridge) and intentionally NOT touched per spec §GAP-A12. +- PROVIDERS is now 7 entries. The 11 sim tests require a valid `minimax` API key when actually run via `live_gui`. + +## Deferred To Followup Tracks + +```toml +deferred_to_followup_tracks = [ + { title = "vendor_ai_client_track", + description = "Vendor AI client surface area work — MCP dispatch flip (t3.1), app_controller in-memory state migration (t3.2), aggregate.py FileItem (t3.3), scattered Metadata field triage (t3.4), test fixture migration (t3.6), and any follow-on vendor concerns surfaced during the upcoming review.", + track_status = "user-upcoming" }, + { title = "test_de_crufting_track", + description = "Test suite cruft reduction — 15 test_*_phase*.py consolidation (t2.4), mock_controller fixture extraction (t2.6), 4 fix-not-skip Gemini 503 mocks (t2.7), test_gui_2_result.py split (t2.8), and additional cruft found in upcoming review.", + track_status = "user-upcoming" }, +] +``` \ No newline at end of file