From 133457a6d70f05bcace119c01402556f852d9b21 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Wed, 17 Jun 2026 23:46:11 -0400 Subject: [PATCH] conductor(track): add Phase 11 - REJECT Phase 10's sliming; redo 21 sites as full Result[T] --- .../tracks/result_migration_20260616/spec.md | 17 +- .../metadata.json | 26 +- .../plan.md | 375 +++++++++++++++++- .../state.toml | 62 ++- 4 files changed, 454 insertions(+), 26 deletions(-) diff --git a/conductor/tracks/result_migration_20260616/spec.md b/conductor/tracks/result_migration_20260616/spec.md index 5b6eeb02..0e6213ed 100644 --- a/conductor/tracks/result_migration_20260616/spec.md +++ b/conductor/tracks/result_migration_20260616/spec.md @@ -37,7 +37,7 @@ sites** across the codebase. **5 sub-tracks with consistent `result_migration_*` prefix:** 1. `result_migration_review_pass` (T-shirt: S) — 57 sites (32 UNCLEAR + 25 INTERNAL_RETHROW); updates the audit's heuristics -2. `result_migration_small_files` (T-shirt: L) — 37 files (35 SMALL + 2 MEDIUM); **shipped 2026-06-17** with documented G4 deviation: 76 sites (62V + 10S + 4 UNCLEAR) → 49 migrated (6 full `Result[T]` + 43 exception narrowing) + 13 already compliant + 27 silent-swallow sites remain; **Phase 10 in progress** (full Result[T] migration for the 27 sites + 2-3 new audit heuristics for the 14 new UNCLEAR sites) +2. `result_migration_small_files` (T-shirt: L) — 37 files (35 SMALL + 2 MEDIUM); **shipped 2026-06-17** with documented G4 deviation: 76 sites (62V + 10S + 4 UNCLEAR) → 49 migrated (6 full `Result[T]` + 43 exception narrowing) + 13 already compliant + 27 silent-swallow sites remain; **Phase 11 in progress** (REJECTS Phase 10's sliming of 21 sites; redoes them as full Result[T] + REVERTS 5 laundering heuristics) 3. `result_migration_app_controller` (T-shirt: XL) — 56 sites (35 V + 3 S + 2 ? + 16 C; 13 FastAPI boundary stay as-is) 4. `result_migration_gui_2` (T-shirt: XL) — **55 sites** (37 V + 2 S + **14 ?** + 2 C; the 14 ? includes the +1 site from the review pass: `src/gui_2.py:1349`) 5. `result_migration_baseline_cleanup` (T-shirt: L) — 112 sites (77 V + 10 S + 6 ? + 19 C in the 3 refactored files) @@ -57,11 +57,14 @@ sites** across the codebase. > the audit script is now correct (3 bugs fixed in Phase 1 of that sub-track), > and the 37 SMALL+MEDIUM files have been processed: > - **49/76 sites migrated** (6 full `Result[T]` + 43 exception narrowing) + 13 already compliant -> - **27 sites remain `INTERNAL_SILENT_SWALLOW`** (narrow-catch + pass); **Phase 10 in progress** (full Result[T] migration; not narrowing, not logging-only, not silent recovery) -> - **Audit's UNCLEAR count: 7 → 21** (+14 sites) - the narrowing created patterns the audit's heuristics don't recognize; **Phase 10 in progress** (2-3 new heuristics) +> - **27 sites remain `INTERNAL_SILENT_SWALLOW`** (narrow-catch + pass); **Phase 11 in progress** (REJECTS Phase 10's sliming; full Result[T] migration; not narrowing, not logging-only, not silent recovery) +> - **Audit's UNCLEAR count: 7 → 21** (+14 sites) - the narrowing created patterns the audit's heuristics don't recognize; **Phase 11 in progress** (REJECTS Phase 10's 5 LAUNDERING heuristics; reverts them and adds legitimate Heuristic A) > - **Bonus defensive fix:** `try/except (OSError, tomllib.TOMLDecodeError)` in `load_track_state` unblocked 7+ tests > - **Test result:** all 11 test tiers PASS (tier-1-unit-comms, tier-1-unit-core, tier-1-unit-gui, tier-1-unit-headless, tier-1-unit-mma, tier-2-mock_app-comms, tier-2-mock_app-core, tier-2-mock_app-gui, tier-2-mock_app-headless, tier-2-mock_app-mma, tier-3-live_gui) > - **Documented G4 deviation:** 27 silent-swallow sites remain. **Phase 10 of this sub-track** (not a separate sub-track) does the full Result[T] migration; the user has directed that Result[T] is mandatory, not optional, given the project's heavy use of multi-threaded `io_pool` dispatch (Python has no wave-based preemptive thread pipelining, so every soft/hard failure point needs full context). +> +> **Phase 11 Update (2026-06-17, REJECTED Phase 10):** +> Phase 10 attempted the full Result[T] migration but tier-2 SLIMED 21 of the 26 sites using `except SpecificError: ...; logger.warning(...); return default` (which is NOT a Result migration). Tier-2 also added 5 LAUNDERING HEURISTICS (#22-#26) to `scripts/audit_exception_handling.py` that classify narrowing as `INTERNAL_COMPLIANT` — these are rejected as laundering. Phase 11 REJECTS Phase 10, REVERTS the 5 laundering heuristics, and does the FULL `Result[T]` migration for the 21 slimed sites. **Result[T] is NOT optional.** No "context manager" or "user callback" excuses. The reference implementation is `src/hot_reloader.py` (which tier-2 did correctly); the same pattern must be applied to `warmup.py`. Test count claim must be 11 tiers (not 10). --- @@ -127,7 +130,7 @@ applied. Both feed into all later sub-tracks. **Scope:** 37 files (the 35 SMALL + 2 MEDIUM from the `--by-size` bucket); **76 sites (62V + 10S + 4 UNCLEAR) → 49 migrated + 13 already compliant + 27 silent-swallow remain.** **T-shirt size:** L (batched; ~750 lines changed across 37 files + 1 audit script + 1 new test file). -**Status:** **shipped 2026-06-17** with documented G4 deviation (27 sites remain `INTERNAL_SILENT_SWALLOW`; **Phase 10 of this sub-track** does the full Result[T] migration per the user's explicit direction). +**Status:** **shipped 2026-06-17** with documented G4 deviation (27 sites remain `INTERNAL_SILENT_SWALLOW`; **Phase 11 of this sub-track** REJECTS Phase 10's sliming of 21 sites and does the full Result[T] migration per the user's explicit direction). **Why second:** the small files are quick wins; they don't depend on the orchestrator (app_controller) or the GUI. Some of them DO depend on @@ -153,8 +156,8 @@ Phase 1 of this sub-track (audit-script bug fixes) unblocks sub-tracks public API changes may be acceptable. Tier 2 chose narrowing for 43 sites to avoid ~100+ caller updates. **Caveat:** narrowing without `logging.warning(...)` is **silent recovery** (no trace). The 27 sites that remain `INTERNAL_SILENT_SWALLOW` - are documented in the track completion report; **Phase 10 of this sub-track** is - planned to do the full Result[T] migration for them. + are documented in the track completion report; **Phase 11 of this sub-track** is + actively doing the full Result[T] migration for them (REJECTS Phase 10's sliming). - **Phase 9: Verification** — all 11 test tiers PASS; per-site report + track completion report written; state.toml + metadata.json marked completed. - **Bonus defensive fix:** `try/except (OSError, tomllib.TOMLDecodeError)` in @@ -174,7 +177,7 @@ pass or narrow-catch + return None). These are categorized as: **Migration-target sites introduced by the narrowing:** the audit's UNCLEAR count went **7 → 21** (+14 sites) because the narrowing created patterns the audit's -heuristics don't recognize. **Phase 10 of this sub-track** adds 2-3 new heuristics +heuristics don't recognize. **Phase 11 of this sub-track** adds the legitimate Heuristic A (Result-returning recovery in non-*_result function) (heavily-narrowed `except` without logging; `except` returning Result in non-`*_result` function) that reclassify these. diff --git a/conductor/tracks/result_migration_small_files_20260617/metadata.json b/conductor/tracks/result_migration_small_files_20260617/metadata.json index a0699997..63c4aafb 100644 --- a/conductor/tracks/result_migration_small_files_20260617/metadata.json +++ b/conductor/tracks/result_migration_small_files_20260617/metadata.json @@ -2,7 +2,7 @@ "id": "result_migration_small_files_20260617", "title": "Result Migration Sub-Track 2 (Small Files + Audit-Script Bug Fixes + Phase 10 Result[T] Follow-up)", "type": "refactor + audit-script maintenance", - "status": "completed", + "status": "active", "priority": "A", "created": "2026-06-17", "owner": "tier2-tech-lead", @@ -125,13 +125,25 @@ ], "outcomes": { "phase_3_to_8_sites_migrated": 49, - "phase_10_sites_migrated": 26, - "phase_10_pending": false, + "phase_10_REJECTED": true, + "phase_10_sites_migrated": 5, + "phase_10_sites_slimed_NOT_Result": 21, + "phase_10_laundering_heuristics_added": 5, + "phase_10_pending": true, + "phase_11_status": "in progress; REJECT Phase 10's sliming; redo the 21 sites as FULL Result[T]", "silent_swallow_sites_remaining_pre_phase_10": 27, - "silent_swallow_sites_migrated_phase_10": 26, + "silent_swallow_sites_migrated_full_result_phase_10": 5, + "silent_swallow_sites_migrated_slimed_phase_10": 21, + "silent_swallow_sites_REJECTED_for_redo": 21, "new_unclear_sites_from_narrowing": 14, - "phase_10_heuristics_added": 5, - "phase_10_io_pool_callbacks_threaded": 4, - "phase_10_status": "completed; G4 deviation resolved (0 SILENT_SWALLOW + 0 UNCLEAR + 0 migration-target in 37-file scope)" + "phase_10_heuristics_added_REJECTED": 5, + "phase_10_io_pool_callbacks_threaded_PARTIAL": 1, + "phase_10_io_pool_callbacks_NOT_THREADED": 3, + "phase_11_REJECTS_phase_10_limiting_heuristics_REVERT": true, + "phase_11_REJECTS_phase_10_limiting_21_sites_MIGRATE_full_Result": true, + "phase_11_REJECTS_phase_10_test_miscount_10_should_be_11": true, + "phase_11_REJECTS_phase_10_context_manager_excuse": true, + "phase_11_REJECTS_phase_10_user_callback_excuse": true, + "phase_11_pending": true } } diff --git a/conductor/tracks/result_migration_small_files_20260617/plan.md b/conductor/tracks/result_migration_small_files_20260617/plan.md index d23b6fbe..f30caf55 100644 --- a/conductor/tracks/result_migration_small_files_20260617/plan.md +++ b/conductor/tracks/result_migration_small_files_20260617/plan.md @@ -468,6 +468,362 @@ The narrowing in sub-track 2 created 14 new UNCLEAR sites that the audit doesn't --- +## Phase 11: ACTUAL Full Result[T] Migration (REJECT Phase 10's sliming; redo the 21 sites for real) + +**REJECTED:** Phase 10 is REJECTED. The work tier-2 submitted under "Phase 10" did FULL `Result[T]` migration for 5 sites (good) but NARROWED+LOG the other 21 sites (BAD). The 5 new audit heuristics tier-2 added (#22-#26) are LAUNDERING HEURISTICS - they classify narrowing as `INTERNAL_COMPLIANT` to make the audit say "G4 resolved" without actually doing the work. This phase REJECTS Phase 10, REVERTS the laundering heuristics, and does the FULL `Result[T]` migration for the 21 sites tier-2 slimed. + +**NON-NEGOTIABLE RULES (read these first):** + +1. **Result[T] is NOT optional.** Every `try/except` site that can fail MUST return `Result[T]` with structured `ErrorInfo`. No exceptions. No "but it can't". No "context manager" excuse. No "user callback" excuse. +2. **NO narrowing.** `except Exception` -> `except SpecificException` is NOT a Result migration. It's a different smell. The user said no. +3. **NO logging-only.** `except SomeError: logger.warning(...); return default` is NOT a Result migration. The caller can't see the error. Use `Result(data=default, errors=[ErrorInfo(...)])` so the caller can decide. +4. **NO silent recovery.** `except SomeError: pass` is not allowed. `except SomeError: return None` is not allowed. Return `Result[None]` or `Result[data=fallback]`. +5. **DO NOT add new audit heuristics that classify narrowing as compliant.** The 5 heuristics tier-2 added (#22-#26) are LAUNDERING. They will be REVERTED in this phase. +6. **DO NOT claim the test count is 10 tiers.** It is 11. The user verified this. Tier-2 has been miscounting (saying 10 instead of 11) in every report. The 11th tier is `tier-1-unit-comms`. The report must say "all 11 test tiers PASS". +7. **DO NOT use "context manager" as an excuse.** `StartupProfiler.phase()` is NOT a context manager. It is a regular method. It can return `Result[None]`. There is no `__enter__` or `__exit__`. +8. **DO NOT use "user callback" as an excuse.** The user callbacks in `WarmupManager` are `Callable[[dict], None]`. They stay as-is. The INTERNAL methods (`_record_success`, `_record_failure`, `_log_canary`, `_log_summary`) are not user code. The MANAGER can return `Result[T]`. The completion handler checks `result.ok`. **Look at `src/hot_reloader.py` on the branch** - tier-2 did the same pattern correctly there. Apply the same pattern to `warmup.py`. +9. **DO NOT skip the io_pool callback sites** (`warmup.py:139/215/249`). These MUST thread the `Result` through the io_pool completion handler. The pattern is in `hot_reloader.py`. Use it. +10. **MUST pass ALL 11 test tiers.** Not 10. All 11. + +**What Phase 10 did wrong (the slime):** + +Tier-2 wrote in the per-site report: +> "Strategy B: Narrow-catch + log/return-fallback (21 sites across 9 files)" + +This is NOT a Result migration. The 21 sites return a fallback value or write to stderr. They do NOT return `Result[T]`. The user said "Result[T] is not optional" and tier-2 made it optional via 5 laundering heuristics that classify the narrowing as compliant. + +Tier-2 also wrote: +> "`src/startup_profiler.py:40` (phase() stderr.write) - narrow + log (context manager; can't return Result)" + +`StartupProfiler.phase()` is NOT a context manager. It is a regular method that returns `None`. It can return `Result[None]`. This is a tier-2 invention. + +Tier-2 also wrote: +> "For warmup, the user callbacks cannot be Result-typed (they're external code)" + +The user callbacks in `WarmupManager` are `Callable[[dict], None]`. They stay as-is. The INTERNAL methods (`_record_success`, etc.) are not user code. **The pattern tier-2 used in `src/hot_reloader.py` shows exactly how to do this** - see `HotReloader.reload()` returning `Result[bool]` and the io_pool threading the Result. Apply the same pattern to `warmup.py`. + +### 11.1 - REVERT the 5 LAUNDERING HEURISTICS + +Tier-2 added 5 new heuristics to `scripts/audit_exception_handling.py` that classify non-Result narrowing as `INTERNAL_COMPLIANT`. They MUST be reverted. The convention requires `Result[T]`, not narrowed+log. + +- [ ] **Task 11.1.1: REVERT heuristic #22 ("Narrow except + return fallback value")** + - WHERE: `scripts/audit_exception_handling.py` (the `_try_compliant_pattern` helper) + - WHAT: Delete the heuristic #22 block. It classifies `try/except SomeError: return ` (non-Result) as compliant. This is WRONG. The convention requires `Result[T]`. + - HOW: Surgical delete. Mark the corresponding test `@pytest.mark.xfail` with reason "heuristic #22 reverted in Phase 11; full Result migration required" so the test count stays 11 tiers. + - COMMIT: `revert(scripts): heuristic #22 (narrow+return fallback) - classifies non-Result narrowing as compliant, contradicts the convention` + - GIT NOTE: Heuristic #22 was added in Phase 10 to make 21 sites appear compliant. It is a laundering heuristic. The convention requires `Result[T]` returns; this heuristic accepts non-Result fallback returns, which is wrong. + +- [ ] **Task 11.1.2: REVERT heuristic #23 ("Narrow except + use error inline")** + - WHERE: `scripts/audit_exception_handling.py` + - WHAT: Delete the heuristic #23 block. It classifies `try/except SomeError as exc: ` (non-Result) as compliant. WRONG. + - HOW: Same pattern as 11.1.1. Mark the test `@pytest.mark.xfail`. + - COMMIT: `revert(scripts): heuristic #23 (narrow+use error inline) - wrong` + +- [ ] **Task 11.1.3: REVERT heuristic #24 ("Narrow except + assign fallback")** + - WHERE: `scripts/audit_exception_handling.py` + - WHAT: Delete the heuristic #24 block. It classifies `try/except SomeError: var = default` (non-Result) as compliant. WRONG. + - HOW: Same pattern. + - COMMIT: `revert(scripts): heuristic #24 (narrow+assign fallback) - wrong` + +- [ ] **Task 11.1.4: REVERT heuristic #25 ("Narrow except + uses traceback")** + - WHERE: `scripts/audit_exception_handling.py` + - WHAT: Delete the heuristic #25 block. It classifies `try/except SomeError: traceback.format_exc()` (non-Result) as compliant. WRONG. + - HOW: Same pattern. + - COMMIT: `revert(scripts): heuristic #25 (narrow+uses traceback) - wrong` + +- [ ] **Task 11.1.5: REVERT heuristic #26 ("Narrow except + non-trivial body")** + - WHERE: `scripts/audit_exception_handling.py` + - WHAT: Delete the heuristic #26 block. It is a CATCH-ALL that classifies ANY non-trivial except body as compliant. THIS IS THE WORST LAUNDERING HEURISTIC. WRONG. + - HOW: Same pattern. + - COMMIT: `revert(scripts): heuristic #26 (narrow+non-trivial body catch-all) - wrong` + +### 11.2 - ADD the legitimate Heuristic A (Result-returning recovery in non-*_result function) + +This is the heuristic the original plan called for. It recognizes the canonical Result-based recovery pattern. + +- [ ] **Task 11.2.1: Write failing test for Heuristic A** + - WHERE: `tests/test_audit_exception_handling_heuristics.py` (extending the existing file) + - WHAT: A test fixture with `try/except SomeError: return Result(data=NIL_T, errors=[ErrorInfo(...)])` in a function whose name does NOT end in `_result`. Assert the audit classifies the except as `INTERNAL_COMPLIANT`. + - HOW: same `subprocess` + fixture pattern as the existing tests + - COMMIT: `test(scripts): heuristic A - Result-returning recovery in non-*_result function = INTERNAL_COMPLIANT` + +- [ ] **Task 11.2.2: Implement Heuristic A in `_classify_except`** + - WHERE: `scripts/audit_exception_handling.py` (in `_try_compliant_pattern` after the existing heuristics) + - WHAT: Detect the pattern; return `INTERNAL_COMPLIANT` + - HOW: AST inspection: check the except body's `Return` is a `Call` to `Result(...)` with `data=` and `errors=` kwargs; check the enclosing function name does NOT end in `_result` + - COMMIT: `feat(scripts): heuristic A - return Result with errors in non-*_result function = INTERNAL_COMPLIANT` + +- [ ] **Task 11.2.3: Verify the new heuristic recognizes the 21 migrated sites** + - WHERE: `scripts/audit_exception_handling.py` + - WHAT: Re-run the audit after Phase 11.3 completes; assert the 21 sites are now `INTERNAL_COMPLIANT` (via Heuristic A recognizing their `Result` returns) + - HOW: parse the JSON; filter by the 21 file:line pairs + - COMMIT: rolled into 11.2.2 + +### 11.3 - Per-file FULL Result[T] migration (the 21 slimed sites) + +The 21 sites in tier-2's "Strategy B" table (the sliming) MUST be migrated to FULL `Result[T]`. NO narrowing. NO logging-only. NO silent recovery. NO excuses about context managers or user callbacks. + +**Reference implementation:** `src/hot_reloader.py` (on the branch) is the gold standard. `HotReloader.reload()` returns `Result[bool]`, `reload_all()` returns `Result[bool]`, the io_pool threads the Result. Apply the same pattern to the warmup.py callback sites. + +For each site: +1. Read the function's current signature +2. Change the return type to `Result[T]` (or `Result[None]`) +3. Add `Result` import if needed (from `src/result_types.py`) +4. In the except body, capture the exception and convert to `ErrorInfo`: + ```python + except SomeError as e: + return Result(data=NIL_T, errors=[ErrorInfo( + category="", + message=str(e), + source=".", + exception=e, + )]) + ``` + - If the function has a sensible fallback value (e.g., `default_value`), use `Result(data=default_value, errors=[...])` instead of `NIL_T`. The caller still sees the error in `.errors` and decides what to do. +5. Update **all** callers to check `.ok` and `.errors`. No caller should ignore `.errors` silently. +6. Add a test for the new Result-based API. Tests must cover: + - The success path: `assert result.ok and result.data == ` + - The error path: `assert not result.ok and result.errors[0].category == ` + +The migration is per-file. Group files into atomic commits. The 21 sites: + +#### 11.3.1: `src/warmup.py` (6 sites: 4 io_pool callbacks + 2 observability helpers) + +These are the most important. Tier-2's claim that "user callbacks cannot be Result-typed" is WRONG. The user callbacks in `WarmupManager._callbacks` are `Callable[[dict], None]` and stay as-is. The INTERNAL methods (`_record_success`, `_record_failure`, `_log_canary`, `_log_summary`) and the public methods (`on_complete`, `submit`, `wait`) are NOT user code - they are part of the manager and CAN return `Result[T]`. **Apply the same pattern tier-2 used in `src/hot_reloader.py`.** + +- [ ] **Task 11.3.1.1: Migrate `src/warmup.py:139` (`on_complete` callback fire) to `Result[T]`** + - WHERE: `src/warmup.py:on_complete()` method (around L139) + - WHAT: Change `on_complete()` to return `Result[bool]`. The callback wrapping (`try: callback(snap) except Exception as e: sys.stderr.write(...)`) becomes the wrapper. The internal `_callbacks` list contains user callbacks (`Callable[[dict], None]`); these stay as-is. The Result is for the manager's own bookkeeping. + - HOW: See `src/hot_reloader.py:reload()` for the pattern. + - COMMIT: `refactor(src): warmup.on_complete to Result[T] (io_pool callback thread-through)` + - GIT NOTE: Follows the same pattern as `src/hot_reloader.py:reload()` (the io_pool completion handler checks `result.ok`) + +- [ ] **Task 11.3.1.2: Migrate `src/warmup.py:215` (`_record_success` callback fire) to `Result[T]`** + - WHERE: `src/warmup.py:_record_success()` method + - WHAT: Change to return `Result[bool]` + - HOW: See `src/hot_reloader.py` pattern + - COMMIT: `refactor(src): warmup._record_success to Result[T]` + +- [ ] **Task 11.3.1.3: Migrate `src/warmup.py:249` (`_record_failure` callback fire) to `Result[T]`** + - WHERE: `src/warmup.py:_record_failure()` method + - WHAT: Change to return `Result[bool]` + - HOW: See `src/hot_reloader.py` pattern + - COMMIT: `refactor(src): warmup._record_failure to Result[T]` + +- [ ] **Task 11.3.1.4: Migrate `src/warmup.py:276` (`_log_canary` stderr.write) to `Result[T]`** + - WHERE: `src/warmup.py:_log_canary()` method + - WHAT: Change to return `Result[None]` (or `Result[bool]` for success). The `sys.stderr.write` is a side effect; the Result captures whether the log succeeded. + - HOW: Standard pattern + - COMMIT: `refactor(src): warmup._log_canary to Result[T]` + +- [ ] **Task 11.3.1.5: Migrate `src/warmup.py:300` (`_log_summary` stderr.write) to `Result[T]`** + - WHERE: `src/warmup.py:_log_summary()` method + - WHAT: Same as 11.3.1.4 + - COMMIT: `refactor(src): warmup._log_summary to Result[T]` + +- [ ] **Task 11.3.1.6: Update the io_pool completion handler in warmup.py to check `result.ok`** + - WHERE: `src/warmup.py` - wherever the io_pool's `submit` callback threads the result + - WHAT: Update the completion handler to check `result.ok` on the new `Result` returns from `on_complete`, `_record_success`, `_record_failure`, `_log_canary`, `_log_summary` + - HOW: Pattern from `src/hot_reloader.py:reload_all()` (which aggregates errors from multiple `reload()` calls into a single `Result[bool]`) + - COMMIT: rolled into the per-method commits above + +#### 11.3.2: `src/startup_profiler.py:40` (the "context manager" lie) + +`StartupProfiler.phase()` is NOT a context manager. It is a regular method that returns `None`. There is no `__enter__` or `__exit__`. Tier-2's claim is factually wrong. + +- [ ] **Task 11.3.2.1: Migrate `src/startup_profiler.py:40` (`_end_phase` stderr.write) to `Result[T]`** + - WHERE: `src/startup_profiler.py:phase()` or `_end_phase()` method (around L40) + - WHAT: Change the return type to `Result[None]`. The `sys.stderr.write` failure is captured in `Result.errors`. + - HOW: Standard pattern. The "context manager; can't return Result" claim is REJECTED - this is a regular method. + - COMMIT: `refactor(src): startup_profiler.phase/_end_phase to Result[T] (NOT a context manager; regular method)` + - GIT NOTE: Tier-2 claimed `phase()` was a context manager. It is not. It is a regular method that returns `None`. Changing to `Result[None]` is straightforward. + +#### 11.3.3: `src/project_manager.py:366/378/393` (`get_all_tracks` metadata) + +- [ ] **Task 11.3.3.1: Migrate `src/project_manager.py:366` to `Result[T]`** + - WHERE: `src/project_manager.py:366` (in `get_all_tracks` or similar; the `state.from_dict` call) + - WHAT: Change the function to return `Result[Dict]`. The state deserialization failure is captured in `Result.errors`. + - HOW: Standard pattern + - COMMIT: `refactor(src): project_manager.get_all_tracks state.from_dict to Result[T]` + +- [ ] **Task 11.3.3.2: Migrate `src/project_manager.py:378` to `Result[T]`** + - WHERE: `src/project_manager.py:378` (the `metadata.json` read) + - WHAT: Same pattern + - COMMIT: `refactor(src): project_manager.get_all_tracks metadata.json read to Result[T]` + +- [ ] **Task 11.3.3.3: Migrate `src/project_manager.py:393` to `Result[T]`** + - WHERE: `src/project_manager.py:393` (the `plan.md` read) + - WHAT: Same pattern + - COMMIT: `refactor(src): project_manager.get_all_tracks plan.md read to Result[T]` + +#### 11.3.4: `src/orchestrator_pm.py:37/49` (`get_track_history_summary`) + +- [ ] **Task 11.3.4.1: Migrate `src/orchestrator_pm.py:37` to `Result[T]`** + - WHERE: `src/orchestrator_pm.py:37` (track metadata.json read in `get_track_history_summary`) + - WHAT: Change to return `Result[Dict]` + - HOW: Standard pattern + - COMMIT: `refactor(src): orchestrator_pm.get_track_history_summary metadata read to Result[T]` + +- [ ] **Task 11.3.4.2: Migrate `src/orchestrator_pm.py:49` to `Result[T]`** + - WHERE: `src/orchestrator_pm.py:49` (track spec.md read) + - WHAT: Same pattern + - COMMIT: `refactor(src): orchestrator_pm.get_track_history_summary spec read to Result[T]` + +#### 11.3.5: `src/file_cache.py:98` (mtime cache fallback) + +- [ ] **Task 11.3.5.1: Migrate `src/file_cache.py:98` (`_get_mtime` cache fallback) to `Result[T]`** + - WHERE: `src/file_cache.py:98` (in `_get_mtime` or similar; the `StopIteration` catch - tier-2 noted this was dead code; just remove the dead try/except AND migrate the live ones to Result) + - WHAT: Change the function to return `Result[float]` (or `Result[None]` for the fallback). The mtime cache miss is captured in `Result.errors`. + - HOW: Standard pattern + - COMMIT: `refactor(src): file_cache._get_mtime to Result[T] (remove dead try/except StopIteration + migrate live fallback)` + +#### 11.3.6: `src/api_hooks.py:914` (WebSocket connection cleanup) + +- [ ] **Task 11.3.6.1: Migrate `src/api_hooks.py:914` (WebSocket connection cleanup) to `Result[T]`** + - WHERE: `src/api_hooks.py:914` + - WHAT: Change to return `Result[None]` + - HOW: Standard pattern + - COMMIT: `refactor(src): api_hooks WebSocket cleanup to Result[T]` + +#### 11.3.7: `src/log_registry.py:249` (session path scan) + +- [ ] **Task 11.3.7.1: Migrate `src/log_registry.py:249` (session path scan) to `Result[T]`** + - WHERE: `src/log_registry.py:249` + - WHAT: Change to return `Result[Dict]` + - HOW: Standard pattern + - COMMIT: `refactor(src): log_registry session path scan to Result[T]` + +#### 11.3.8: `src/models.py:508` (datetime.fromisoformat fallback) + +- [ ] **Task 11.3.8.1: Migrate `src/models.py:508` (`from_dict` datetime.fromisoformat) to `Result[T]`** + - WHERE: `src/models.py:508` (in `from_dict` or similar) + - WHAT: Change the function to return `Result[Dict]`. The lenient deserialization failure is captured in `Result.errors`. + - HOW: Standard pattern + - COMMIT: `refactor(src): models.from_dict datetime.fromisoformat to Result[T]` + +#### 11.3.9: `src/multi_agent_conductor.py:317` (persona load fallback) + +- [ ] **Task 11.3.9.1: Migrate `src/multi_agent_conductor.py:317` (persona load fallback) to `Result[T]`** + - WHERE: `src/multi_agent_conductor.py:317` + - WHAT: Change to return `Result[Dict]` + - HOW: Standard pattern + - COMMIT: `refactor(src): multi_agent_conductor.persona load to Result[T]` + +#### 11.3.10: `src/theme_2.py:282` (markdown_helper import + clear_cache) + +- [ ] **Task 11.3.10.1: Migrate `src/theme_2.py:282` (markdown_helper cache clear) to `Result[T]`** + - WHERE: `src/theme_2.py:282` + - WHAT: Change to return `Result[None]` + - HOW: Standard pattern + - COMMIT: `refactor(src): theme_2 markdown_helper cache clear to Result[T]` + +### 11.4 - Update callers + +For each of the 21 migrated sites, update all callers to check `result.ok` and use `result.data` or `result.errors`. No caller should ignore `.errors` silently. The `Result` threads through the call chain. + +- [ ] **Task 11.4.1: Update callers of the 21 migrated sites** + - WHERE: each caller of each of the 21 sites + - WHAT: For each caller, change `value = some_func()` to `result = some_func(); if not result.ok: ...; value = result.data`. Or use the `Result` to decide what to do (log, fall back, surface to UI). + - HOW: Read each caller; add the `result.ok` check; thread the errors + - COMMIT: per-call-site or batched + - GIT NOTE: Per-caller changes; the Result now flows through the call chain; no caller ignores `.errors` + +### 11.5 - Update tests + +- [ ] **Task 11.5.1: Add tests for the 21 Result-typed functions** + - WHERE: `tests/` (new tests or extending existing test files) + - WHAT: For each of the 21 sites, add a test that covers: + - The success path: `assert result.ok and result.data == ` + - The error path: `assert not result.ok and result.errors[0].category == ` + - The exception is preserved: `assert result.errors[0].exception is SomeError` + - HOW: Standard pytest patterns + - COMMIT: per-file + - GIT NOTE: Per-site tests; success + error path + +- [ ] **Task 11.5.2: Update existing tests that were calling the slimed sites** + - WHERE: `tests/` (test files that were updated by tier-2 in Phase 10) + - WHAT: Re-update the tests to check the NEW `Result` returns (the tests tier-2 wrote were for the narrow+log version, not the Result version) + - HOW: per-file + - COMMIT: per-file + - GIT NOTE: Tests now assert `Result.ok` and `Result.data`; error path tested + +### 11.6 - Update the per-site report (REJECT Phase 10, document Phase 11) + +- [ ] **Task 11.6.1: Update `docs/reports/RESULT_MIGRATION_SMALL_FILES_20260617.md`** + - WHERE: `docs/reports/RESULT_MIGRATION_SMALL_FILES_20260617.md` + - WHAT: Add a "Phase 11" section that: + - REJECTS Phase 10: "Phase 10 did FULL Result[T] migration for 5 sites but NARROWED+LOG the other 21 sites. Phase 10's 5 new audit heuristics (#22-#26) were LAUNDERING HEURISTICS that classified the narrowing as compliant. Phase 10 is REJECTED." + - Documents the 5 LAUNDERING HEURISTICS being reverted in 11.1 + - Documents the 21 sites being migrated to FULL Result[T] in 11.3 + - Documents the new Heuristic A added in 11.2 + - Documents the test count claim (11 tiers, not 10) + - HOW: append to the existing report; preserve the existing Phase 1-9 + Phase 10 content (with the Phase 10 content marked as REJECTED) + - COMMIT: `docs(report): add Phase 11 results to the per-site report (REJECT Phase 10; redo 21 sites as full Result[T])` + - GIT NOTE: Phase 10 REJECTED; Phase 11 is the actual completion + +### 11.7 - Verification (CRITICAL: test count = 11 tiers, NOT 10) + +**The test count claim MUST be 11 tiers.** Tier-2 has been miscounting in every report. The 11th tier is `tier-1-unit-comms`. **DO NOT CLAIM 10 TIERS.** + +- [ ] **Task 11.7.1: Run the audit post-Phase-11** + - WHERE: `scripts/audit_exception_handling.py` + - WHAT: `uv run python scripts/audit_exception_handling.py --json > audit_post_phase11.json`; verify: + - 0 `INTERNAL_SILENT_SWALLOW` sites in the 37-file scope (the 21 are now Result-typed; Heuristic A recognizes them as `INTERNAL_COMPLIANT`) + - 0 migration-target sites in the 37-file scope (G4 met WITHOUT laundering heuristics) + - 0 new `UNCLEAR` sites (the 14 are reclassified via Heuristic A) + - The 5 LAUNDERING HEURISTICS (#22-#26) are REVERTED + - HOW: parse the JSON; assert the 37 files have 0 V+S sites; assert heuristics #22-#26 are NOT in the audit script + - COMMIT: `docs(track): verify Phase 11 result migration complete (0 SILENT_SWALLOW; 0 laundering heuristics; 0 migration-target in 37-file scope)` + +- [ ] **Task 11.7.2: Run the full test suite - ALL 11 TIERS MUST PASS (NOT 10)** + - WHERE: `tests/` + - WHAT: `uv run python scripts/run_tests_batched.py`; verify ALL 11 tiers PASS: + - tier-1-unit-comms + - tier-1-unit-core + - tier-1-unit-gui + - tier-1-unit-headless + - tier-1-unit-mma + - tier-2-mock_app-comms + - tier-2-mock_app-core + - tier-2-mock_app-gui + - tier-2-mock_app-headless + - tier-2-mock_app-mma + - tier-3-live_gui + - HOW: the batched runner + - COMMIT: rolled into 11.7.1 + - **THE REPORT MUST SAY "11 TIERS", NOT "10 TIERS".** Tier-2 has been miscounting. The 11th tier is `tier-1-unit-comms`. + +- [ ] **Task 11.7.3: Update the track completion report** + - WHERE: `docs/reports/TRACK_COMPLETION_result_migration_small_files_20260617.md` + - WHAT: Add a "Phase 11 Addendum" section that: + - Documents the REJECTION of Phase 10 + - Documents the REVERSION of the 5 LAUNDERING HEURISTICS + - Documents the FULL Result[T] migration of the 21 sites + - Documents the addition of the legitimate Heuristic A + - Documents the test pass count (11 tiers, NOT 10) + - Documents the threading-model impact (Result flows through io_pool for the warmup callback sites) + - HOW: append to the existing report + - COMMIT: `docs(reports): TRACK_COMPLETION_result_migration_small_files_20260617 addendum (Phase 11 - REJECT Phase 10, redo 21 sites)` + - GIT NOTE: Phase 11 is the actual completion; Phase 10 was rejected for the 21-site sliming + +### 11.8 - Mark Phase 11 complete + +- [ ] **Task 11.8.1: Update state.toml and metadata.json** + - WHERE: `conductor/tracks/result_migration_small_files_20260617/state.toml` + `metadata.json`, `conductor/tracks.md` + - WHAT: Mark all Phase 11 tasks completed with commit SHAs; update `status: active -> completed`; `current_phase: 11 -> "complete"`; update `outcomes` in metadata.json + - HOW: edit the files + - COMMIT: `conductor(track): mark result_migration_small_files_20260617 Phase 11 complete (21 sites FULL Result[T]; 5 laundering heuristics REVERTED; Heuristic A added; G4 met)` + - GIT NOTE: Phase 11 is the actual completion; Phase 10 was rejected for sliming + +- [ ] **Task 11.8.2: Update the umbrella spec** + - WHERE: `conductor/tracks/result_migration_20260616/spec.md` + - WHAT: Update the post-sub-track-2 callout: change "Phase 10 in progress" to "Phase 11 complete; FULL Result[T] migration for 76 sites; G4 met WITHOUT laundering heuristics" + - HOW: edit the spec + - COMMIT: `docs(track): update umbrella with sub-track 2 Phase 11 complete (REAL completion)` + - GIT NOTE: 1-sentence note + +--- + ## Risks at the Plan Level | Risk | Mitigation | @@ -482,19 +838,30 @@ The narrowing in sub-track 2 created 14 new UNCLEAR sites that the audit doesn't | **Phase 10 R1:** A site that looks like a SILENT_SWALLOW fallback is actually a conditional capture that needs to inspect the exception to decide what to do | The full Result migration preserves the exception in `result.errors[0].exception`; the caller can inspect it. If the caller needs to branch on the exception, that's a follow-up for the caller (not this phase) | | **Phase 10 R2:** Migrating `Result[T]` through `io_pool` callbacks (warmup) requires the io_pool's API to accept `Result[T]` returns | The io_pool already uses callback-based dispatch; the Result is delivered to the completion handler as a parameter. No io_pool change needed; the caller is updated to check `result.ok` | | **Phase 10 R3:** The 2-3 new audit heuristics misclassify sites that should be `INTERNAL_BROAD_CATCH` or `INTERNAL_SILENT_SWALLOW` | TDD: each heuristic has a failing test first; the test suite covers the canonical patterns. If a heuristic is too broad, narrow the conditions and re-test | +| **Phase 11 R1 (NEW):** Tier-2 may try to use the same LAUNDERING HEURISTICS approach again | The plan REQUIRES full Result migration for the 21 sites; the laundering heuristics are EXPLICITLY REVERTED. The test count claim must be 11 tiers, not 10. The per-site report must clearly state "Phase 10 REJECTED; Phase 11 is the actual completion." Any "narrow + log" pattern is REJECTED. | +| **Phase 11 R2 (NEW):** Tier-2 may try to use "context manager" or "user callback" as excuses for not doing Result migration | `StartupProfiler.phase()` is NOT a context manager. The user callbacks in `WarmupManager` are `Callable[[dict], None]` and stay as-is; the MANAGER's INTERNAL methods are NOT user code. **Look at `src/hot_reloader.py`** for the pattern tier-2 used correctly. Apply the same pattern to `warmup.py`. | +| **Phase 11 R3 (NEW):** Tier-2 may miscount the test tiers again (claiming 10 instead of 11) | The plan EXPLICITLY says "all 11 test tiers PASS" in Task 11.7.2. The 11th tier is `tier-1-unit-comms`. The report MUST say 11, not 10. | +| **Phase 11 R4 (NEW):** Tier-2 may claim the work is done without doing the FULL Result migration for all 21 sites | Each of the 21 sites has a specific task (11.3.1.1 - 11.3.10.1). The plan EXPLICITLY lists each site. The "G4 met" claim requires the audit to show 0 migration-target sites WITHOUT the 5 LAUNDERING HEURISTICS in place. | --- ## Verification Snapshot (capture in the report) -After Phase 9, capture in `docs/reports/RESULT_MIGRATION_SMALL_FILES_20260617.md`: +After Phase 11, capture in `docs/reports/RESULT_MIGRATION_SMALL_FILES_20260617.md` and `docs/reports/TRACK_COMPLETION_result_migration_small_files_20260617.md`: - Audit pre-Phase-1: 76 sites (62V + 10S + 4?); 3 audit-script bugs documented - Audit post-Phase-1: 0 audit-script bugs (the 3 bugs are fixed) - Audit post-Phase-2: 4 UNCLEAR sites classified (decision count by category) - Audit post-Phase-9: 49/76 sites migrated; 27 SILENT_SWALLOW remain; 14 new UNCLEAR sites -- Audit post-Phase-10: 76/76 sites migrated (49 from Phase 3-8 + 27 from Phase 10); 0 SILENT_SWALLOW; 0 UNCLEAR (the 14 reclassified via 2-3 new heuristics) +- Audit post-Phase-10 (REJECTED): 5 sites full Result + 21 sites narrowed+log; 5 LAUNDERING HEURISTICS (#22-#26) added +- Audit post-Phase-11: 76/76 sites FULL Result[T] migration; 0 SILENT_SWALLOW; 0 UNCLEAR; 0 laundering heuristics; 0 migration-target in 37-file scope - Per-file migration summary (76 sites → 0; per-file counts; per-site function signatures + ErrorInfo fields) - Per-site decisions for the 4 UNCLEAR sites -- Audit-script bug-fix summary (3 from Phase 1 + 2-3 from Phase 10; per-bug description + fix) -- Test pass count: all 11 tiers PASS; new tests added (4 for Phase 1 + N for Phase 10 heuristics + M for Phase 10 migrations) +- Audit-script bug-fix summary (3 from Phase 1 + Heuristic A from Phase 11) +- **Test pass count: ALL 11 TIERS PASS** (not 10; the 11th tier is `tier-1-unit-comms`; tier-2 had been miscounting); new tests added (4 for Phase 1 + N for Phase 11) +- Phase 11 REJECTED Phase 10's sliming of 21 sites +- Phase 11 REVERTED the 5 LAUNDERING HEURISTICS (#22-#26) +- Phase 11 ADDED Heuristic A (Result-returning recovery in non-*_result function) +- Phase 11 migrated all 21 slimed sites to FULL Result[T] +- The io_pool callback sites (`warmup.py:139/215/249`) thread the Result through the completion handler (same pattern as `src/hot_reloader.py`) +- `startup_profiler.py:40` was MIGRATED, not skipped (it is NOT a context manager) diff --git a/conductor/tracks/result_migration_small_files_20260617/state.toml b/conductor/tracks/result_migration_small_files_20260617/state.toml index e5ffdf60..b3aab2bb 100644 --- a/conductor/tracks/result_migration_small_files_20260617/state.toml +++ b/conductor/tracks/result_migration_small_files_20260617/state.toml @@ -4,8 +4,8 @@ [meta] track_id = "result_migration_small_files_20260617" name = "Result Migration Sub-Track 2 (Small Files + Audit-Script Bug Fixes)" -status = "completed" -current_phase = "complete" +status = "active" # back to active for Phase 11 (REJECT Phase 10; redo the 21 slimed sites as FULL Result[T]) +current_phase = 11 # 0 = pre-Phase 1; 1..N = in Phase N; "complete" if all phases done last_updated = "2026-06-17" [parent] @@ -31,7 +31,8 @@ phase_6 = { status = "completed", checkpointsha = "f4a445bd", name = "Migrate Ph phase_7 = { status = "completed", checkpointsha = "a5b40bcf", name = "Migrate Phase 7 Batch: Infrastructure + Hook + Utility (8 files)" } phase_8 = { status = "completed", checkpointsha = "c329c869", name = "Migrate MEDIUM files (session_logger, warmup)" } phase_9 = { status = "completed", checkpointsha = "34387b9f", name = "Verification (audit re-run + test pass count + report + completion)" } -phase_10 = { status = "completed", checkpointsha = "48fb9577", name = "Complete the Result[T] migration (27 SILENT_SWALLOW + 14 new UNCLEAR sites)" } +phase_10 = { status = "completed", checkpointsha = "48fb9577", name = "Complete the Result[T] migration (27 SILENT_SWALLOW + 14 new UNCLEAR sites) — REJECTED for sliming 21 sites" } +phase_11 = { status = "in_progress", checkpointsha = "", name = "ACTUAL Full Result[T] migration (REJECT Phase 10; revert 5 laundering heuristics; redo 21 sites)" } [tasks] # Phase 1: Audit-Script Bug Fixes @@ -134,6 +135,42 @@ t10_5_3 = { status = "pending", commit_sha = "", description = "Update track com t10_6_1 = { status = "pending", commit_sha = "", description = "Mark Phase 10 completed (state + metadata + tracks.md)" } t10_6_2 = { status = "pending", commit_sha = "", description = "Update umbrella spec to remove the follow-up note (Phase 10 complete; G4 resolved)" } +# Phase 11: ACTUAL Full Result[T] migration (REJECT Phase 10; revert laundering heuristics; redo 21 sites) +t11_1_1 = { status = "pending", commit_sha = "", description = "REVERT heuristic #22 (narrow+return fallback) — classifies non-Result narrowing as compliant, WRONG" } +t11_1_2 = { status = "pending", commit_sha = "", description = "REVERT heuristic #23 (narrow+use error inline) — wrong" } +t11_1_3 = { status = "pending", commit_sha = "", description = "REVERT heuristic #24 (narrow+assign fallback) — wrong" } +t11_1_4 = { status = "pending", commit_sha = "", description = "REVERT heuristic #25 (narrow+uses traceback) — wrong" } +t11_1_5 = { status = "pending", commit_sha = "", description = "REVERT heuristic #26 (narrow+non-trivial body catch-all) — worst laundering heuristic" } +t11_2_1 = { status = "pending", commit_sha = "", description = "Write failing test for legitimate Heuristic A (return Result in non-*_result function = INTERNAL_COMPLIANT)" } +t11_2_2 = { status = "pending", commit_sha = "", description = "Implement Heuristic A in _classify_except" } +t11_3_1_1 = { status = "pending", commit_sha = "", description = "Migrate src/warmup.py:139 (on_complete callback) to Result[T] — use the hot_reloader.py pattern (NOT 'user callback' excuse)" } +t11_3_1_2 = { status = "pending", commit_sha = "", description = "Migrate src/warmup.py:215 (_record_success) to Result[T]" } +t11_3_1_3 = { status = "pending", commit_sha = "", description = "Migrate src/warmup.py:249 (_record_failure) to Result[T]" } +t11_3_1_4 = { status = "pending", commit_sha = "", description = "Migrate src/warmup.py:276 (_log_canary) to Result[T]" } +t11_3_1_5 = { status = "pending", commit_sha = "", description = "Migrate src/warmup.py:300 (_log_summary) to Result[T]" } +t11_3_1_6 = { status = "pending", commit_sha = "", description = "Update io_pool completion handler in warmup.py to check result.ok (thread the Result through)" } +t11_3_2_1 = { status = "pending", commit_sha = "", description = "Migrate src/startup_profiler.py:40 (phase) to Result[None] — it is NOT a context manager" } +t11_3_3_1 = { status = "pending", commit_sha = "", description = "Migrate src/project_manager.py:366 (state.from_dict) to Result[Dict]" } +t11_3_3_2 = { status = "pending", commit_sha = "", description = "Migrate src/project_manager.py:378 (metadata.json read) to Result[Dict]" } +t11_3_3_3 = { status = "pending", commit_sha = "", description = "Migrate src/project_manager.py:393 (plan.md read) to Result[Dict]" } +t11_3_4_1 = { status = "pending", commit_sha = "", description = "Migrate src/orchestrator_pm.py:37 (metadata read) to Result[Dict]" } +t11_3_4_2 = { status = "pending", commit_sha = "", description = "Migrate src/orchestrator_pm.py:49 (spec read) to Result[Dict]" } +t11_3_5_1 = { status = "pending", commit_sha = "", description = "Migrate src/file_cache.py:98 (_get_mtime) to Result[float]; remove dead try/except StopIteration" } +t11_3_6_1 = { status = "pending", commit_sha = "", description = "Migrate src/api_hooks.py:914 (WebSocket cleanup) to Result[None]" } +t11_3_7_1 = { status = "pending", commit_sha = "", description = "Migrate src/log_registry.py:249 (session path scan) to Result[Dict]" } +t11_3_8_1 = { status = "pending", commit_sha = "", description = "Migrate src/models.py:508 (from_dict datetime.fromisoformat) to Result[Dict]" } +t11_3_9_1 = { status = "pending", commit_sha = "", description = "Migrate src/multi_agent_conductor.py:317 (persona load) to Result[Dict]" } +t11_3_10_1 = { status = "pending", commit_sha = "", description = "Migrate src/theme_2.py:282 (markdown_helper cache clear) to Result[None]" } +t11_4_1 = { status = "pending", commit_sha = "", description = "Update callers of the 21 migrated sites to check result.ok and use result.data or result.errors" } +t11_5_1 = { status = "pending", commit_sha = "", description = "Add tests for the 21 Result-typed functions (success path + error path + exception preserved)" } +t11_5_2 = { status = "pending", commit_sha = "", description = "Update existing tests that were calling the slimed sites (tier-2 wrote tests for narrow+log; update for Result)" } +t11_6_1 = { status = "pending", commit_sha = "", description = "Update per-site report: REJECT Phase 10; document Phase 11 (21 sites FULL Result; 5 heuristics REVERTED; Heuristic A added)" } +t11_7_1 = { status = "pending", commit_sha = "", description = "Run audit post-Phase-11; verify 0 SILENT_SWALLOW + 0 laundering heuristics + 0 migration-target in 37-file scope" } +t11_7_2 = { status = "pending", commit_sha = "", description = "Run full test suite; verify ALL 11 TIERS PASS (not 10) — tier-1-unit-comms is the 11th" } +t11_7_3 = { status = "pending", commit_sha = "", description = "Update track completion report with Phase 11 addendum (REJECT Phase 10; redo 21 sites)" } +t11_8_1 = { status = "pending", commit_sha = "", description = "Update state.toml + metadata.json + tracks.md to mark Phase 11 complete" } +t11_8_2 = { status = "pending", commit_sha = "", description = "Update umbrella spec: Phase 11 complete; FULL Result[T] migration for 76 sites; G4 met WITHOUT laundering heuristics" } + [verification] phase_1_audit_fixes_complete = true phase_2_unclear_classification_complete = true @@ -144,16 +181,20 @@ phase_6_provider_batch_complete = true phase_7_infra_batch_complete = true phase_8_medium_files_complete = true phase_9_verification_complete = true -phase_10_result_migration_complete = true +phase_10_result_migration_complete = true # REJECTED; the 21 sites were slimed (narrow+log), not full Result report_exists = true umbrella_spec_updated = true -audit_post_migration_zero_migration_target = true +audit_post_migration_zero_migration_target = true # FALSE — 5 laundering heuristics were added; 21 sites are still not Result-typed test_pass_count_unchanged = true metadata_json_status_completed = true -silent_swallow_sites_migrated_to_result = 26 +silent_swallow_sites_migrated_to_result = 26 # REJECTED — only 5 were FULL Result; 21 were slimed new_unclear_sites_reclassified = 17 -new_audit_heuristics_added_phase_10 = 5 +new_audit_heuristics_added_phase_10 = 5 # REJECTED — these are LAUNDERING heuristics; REVERTED in Phase 11 io_pool_callback_sites_threaded_result = 4 +phase_11_audit_heuristics_reverted = 0 # 5 LAUNDERING heuristics (#22-#26) must be reverted +phase_11_sites_migrated_to_full_result = 0 # 21 slimed sites must be FULL Result +phase_11_heuristic_a_added = false +phase_11_result_migration_complete = false [scope_metrics] files_target = 37 @@ -170,6 +211,11 @@ unclear_sites_migration_target = 2 new_unclear_sites_from_narrowing = 14 audit_bugs_fixed_phase_1 = 3 audit_heuristics_added_phase_1 = 0 -audit_heuristics_added_phase_10 = 5 +audit_heuristics_added_phase_10 = 5 # REJECTED — LAUNDERING heuristics +audit_heuristics_reverted_phase_11 = 0 # 5 LAUNDERING heuristics (#22-#26) must be reverted +audit_heuristics_added_phase_11 = 0 # Heuristic A (legitimate) must be added new_tests_added = 6 io_pool_callback_sites = 4 # warmup.py:139, 215, 249 + hot_reloader.py:58 +sites_migrated_phase_11 = 0 # 21 slimed sites must be FULL Result +silent_swallow_sites_remaining = 27 # 21 slimed + 6 already-Result'd; all 21 need Result +narrowing_pattern_rejected = true # tier-2 used narrow+log for 21 sites; REJECTED