diff --git a/tests/artifacts/post_mma_reset_fix_batch_20260610.log b/tests/artifacts/post_mma_reset_fix_batch_20260610.log new file mode 100644 index 00000000..b1937862 --- /dev/null +++ b/tests/artifacts/post_mma_reset_fix_batch_20260610.log @@ -0,0 +1,40 @@ +# Post mma_tier_usage_reset_fix batch verification (2026-06-10) + +## Track +`mma_tier_usage_reset_fix_20260610` — Fix mma_tier_usage reset + 3 pre-existing controller bugs + +## Verification Results + +### Tests directly verified to pass post-fix + +| Test File | Tests | Result | Notes | +|-----------|-------|--------|-------| +| `tests/test_mma_tier_usage_reset_fix.py` | 4 | 4/4 PASS | NEW regression tests (FR1-FR4) | +| `tests/test_reset_session_clears_mma_and_rag.py` | 3 | 3/3 PASS | Pre-existing fe240db4 regression tests | +| `tests/test_context_presets_manager.py` | 4 | 4/4 PASS | Includes test_app_controller_save_load (was failing pre-FR3) | +| `tests/test_project_switch_persona_preset.py` | 9 | 9/9 PASS | Includes test_load_active_project_creates_persona_manager and test_load_context_preset_missing_raises_keyerror (both failing pre-track) | +| `tests/test_handle_reset_session_clears_project.py` | 4 | 4/4 PASS | _handle_reset_session related | +| `tests/test_view_presets.py` | 5 | 5/5 PASS | Calls _flush_to_project at line 54 | +| `tests/test_tiered_aggregation.py` | 3 | 3/3 PASS | mma_tier_usage related | +| `tests/test_extended_sims.py` (live_gui) | 4 | 4/4 PASS | test_context_sim_live + 3 siblings; the original failure that motivated the track | + +**Total: 36/36 directly-affected tests pass** + +### What was failing pre-track +- `test_context_sim_live` (and 3 sibling sim tests) — `KeyError: 'model'` from `_flush_to_project` because `mma_tier_usage` was reset to empty dicts +- `test_app_controller_save_load` — `AttributeError: 'NoneType' object has no attribute 'save_preset'` (missing `self.context_preset_manager` init) +- `test_load_context_preset_missing_raises_keyerror` — same as above +- `test_load_active_project_creates_persona_manager` — `hasattr()` returned True for missing `persona_manager` because `__getattr__` returned None + +### Commits Applied (atomic per-FR) +1. `d80c94b9` FR1: pre-populate `mma_tier_usage` on reset +2. `1919aa8a` FR2: `_flush_to_project` defensive `d.get("model")` +3. `bc4651d1` FR3: re-add `self.context_preset_manager = ContextPresetManager()` in `__init__` +4. `4284ec6e` FR4: remove `persona_manager` from `_LAZY_MANAGER_DEFAULTS` + fix misleading comment +5. `b96d709e` Regression tests + +### Note on the test fixture +The test fixture in `tests/test_mma_tier_usage_reset_fix.py` sets 4 UI flags (`ui_project_preset_name`, `ui_word_wrap`, `ui_gemini_cli_path`, `ui_auto_add_history`) that `_flush_to_project` reads but `__init__` does not initialize. This is a test-only setup, not a production change. The pre-existing working tree (from a previous agent's WIP commit) had removed 7 entries from `_UI_FLAG_DEFAULTS` including 3 of these flags. Reverting the `_UI_FLAG_DEFAULTS` refactor was deemed out of scope for this track; the test fixture was extended instead. A follow-up to clean up `_UI_FLAG_DEFAULTS` is recommended. + +### Note on full batch run +The full `scripts/run_tests_batched.py` run was aborted by the user after a partial run. The targeted test runs above cover all known affected code paths. The 4 sim tests, which were the primary motivation for the track, all pass.