{
  "id": "live_gui_test_fixes_20260618",
  "title": "Live GUI Test Infrastructure Fixes (test_execution_sim_live GUI crash + test_live_gui_workspace_exists xdist race)",
  "type": "test-infrastructure",
  "status": "active",
  "priority": "A",
  "created": "2026-06-18",
  "owner": "tier2-tech-lead",
  "parent_umbrella": null,
  "spec": "conductor/tracks/live_gui_test_fixes_20260618/spec.md",
  "plan": "conductor/tracks/live_gui_test_fixes_20260618/plan.md",
  "scope": {
    "files_affected_test": 2,
    "files_affected_test_paths": [
      "tests/test_extended_sims.py",
      "tests/test_live_gui_workspace_fixture.py"
    ],
    "files_affected_src": "1 (likely src/gui_2.py or src/app_controller.py)",
    "files_affected_conftest": "1 (potentially tests/conftest.py if xdist fix touches the fixture)",
    "issues_addressed": 2,
    "issue_1": "test_execution_sim_live GUI subprocess crash on port 8999 (tier-3-live_gui)",
    "issue_2": "test_live_gui_workspace_exists xdist race (tier-1-unit-gui)",
    "test_tier_count": 11,
    "test_tier_count_emphasis": "11, NOT 10, NOT 9. This is the SIXTH time this is being emphasized across the result_migration sub-tracks."
  },
  "depends_on": [
    "result_migration_small_files_20260617 (shipped 2026-06-18; reported the 2 issues for diff tracks in Phase 13)"
  ],
  "blocks": [
    "sub-track 2 of result_migration_20260616 (full closure requires the 2 issues fixed)"
  ],
  "out_of_scope": [
    "The 4 @pytest.mark.skip markers for Gemini 503 pre-existing failures (test_auto_aggregate_skip, test_view_mode_summary, test_view_mode_default_summary, test_view_mode_custom_empty_default_to_summary). These depend on the live Gemini API. To remove them, mock the Gemini API in summarize.summarise_file for tests. This is a separate concern; deferred to a follow-up track.",
    "Sub-track 3 (result_migration_app_controller) and beyond. This track is a precondition for sub-track 2's full closure; sub-track 3 is a separate track.",
    "The 4 audit-script bug fixes from sub-track 2 Phase 1 (already done in commit 4c536e79).",
    "The 27 sites migrated in sub-track 2 (already done in Phases 3-8 and Phase 12).",
    "Phase 13 state.toml cleanup (the phase_13_all_11_tiers_actually_pass = false flag inconsistency). This is a small cleanup task; will be done in a separate commit, not in this track."
  ],
  "test_summary": {
    "issues_to_fix": 2,
    "new_tests_added": "2-3 (TDD tests for each issue)",
    "modified_tests": 0,
    "test_tier_count": 11,
    "test_pass_count_target": "11/11 tiers PASS clean (no documented issues from this track; 4 Gemini 503 skip markers remain out of scope)"
  },
  "verification_criteria": [
    "FR-1: test_execution_sim_live passes in isolation AND in batched run",
    "FR-2: test_live_gui_workspace_exists passes in isolation AND in batched run. Verified on parent commit 4ab7c732 first.",
    "FR-3: All 11 test tiers pass clean (no documented issues from this track)",
    "FR-4: Issue 2 parent-commit verification recorded in tests/artifacts/PHASE14_PARENT_VERIFICATION.log",
    "No new @pytest.mark.skip markers added by this track",
    "Atomic per-task commits with git notes",
    "No day estimates, no T-shirt sizes in any artifact"
  ],
  "risks": [
    {
      "id": "R1",
      "description": "Tier-2 adds a @pytest.mark.skip for Issue 1 or Issue 2",
      "mitigation": "The plan EXPLICITLY says 'no new @pytest.mark.skip markers'. User directive: investigate and fix. If the fix is too large, escalate to a follow-up track (do not skip)."
    },
    {
      "id": "R2",
      "description": "Tier-2 miscounts test tiers (claiming 10 instead of 11)",
      "mitigation": "The plan EXPLICITLY says 'all 11 test tiers PASS'. This is the sixth time."
    },
    {
      "id": "R3",
      "description": "Tier-2 leaves diagnostic logging in production",
      "mitigation": "The plan EXPLICITLY says 'MUST be removed in Task 3.5'. Per AGENTS.md 'No Diagnostic Noise in Production' rule. The verification step (grep for DIAG) catches this."
    },
    {
      "id": "R4",
      "description": "The GUI subprocess crash root cause is in a 3rd-party library (imgui, etc.)",
      "mitigation": "The fix is a workaround in our code (e.g., retry, error handling). Document the workaround."
    },
    {
      "id": "R5",
      "description": "The xdist race fix requires a fundamental change to the live_gui fixture",
      "mitigation": "Investigate the fixture carefully. If the fix touches src/app_controller.py or src/gui_2.py, run the full 11-tier test suite after the fix."
    },
    {
      "id": "R6",
      "description": "The fixes regress the 4 Gemini 503 skip markers",
      "mitigation": "The 4 skip markers are network-dependent (Gemini 503). The fixes are in test infrastructure, not in summarize.summarise_file. The skip markers should still be needed. Verify by re-running the 4 tests."
    }
  ],
  "estimated_effort": {
    "method": "Scope (per conductor/workflow.md section Tier 1 Track Initialization Rules). NO day estimates. The user / Tier 2 agent decides the actual pacing.",
    "scope": "2 issues; 2-3 files affected (test + src); TDD for each issue; 11-tier verification"
  },
  "deferred_to_followup_tracks": [
    {
      "id": "remove_gemini_503_skip_markers",
      "title": "Remove 4 @pytest.mark.skip markers for Gemini 503 pre-existing failures",
      "description": "Mock the Gemini API in summarize.summarise_file for tests. The 4 tests are: test_auto_aggregate_skip, test_view_mode_summary, test_view_mode_default_summary, test_view_mode_custom_empty_default_to_summary.",
      "track_status": "deferred to follow-up track (out of scope for this small track)"
    }
  ]
}
