chore(conductor): Archive tech debt track and cleanup registry
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
# Track tech_debt_and_test_cleanup_20260302 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"track_id": "tech_debt_and_test_cleanup_20260302",
|
||||
"type": "chore",
|
||||
"status": "new",
|
||||
"created_at": "2026-03-02T00:00:00Z",
|
||||
"updated_at": "2026-03-02T00:00:00Z",
|
||||
"description": "Tech debt cleanup: Centralize duplicate app_instance fixtures, fix zero-assertion tests, and remove dead unused variables/methods from gui_2.py."
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
# Implementation Plan: Tech Debt & Test Discipline Cleanup
|
||||
|
||||
Architecture reference: [docs/guide_architecture.md](../../../docs/guide_architecture.md)
|
||||
|
||||
---
|
||||
|
||||
## Phase 1: Test Suite Deduplication and Centralization
|
||||
Focus: Move `app_instance` and `mock_app` to `tests/conftest.py` and remove them from individual test files.
|
||||
|
||||
- [x] Task 1.1: Add `app_instance` and `mock_app` fixtures to `tests/conftest.py`. Ensure they properly yield the App instance and tear down. [35822aa]
|
||||
- [x] Task 1.2: Remove local `app_instance` and `mock_app` fixtures from all identified test files. (Tier 3 Worker string replacement / rewrite). [a569f8c]
|
||||
- [x] Task 1.3: Delete `tests/test_ast_parser_curated.py` if its contents are fully duplicated in `test_ast_parser.py`, or merge any missing tests. [a569f8c]
|
||||
- [x] Task 1.4: Run the test suite (`pytest`) to ensure no fixture resolution errors. [a569f8c]
|
||||
|
||||
## Phase 2: False-Positive Test Exposure
|
||||
Focus: Make zero-assertion tests fail loudly so they can be properly tracked.
|
||||
|
||||
- [x] Task 2.1: Add `pytest.fail("TODO: Implement assertions")` to `test_workflow_sim.py`, `test_sim_ai_settings.py`, `test_sim_tools.py`, `test_api_events.py` and any other tests identified as having zero assertions or just a `pass`. [a569f8c]
|
||||
- [x] Task 2.2: Add `@pytest.mark.skip(reason="TODO: Implement assertions")` to the visual simulation tests that only have a `pass` block. (Checked visual tests; they had assertions or EOF handling, so no skips were needed for "pure pass" blocks). [a569f8c]
|
||||
|
||||
## Phase 3: Dead Code Excision in `gui_2.py`
|
||||
Focus: Remove unused state variables and dead HTTP/background methods.
|
||||
|
||||
- [x] Task 3.1: In `gui_2.py` `__init__`, remove the initialization of unused state variables like `_token_budget_limit`, `_token_budget_pct`, etc. [a569f8c]
|
||||
- [x] Task 3.2: Delete unused method definitions from `gui_2.py` (FastAPI leftovers). Preserved active methods like `_load_fonts` and `_parse_history_entries`. [a569f8c]
|
||||
- [x] Task 3.3: Run `gui_2.py --headless` to verify the application still initializes properly without these variables/methods. [a569f8c]
|
||||
@@ -1,24 +0,0 @@
|
||||
# Track Specification: Tech Debt & Test Discipline Cleanup
|
||||
|
||||
## Overview
|
||||
Due to rapid iterative development and feature bleed across multiple Tier 2-led tracks, significant tech debt has accumulated in both the testing suite and `gui_2.py`.
|
||||
This track will clean up test fixtures, enforce test assertion integrity, and remove dead codebase remnants.
|
||||
|
||||
## Current State Audit
|
||||
1. **Duplicate Fixtures**: The `app_instance` fixture is duplicated across 13 test files (e.g. `test_gui_events.py`, `test_process_pending_gui_tasks.py`). `mock_app` is similarly duplicated. They should live in `tests/conftest.py`.
|
||||
2. **Duplicate Tests**: `test_ast_parser_get_curated_view` exists in both `test_ast_parser.py` and `test_ast_parser_curated.py`.
|
||||
3. **Zero-Assertion Tests**: Many simulation tests and API event tests (e.g., `test_setup_new_project`, `test_sim_ai_settings.py`, `visual_sim_gui_ux.py`) merely run `pass` or execute commands without assertions, acting as a false positive for code coverage.
|
||||
4. **Dead State/Methods in gui_2.py**:
|
||||
- `gui_2.py.__init__` assigns state variables never read: `_role`, `_ticket_id`, `_uid`, `_base_dir`, `last_md_path`, `_scroll_tool_calls_to_bottom`, `_token_budget_limit`, `_token_budget_pct`, `_token_budget_current`.
|
||||
- `gui_2.py` has uncalled boilerplate methods (FastAPI leftovers or old logic): `do_fetch`, `do_post`, `fetch_stats`, `health`, `get_session`, `list_sessions`, `delete_session`, `status`, `get_context`, `_bg_task`, `_push_t1_usage`, `_load_fonts`, `run_prune`, `_parse_history_entries`, `confirm_action`, `pending_actions`, `token_stats`.
|
||||
|
||||
## Desired State
|
||||
- `app_instance` and `mock_app` fixtures centralized in `conftest.py`.
|
||||
- Duplicate test files/functions removed.
|
||||
- Tests without assertions marked with `pytest.fail("TODO: Add assertions")` so they correctly show as incomplete.
|
||||
- Unused variables and methods completely removed from `gui_2.py`.
|
||||
|
||||
## Technical Constraints
|
||||
- The `app_instance` fixture requires the `live_gui` logic or an isolated `App` instance setup. Must ensure it does not leak state when placed in `conftest.py`.
|
||||
- Ensure removal of unused variables in `gui_2.py` does not break any reflection/serialization if they are coincidentally used by config savers (though AST confirmed they are not read locally).
|
||||
- Must adhere to 1-space indentation for `gui_2.py`.
|
||||
@@ -1,18 +0,0 @@
|
||||
discussion = []
|
||||
|
||||
[metadata]
|
||||
id = "track-1"
|
||||
name = "Test Track"
|
||||
status = "idle"
|
||||
created_at = "2026-03-02T21:03:18.362973"
|
||||
updated_at = "2026-03-02T21:04:22.986795"
|
||||
|
||||
[[tasks]]
|
||||
id = "T-001"
|
||||
description = "desc"
|
||||
status = "todo"
|
||||
assigned_to = "tier3-worker"
|
||||
context_requirements = []
|
||||
depends_on = []
|
||||
step_mode = false
|
||||
retry_count = 0
|
||||
Reference in New Issue
Block a user