chore(conductor): Archive completed and deprecated tracks

- Moved codebase_migration_20260302 to archive

- Moved gui_decoupling_controller_20260302 to archive

- Moved test_architecture_integrity_audit_20260304 to archive

- Removed deprecated test_suite_performance_and_flakiness_20260302
This commit is contained in:
2026-03-05 09:51:11 -05:00
parent c295db1630
commit d0e7743ef6
21 changed files with 0 additions and 83 deletions

View File

@@ -1,5 +0,0 @@
# Track test_suite_performance_and_flakiness_20260302 Context
- [Specification](./spec.md)
- [Implementation Plan](./plan.md)
- [Metadata](./metadata.json)

View File

@@ -1,8 +0,0 @@
{
"track_id": "test_suite_performance_and_flakiness_20260302",
"type": "chore",
"status": "new",
"created_at": "2026-03-02T22:30:00Z",
"updated_at": "2026-03-02T22:30:00Z",
"description": "Replace arbitrary time.sleep() calls with deterministic polling/Events and optimize test speed."
}

View File

@@ -1,51 +0,0 @@
# Implementation Plan: Test Suite Performance & Flakiness (test_suite_performance_and_flakiness_20260302)
> **TEST DEBT FIX:** This track is responsible for eliminating the `RuntimeError: Event loop is closed` deadlocks and zombie subprocesses discovered during the `test_architecture_integrity_audit_20260304` audit.
## Phase 1: Asyncio Decoupling & Queue Refactor
- [ ] Task: Initialize MMA Environment `activate_skill mma-orchestrator`
- [ ] Task: Rip out `asyncio` from `AppController`
- [ ] WHERE: `src/app_controller.py` and `src/events.py`
- [ ] WHAT: Replace `events.AsyncEventQueue` with a standard `queue.Queue`. Convert `_process_event_queue` to a synchronous `while True` loop running in a daemon thread.
- [ ] HOW: Remove all `async`/`await` and `asyncio.run_coroutine_threadsafe` calls related to the internal event queue.
- [ ] SAFETY: Ensures test teardowns no longer violently crash background event loops.
- [ ] Task: Ensure Phantom Processes are Killed
- [ ] WHERE: `tests/conftest.py`
- [ ] WHAT: Verify the `kill_process_tree` implementation added in the audit is fully robust against hanging `sloppy.py` instances.
- [ ] HOW: Test with intentional process hangs.
- [ ] Task: Conductor - User Manual Verification 'Phase 1: Asyncio Decoupling'
## Phase 2: Audit & Polling Primitives
- [ ] Task: Initialize MMA Environment `activate_skill mma-orchestrator`
- [ ] Task: Create Deterministic Polling Primitives
- [ ] WHERE: `tests/conftest.py`
- [ ] WHAT: Implement a `wait_until(predicate_fn, timeout=5.0, interval=0.05)` utility.
- [ ] HOW: Standard while loop that evaluates `predicate_fn()`.
- [ ] SAFETY: Ensure it raises a clear `TimeoutError` if it fails.
- [ ] Task: Conductor - User Manual Verification 'Phase 1: Polling Primitives' (Protocol in workflow.md)
## Phase 2: Refactoring Integration Tests
- [ ] Task: Refactor `test_spawn_interception.py`
- [ ] WHERE: `tests/test_spawn_interception.py`
- [ ] WHAT: Replace hardcoded sleeps with `wait_until` checking the `event_queue` or internal state.
- [ ] HOW: Use the new `conftest.py` utility.
- [ ] SAFETY: Prevent event loop deadlocks.
- [ ] Task: Refactor Simulation Waits
- [ ] WHERE: `simulation/*.py` and `tests/test_live_gui_integration.py`
- [ ] WHAT: Replace `time.sleep()` blocks with `ApiHookClient.wait_for_event` or `client.wait_until_value_equals`.
- [ ] HOW: Expand `ApiHookClient` polling capabilities if necessary.
- [ ] SAFETY: Ensure the GUI hook server remains responsive during rapid polling.
- [ ] Task: Conductor - User Manual Verification 'Phase 2: Refactoring Sleeps' (Protocol in workflow.md)
## Phase 3: Test Marking & Final Validation
- [ ] Task: Apply Slow Test Marks
- [ ] WHERE: Across all `tests/`
- [ ] WHAT: Add `@pytest.mark.slow` to any test requiring a live GUI boot or API mocking that takes >2 seconds.
- [ ] HOW: Import pytest and apply the decorator.
- [ ] SAFETY: Update `pyproject.toml` to register the `slow` marker.
- [ ] Task: Full Suite Performance Validation
- [ ] WHERE: Project root
- [ ] WHAT: Run `uv run pytest -m "not slow"` and verify execution time < 10 seconds. Run `uv run pytest` to ensure total suite passes.
- [ ] HOW: Time the terminal command.
- [ ] SAFETY: None.
- [ ] Task: Conductor - User Manual Verification 'Phase 3: Final Validation' (Protocol in workflow.md)

View File

@@ -1,19 +0,0 @@
# Track Specification: Test Suite Performance & Flakiness (test_suite_performance_and_flakiness_20260302)
## Overview
The test suite currently takes over 5.0 minutes to execute and frequently hangs on integration tests (e.g., `test_spawn_interception.py`). Several simulation tests are flaky or timing out. This track replaces arbitrary `time.sleep()` calls with deterministic polling (`threading.Event()`), aiming to drive the core TDD test execution time down to under 10 seconds.
## Architectural Constraints
- **Zero Arbitrary Sleeps**: `time.sleep(1.0)` is banned in test files unless testing actual rate-limiting or debounce functionality.
- **Deterministic Waits**: Tests must use state-polling (with aggressive micro-sleeps) or `asyncio.Event` / `threading.Event` to proceed exactly when the system is ready.
## Functional Requirements
- Audit all `tests/` and `simulation/` files for `time.sleep()`.
- Implement polling helper functions in `conftest.py` (e.g., `wait_until(condition_func, timeout)`).
- Refactor all integration tests to use the deterministic polling helpers.
- Apply `@pytest.mark.slow` to any test that legitimately takes >2 seconds, allowing developers to skip them during rapid TDD loops.
## Acceptance Criteria
- [ ] `time.sleep` occurrences in the test suite are eliminated or strictly justified.
- [ ] The core unit test suite (excluding `@pytest.mark.slow`) executes in under 10 seconds.
- [ ] Integration tests pass consistently without flakiness across 10 consecutive runs.