conductor(state): fix_mma_concurrent_tracks_sim_20260627 SHIPPED (with 5 fixes)

All tier-3-live_gui tests now pass. Track complete with 5 fixes:

1. e9919059: TrackMetadata import (production NameError)
2. 913aa48c: Mock sprint routing (session_id-based was fragile)
3. fad1755b: Mock epic catch-all (literal-substring was fragile)
4. d28e373e: Mock worker fallback (stale session_id leaked)
5. 55dae159: Remove 'refresh_from_project' task (was overwriting
   self.tracks with a disk read returning 0 tracks in batched env)

Verified:
- test_mma_concurrent_tracks_execution: PASS
- test_mma_concurrent_tracks_stress: PASS
- 15 wider tests: PASS (237.63s)
- 3 consecutive runs of the failing combination: PASS (100s each)

OUTSTANDING_MMA_TEST_FAILURES_20260627.md updated with section 7
documenting the refresh_from_project bug and fix.

State.toml updated to reflect all 5 fixes and the 3 verification
runs. Track status: active (final SHIPPED commit pending TRACK_COMPLETION
update).

The parent branch tier2/post_module_taxonomy_de_cruft_20260627 is now
ready for merge after this fix track is reviewed.
This commit is contained in:
ed
2026-06-27 16:50:44 -04:00
parent 55dae159da
commit 9d22c37cee
2 changed files with 36 additions and 12 deletions
@@ -144,3 +144,22 @@ The stress test (`tests/test_mma_concurrent_tracks_stress_sim.py::test_mma_concu
**Status:****FIXED** in commit `fad1755b` (restructured routing so sprint and worker are checked first, and any non-empty prompt that doesn't match those patterns is treated as an epic request returning 2 tracks).
**Verification:** 3 consecutive PASS runs of both `test_mma_concurrent_tracks_execution` AND `test_mma_concurrent_tracks_stress` (13.94s, 14.81s, 14.13s).
### 7. ✅ **RESOLVED** — Production bug: 'refresh_from_project' task overwrites self.tracks
**Date:** 2026-06-27 (discovered after the second batched test run)
After the epic catch-all fix, the batched test still failed. Diagnostic logging revealed that `self.tracks` was being replaced between track appends (different `id(self.tracks)` values in the log). Root cause:
`_start_track_logic_result` (and `_cb_accept_tracks._bg_task`) appended a `'refresh_from_project'` task to `_pending_gui_tasks` at the end. The main thread processed this task by calling `_refresh_from_project`, which does:
self.tracks = project_manager.get_all_tracks(self.active_project_root)
This REPLACED `self.tracks` with a fresh disk read. In batched test environments, the disk read returned 0 tracks (due to timing or path issues), losing the in-memory tracks that were just appended by `self.tracks.append(...)`.
**Fix:** Remove the `'refresh_from_project'` task appends from both `_start_track_logic_result` and `_cb_accept_tracks._bg_task`. The bg_task already updates `self.tracks` directly via `self.tracks.append(...)`. The refresh is unnecessary for the accept flow because the other state (files, disc_entries, etc.) doesn't change during the accept.
**Status:****FIXED** in commit `55dae159`.
**Verification:** 3 consecutive PASS runs of the failing test combination (test_context_sim_live + test_mma_concurrent_tracks_execution + test_mma_concurrent_tracks_stress) at 100.57s, 100.29s, 100.18s. Also passes 15 wider tests (237.63s) with no regressions.