Private
Public Access
conductor: finalize startup_speedup_20260606 docs (sub-track 1 + 3 post-shipping fixes)
This commit is contained in:
@@ -14,10 +14,10 @@ phase_2 = { status = "completed", checkpoint_sha = "f9a01258", name = "Job Pool
|
||||
phase_3 = { status = "completed", checkpoint_sha = "51c054ec", name = "Remove top-level SDK imports (ai_client)" }
|
||||
phase_4 = { status = "completed", checkpoint_sha = "3849d304", name = "Remove top-level FastAPI imports (app_controller)" }
|
||||
phase_5 = { status = "completed", checkpoint_sha = "515a3029", name = "Remove top-level feature-gated GUI imports (5A, 5B, 5C, 5D)" }
|
||||
phase_6 = { status = "completed", checkpoint_sha = "85d18885", name = "Migrate ad-hoc threads to _io_pool (partial - log_pruner done)" }
|
||||
phase_7 = { status = "completed", checkpoint_sha = "b464d1fe", name = "Warmup Notification (Hook API + GUI) - minimal scope (diagnostics endpoint only)" }
|
||||
phase_6 = { status = "completed", checkpoint_sha = "253e1798", name = "Migrate ad-hoc threads to _io_pool (FULLY complete via sub-track 1 at 253e1798)" }
|
||||
phase_7 = { status = "completed", checkpoint_sha = "b464d1fe", name = "Warmup Notification (Hook API + GUI) - MINIMAL scope (diagnostics endpoint only; T7B deferred to sub-track)" }
|
||||
phase_8 = { status = "completed", checkpoint_sha = "61d21c70", name = "Enforcement: static main thread purity test" }
|
||||
phase_9 = { status = "in_progress", checkpoint_sha = "", name = "Verify + Checkpoint" }
|
||||
phase_9 = { status = "in_progress", checkpoint_sha = "12cec6ae", name = "Verify + Checkpoint (shipped; conftest warmup wait added in 52ea2693)" }
|
||||
|
||||
[tasks]
|
||||
# Phase 1: Audit + Benchmark + Foundation
|
||||
@@ -25,14 +25,14 @@ t1_1 = { status = "completed", commit_sha = "6f9a3af2", description = "Capture b
|
||||
t1_2 = { status = "completed", commit_sha = "6f9a3af2", description = "Write scripts/audit_gui2_imports.py + commit results to docs/reports/startup_audit_20260606.txt" }
|
||||
t1_3 = { status = "completed", commit_sha = "5a856536", description = "Add StartupProfiler (src/startup_profiler.py + 5 tests)" }
|
||||
t1_4 = { status = "completed", commit_sha = "6f9a3af2", description = "Write scripts/audit_main_thread_imports.py (static CI gate) + 9 tests" }
|
||||
t1_5 = { status = "in_progress", commit_sha = "", description = "Commit plan update (this commit)" }
|
||||
t1_5 = { status = "completed", commit_sha = "12cec6ae", description = "Commit plan update (final track summary at 12cec6ae)" }
|
||||
# Phase 2: Job Pool + Warmup Foundation
|
||||
t2_1 = { status = "completed", commit_sha = "1354679e", description = "Red: tests/test_io_pool.py (4 tests)" }
|
||||
t2_2 = { status = "completed", commit_sha = "1354679e", description = "Green: src/io_pool.py make_io_pool factory" }
|
||||
t2_3 = { status = "completed", commit_sha = "1354679e", description = "Red: tests/test_warmup.py (10 tests)" }
|
||||
t2_4 = { status = "completed", commit_sha = "1354679e", description = "Green: src/warmup.py WarmupManager class" }
|
||||
t2_5 = { status = "completed", commit_sha = "922c5ad9", description = "Wire _io_pool + warmup into AppController.__init__ + 5 public delegation methods + io_pool shutdown" }
|
||||
t2_6 = { status = "in_progress", commit_sha = "", description = "Plan update (this commit)" }
|
||||
t2_6 = { status = "completed", commit_sha = "12cec6ae", description = "Plan update (at track SHIP)" }
|
||||
# Phase 3: Remove top-level SDK imports
|
||||
t3_1 = { status = "completed", commit_sha = "16780ec6", description = "Red: tests/test_ai_client_no_top_level_sdk_imports.py (9 tests, all FAILING)" }
|
||||
t3_2 = { status = "completed", commit_sha = "51c054ec", description = "Green: removed 5 top-level SDK imports from src/ai_client.py; added _require_warmed; 18 functions updated with local lookups" }
|
||||
@@ -43,7 +43,7 @@ t3_6 = { status = "completed", commit_sha = "8905c26b", description = "Updated t
|
||||
# Phase 4: Remove top-level FastAPI imports
|
||||
t4_1 = { status = "completed", commit_sha = "3849d304", description = "Red: tests/test_app_controller_no_top_level_fastapi.py (4 tests, 3 of which were FAILING)" }
|
||||
t4_2 = { status = "completed", commit_sha = "3849d304", description = "Green: removed fastapi imports from src/app_controller.py; used _require_warmed in create_api() + 7 _api_* helpers; also lifted _require_warmed to src/module_loader.py" }
|
||||
t4_3 = { status = "completed", commit_sha = "3849d304", description = "No new breakage; pre-existing test_generate_endpoint failure in test_headless_service.py is google.genai circular import (not a regression)" }
|
||||
t4_3 = { status = "completed", commit_sha = "3849d304", description = "No new breakage; pre-existing test_generate_endpoint failure in test_headless_service.py is google.genai circular import (mitigated post-shipping via 52ea2693 conftest warmup wait)" }
|
||||
t4_4 = { status = "completed", commit_sha = "3849d304", description = "Confirmed T4.1 tests PASS (4/4 green); T3.1 tests still pass (9/9, re-export works)" }
|
||||
t4_5 = { status = "completed", commit_sha = "3849d304", description = "Committed: refactor(app_controller): remove top-level fastapi imports; lift _require_warmed to shared module" }
|
||||
# Phase 5: Remove top-level feature-gated GUI imports
|
||||
@@ -63,24 +63,25 @@ t5d_1 = { status = "completed", commit_sha = "de6b85d2", description = "Ran audi
|
||||
t5d_2 = { status = "completed", commit_sha = "de6b85d2", description = "Removed 2 dead imports (tomli_w, theme_nerv_fx); added _LazyModule proxy for numpy + tkinter" }
|
||||
t5d_3 = { status = "completed", commit_sha = "de6b85d2", description = "Ran 13 sampled gui tests; all PASS, no breakage" }
|
||||
t5d_4 = { status = "completed", commit_sha = "de6b85d2", description = "Committed T5D: refactor(gui_2): remove dead imports; lazy numpy/tkinter via _LazyModule proxy" }
|
||||
# Phase 6: Migrate ad-hoc threads (PARTIAL)
|
||||
t6_1 = { status = "completed", commit_sha = "85d18885", description = "Audited: 25 threading.Thread spawns in src/; identified 4 domain-specific (HookServer, WebSocket, WorkerPool, CPU monitor) and ~21 ad-hoc candidates" }
|
||||
t6_2 = { status = "completed", commit_sha = "85d18885", description = "PARTIAL: Migrated 2 log_pruner + 2 _handle_ask threads in app_controller.py. Added submit_io() helper. ~13 other ad-hoc threads remain (follow-up sub-track)" }
|
||||
t6_3 = { status = "completed", commit_sha = "85d18885", description = "Ran log + app_controller tests; 15/15 PASS" }
|
||||
t6_4 = { status = "completed", commit_sha = "85d18885", description = "Commit T6 partial" }
|
||||
# Phase 6: Migrate ad-hoc threads (FULLY COMPLETE via sub-track 1 at 253e1798)
|
||||
t6_1 = { status = "completed", commit_sha = "85d18885", description = "Audit (partial): 25 threading.Thread spawns in src/; 4 domain-specific exempt, 4 migrated, 15 ad-hoc remain" }
|
||||
t6_2 = { status = "completed", commit_sha = "253e1798", description = "SUB-TRACK 1: Migrated remaining 13 ad-hoc threads in src/app_controller.py + 2 in src/gui_2.py to self.submit_io(...). Dropped 2 stored-ref attributes (models_thread, _project_switch_thread). ZERO new threading.Thread() in src/" }
|
||||
t6_3 = { status = "completed", commit_sha = "253e1798", description = "Adapted test_project_switch_persona_preset.py::_wait_for_switch to use is_project_stale() (the Future from submit_io is not directly exposed; in_progress flag is the public polling API)" }
|
||||
t6_4 = { status = "completed", commit_sha = "253e1798", description = "58+ tests touching migrated code paths all pass; 1 pre-existing failure (ui_global_preset_name) is unrelated" }
|
||||
# Phase 7: Warmup Notification (MINIMAL)
|
||||
t7a_1 = { status = "completed", commit_sha = "b464d1fe", description = "Skipped dedicated test - minimal scope used existing /api/gui/diagnostics endpoint" }
|
||||
t7a_2 = { status = "completed", commit_sha = "b464d1fe", description = "Added warmup_status field to existing /api/gui/diagnostics endpoint (no dedicated endpoints)" }
|
||||
t7a_3 = { status = "completed", commit_sha = "b464d1fe", description = "warmup_status auto-accessed via _get_app_attr fallback" }
|
||||
t7a_4 = { status = "completed", commit_sha = "b464d1fe", description = "Commit T7A" }
|
||||
t7b_1 = { status = "pending", commit_sha = "", description = "GUI status bar indicator - DEFERRED (out of scope for minimal Phase 7)" }
|
||||
t7b_2 = { status = "pending", commit_sha = "", description = "Toast notification on completion - DEFERRED" }
|
||||
t7b_3 = { status = "pending", commit_sha = "", description = "Docs - DEFERRED" }
|
||||
t7b_4 = { status = "pending", commit_sha = "", description = "Commit T7B - DEFERRED" }
|
||||
t7b_1 = { status = "pending", commit_sha = "", description = "GUI status bar indicator - DEFERRED to sub-track 4 (out of scope for minimal Phase 7)" }
|
||||
t7b_2 = { status = "pending", commit_sha = "", description = "Toast notification on completion - DEFERRED to sub-track 4" }
|
||||
t7b_3 = { status = "pending", commit_sha = "", description = "Docs - DEFERRED to sub-track 4" }
|
||||
t7b_4 = { status = "pending", commit_sha = "", description = "Commit T7B - DEFERRED to sub-track 4" }
|
||||
t7c_subtrack = { status = "pending", commit_sha = "", description = "SUB-TRACK 3 (deferred from minimal Phase 7): Add dedicated /api/warmup_status and /api/warmup_wait Hook API endpoints + register in _gettable_fields" }
|
||||
# Phase 8: Enforcement - Main Thread Purity
|
||||
t8_1 = { status = "completed", commit_sha = "61d21c70", description = "Static enforcement: tests/test_main_thread_purity.py with 7 AST-based tests for 6 refactored files" }
|
||||
t8_2 = { status = "completed", commit_sha = "61d21c70", description = "All 7 tests PASS; removed residual requests/tomli_w from app_controller.py" }
|
||||
t8_3 = { status = "pending", commit_sha = "", description = "CI wiring - DEFERRED (can be added by including test_main_thread_purity.py in default test run)" }
|
||||
t8_3 = { status = "pending", commit_sha = "", description = "CI wiring - DEFERRED (can be added by including test_main_thread_purity.py in default test run; the test discovers itself via pytest)" }
|
||||
t8_4 = { status = "completed", commit_sha = "61d21c70", description = "Commit T8" }
|
||||
# Phase 9: Verify + Checkpoint
|
||||
t9_1 = { status = "completed", commit_sha = "61d21c70", description = "Re-measured: import src.ai_client 161ms (was 1800ms; 91% reduction), import src.gui_2 341ms (was 1770ms; 81% reduction); total 3066ms saved on the 2 big files" }
|
||||
@@ -88,8 +89,13 @@ t9_2 = { status = "completed", commit_sha = "61d21c70", description = "Re-ran au
|
||||
t9_3 = { status = "completed", commit_sha = "61d21c70", description = "Ran test_warmup.py + test_io_pool.py: PASS" }
|
||||
t9_4 = { status = "completed", commit_sha = "61d21c70", description = "Ran test_main_thread_purity.py: 7/7 PASS" }
|
||||
t9_5 = { status = "completed", commit_sha = "b464d1fe", description = "Ran 7 live_gui tests (test_hooks, test_live_workflow, test_live_gui_integration_v2): all PASS" }
|
||||
t9_6 = { status = "pending", commit_sha = "", description = "Phase checkpoint commit (this commit)" }
|
||||
t9_7 = { status = "pending", commit_sha = "", description = "Update tracks.md; archive track" }
|
||||
t9_6 = { status = "completed", commit_sha = "12cec6ae", description = "Phase checkpoint: 12cec6ae (conductor(checkpoint): Phase 9 complete - track SHIPPED)" }
|
||||
t9_7 = { status = "completed", commit_sha = "12cec6ae", description = "tracks.md updated; track marked SHIPPED" }
|
||||
# Post-shipping bugfixes
|
||||
post_1 = { status = "completed", commit_sha = "8c4791d0", description = "Fix _ensure_gemini_client UnboundLocalError: moved Client() construction inside the `if _gemini_client is None:` block (real bug, kept)" }
|
||||
post_2 = { status = "completed", commit_sha = "8c4791d0", description = "Adapt test_discussion_compression.py::test_discussion_compression_deepseek: mock _require_warmed to return fake requests module with .post() (Phase 3 removed top-level requests import)" }
|
||||
post_3 = { status = "completed", commit_sha = "88fc42bb", description = "Source-level fix: 7 sites in src/ai_client.py use `_require_warmed('google.genai')` + `.types` instead of `_require_warmed('google.genai.types')` (per spec convention; does not fix the library bug but aligns with spec)" }
|
||||
post_4 = { status = "completed", commit_sha = "52ea2693", description = "tests/conftest.py: use AppController.wait_for_warmup() at conftest load time to ensure google.genai is fully loaded before any test runs. This is the proper mechanism per the spec (controller posts to test clients when threads are warmed up); the direct import was a workaround the user correctly rejected" }
|
||||
|
||||
[verification]
|
||||
baseline_ai_client_ms = 1800
|
||||
@@ -106,15 +112,33 @@ live_gui_failed = 0
|
||||
audit_main_thread_violations = 63
|
||||
io_pool_max_workers = 4
|
||||
io_pool_thread_name_prefix = "controller-io"
|
||||
new_threading_thread_calls = 0
|
||||
new_threading_thread_calls_in_src = 0
|
||||
function_body_heavy_imports = 0
|
||||
refactored_files_clean = 6
|
||||
tests_added = 35
|
||||
tests_passing = 50
|
||||
tests_added_total = 44
|
||||
tests_passing_total = 44
|
||||
ad_hoc_threads_migrated = 15
|
||||
domain_specific_threads_exempt = 5
|
||||
post_shipping_bugfix_commits = 5
|
||||
final_ship_commit = "253e1798"
|
||||
test_failure_in_progress = 2
|
||||
test_failure_notes = "Pre-existing failures unrelated to this work: 1) test_api_generate_blocked_while_stale - ui_global_preset_name AttributeError; 2) test_rag_large_codebase_verification_sim - RAG retrieval not finding modified content. User will address separately."
|
||||
|
||||
[sub_tracks]
|
||||
# Sub-tracks identified during Phase 9 follow-up that were out of scope
|
||||
# for the original 9-phase plan. These can be picked up in separate
|
||||
# tracks.
|
||||
sub_track_1_phase_6_full = { status = "completed", commit_sha = "253e1798", description = "Bulk ad-hoc thread migration (Phase 6 completion): 15 sites migrated to self.submit_io(...). ZERO new threading.Thread() in src/." }
|
||||
sub_track_2_audit_violations = { status = "pending", commit_sha = "", description = "Migrate remaining 63 audit violations in src/models.py (tomli_w, pydantic) + sloppy.py (win32gui, src.* indirect). Out of scope for this track." }
|
||||
sub_track_3_warmup_endpoints = { status = "pending", commit_sha = "", description = "Add dedicated /api/warmup_status and /api/warmup_wait?timeout=N Hook API endpoints + register in _gettable_fields. Builds on Phase 7 minimal (b464d1fe) which only added warmup field to existing diagnostics endpoint." }
|
||||
sub_track_4_gui_status_toast = { status = "pending", commit_sha = "", description = "GUI status bar indicator + completion toast. Deferred from Phase 7 (T7B). Pure ImGui work in src/gui_2.py + toast system. Polls warmup_status each frame; on completion, queue toast via existing toast system." }
|
||||
|
||||
[ad_hoc_threads]
|
||||
# Filled in Phase 6 T6.1 audit
|
||||
# Format: {file = "src/foo.py", line = 42, current_target = "lambda", proposed_target = "controller.submit_io(...)"}
|
||||
# Filled by Phase 6 T6.1 audit and completed in sub-track 1 (253e1798)
|
||||
# All ad-hoc spawns in src/app_controller.py and src/gui_2.py
|
||||
# have been migrated to self.submit_io(...).
|
||||
# Final state: 0 new threading.Thread() in src/ (only 5 domain-specific exempt)
|
||||
final_audit_at_sub_track_1 = "ZERO new threading.Thread() spawns in src/app_controller.py or src/gui_2.py. All 15 ad-hoc sites migrated to self.submit_io(...). The 5 domain-specific spawns remain (HookServer, WebSocketServer, asyncio loop, WorkerPool, CPU monitor) per spec exemption."
|
||||
|
||||
[warmup_list]
|
||||
# Filled in Phase 2 T2.4 implementation
|
||||
@@ -129,3 +153,17 @@ src_markdown_table = true
|
||||
numpy = true
|
||||
fastapi = "conditional" # only when enable_test_hooks or web_host
|
||||
fastapi_security_api_key = "conditional"
|
||||
|
||||
[conftest_warmup_wait]
|
||||
# Added at 52ea2693 to properly use the AppController's warmup
|
||||
# notification system (Phase 2's mechanism). The conftest blocks on
|
||||
# ctrl.wait_for_warmup(timeout=60.0) at pytest process start. This
|
||||
# is the spec-correct mechanism (user said: "the app controller
|
||||
# should post to test clients or the user when its threads are
|
||||
# warmed up with imports"). The earlier direct `import google.genai`
|
||||
# in conftest was a workaround; the user correctly identified it as
|
||||
# jank and redirected to use the warmup system.
|
||||
timeout_seconds = 60
|
||||
typical_completion_seconds = 3
|
||||
mechanism = "AppController.wait_for_warmup() (per spec: controller posts to test clients when warmup completes)"
|
||||
side_effect = "Adds 60s worst-case to conftest load (typically 3s); one-time per pytest process"
|
||||
|
||||
Reference in New Issue
Block a user