From 96158edd97ef4b087fbb6b84029c1f7dc2e82e21 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sat, 6 Jun 2026 13:59:02 -0400 Subject: [PATCH] conductor(plan): mark T1.3 StartupProfiler complete (5a856536) --- conductor/tracks/startup_speedup_20260606/plan.md | 2 +- conductor/tracks/startup_speedup_20260606/state.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conductor/tracks/startup_speedup_20260606/plan.md b/conductor/tracks/startup_speedup_20260606/plan.md index d137f991..ba9c084a 100644 --- a/conductor/tracks/startup_speedup_20260606/plan.md +++ b/conductor/tracks/startup_speedup_20260606/plan.md @@ -11,7 +11,7 @@ - [ ] **T1.1** Capture baseline with `scripts/benchmark_imports.py --runs=3 --color=never > docs/startup_baseline_20260606.txt` - [ ] **T1.2** Write `scripts/audit_gui2_imports.py` (AST walker): for each `import X` in `src/gui_2.py`, classify as `first-frame` (reachable from `main()` / `render_main_window` etc.) vs `feature-gated` (inside an `if/elif` branch that requires user action). Commit audit results to `docs/startup_audit_20260606.md`. -- [ ] **T1.3** Add `src/startup_profiler.py` with `StartupProfiler` class (context manager `phase(name)`). Wire into `AppController.__init__` and `App.__init__` at 8 major init points. (No new test; verify via manual run + diagnostics panel.) `[T1.3]` +- [x] **T1.3** Add `src/startup_profiler.py` with `StartupProfiler` class (context manager `phase(name)`). Wire into `AppController.__init__` and `App.__init__` at 8 major init points. (No new test; verify via manual run + diagnostics panel.) `[T1.3: 5a856536]` - [ ] **T1.4** Write `scripts/audit_main_thread_imports.py` (static gate, fails CI). AST-walks the import graph reachable from `sloppy.py`, collects all top-level `import X` / `from X import Y`, compares against an allowlist. Exits non-zero with file:line:module on violation. Allowlist: `sys.stdlib_module_names` + the lean gui_2 skeleton list from `spec.md:2.1` (`imgui_bundle`, `defer`, `src.imgui_scopes`, `src.theme_2` (default theme only), `src.theme_models`, `src.paths`, `src.models`, `src.events`). - [ ] **T1.5** Commit baseline + audit script: `git add . && git commit -m "conductor(startup): baseline measurements + main thread import audit script"` + git note diff --git a/conductor/tracks/startup_speedup_20260606/state.toml b/conductor/tracks/startup_speedup_20260606/state.toml index ec39257d..36b47397 100644 --- a/conductor/tracks/startup_speedup_20260606/state.toml +++ b/conductor/tracks/startup_speedup_20260606/state.toml @@ -23,7 +23,7 @@ phase_9 = { status = "pending", checkpoint_sha = "", name = "Verify + Checkpoint # Phase 1: Audit + Benchmark + Foundation t1_1 = { status = "pending", commit_sha = "", description = "Capture baseline benchmark" } t1_2 = { status = "pending", commit_sha = "", description = "Audit src/gui_2.py imports (first-frame vs feature-gated)" } -t1_3 = { status = "pending", commit_sha = "", description = "Add StartupProfiler and instrument init" } +t1_3 = { status = "completed", commit_sha = "5a856536", description = "Add StartupProfiler and instrument init" } t1_4 = { status = "pending", commit_sha = "", description = "Write scripts/audit_main_thread_imports.py (static CI gate)" } t1_5 = { status = "pending", commit_sha = "", description = "Commit baseline + audit script" } # Phase 2: Job Pool + Warmup Foundation