docs: close mma_agent_focus_ux track; log concurrent-tier + hook-verification backlog items

This commit is contained in:
2026-03-02 16:31:32 -05:00
parent 22b08ef91e
commit 40b50953a1
2 changed files with 29 additions and 1 deletions

View File

@@ -47,6 +47,24 @@
- **Heuristics & Backlog**: Added Data-Oriented Design and Immediate Mode architectural heuristics (inspired by Muratori/Acton) to product-guidelines.md. Logged future decoupling and robust parsing tracks to a 'Future Backlog' in TASKS.md.
---
## 2026-03-02 (Session 4)
### Track: mma_agent_focus_ux_20260302 — Completed |TASK:mma_agent_focus_ux_20260302|
- **What**: Per-tier agent focus UX — source_tier tagging + Focus Agent filter UI (all 3 phases)
- **Why**: All MMA observability panels were global/session-scoped; traffic from Tier 2/3/4 was indistinguishable
- **How**:
- Phase 1: Added `current_tier: str | None` module var to `ai_client.py`; `_append_comms` stamps `source_tier: current_tier` on every comms entry; `run_worker_lifecycle` sets `"Tier 3"` / `generate_tickets` sets `"Tier 2"` around `send()` calls, clears in `finally`; `_on_tool_log` captures `current_tier` at call time; `_append_tool_log` migrated from tuple to dict with `source_tier` field; `_pending_tool_calls` likewise. Checkpoint: bc1a570
- Phase 2: `_render_tool_calls_panel` migrated from tuple destructure to dict access. Checkpoint: 865d8dd
- Phase 3: `ui_focus_agent: str | None` state var added; Focus Agent combo (All/Tier2/3/4) + clear button above OperationsTabs; filter logic in `_render_comms_history_panel` and `_render_tool_calls_panel`; `[source_tier]` label per comms entry header. Checkpoint: b30e563
- **Issues**:
- `claude_mma_exec.py` fails with nested session block — user authorized inline implementation for this track
- Task 2.1 set_file_slice applied at shifted line, leaving stale tuple destructure + missing `i = i_minus_one + 1`; caught and fixed in Phase 3 Task 3.4
- **Known limitation**: `current_tier` is a module-level `str | None` — safe only because MMA engine serializes `send()` calls. Concurrent Tier 3/4 agents (future) will require `threading.local()` or per-ticket context passing. Logged to backlog.
- **Verification gap noted**: No API hook endpoints expose `ui_focus_agent` state for automated testing. Future tracks should wire widget state to `_settable_fields` for `live_gui` fixture verification. Logged to backlog.
- **Result**: 18 tests passing. Focus Agent combo visible in Operations Hub. Comms entries show `[main]`/`[Tier N]` labels. Meta-Level Sanity Check: 53 ruff errors in gui_2.py before and after — zero new violations.
---
## 2026-03-02 (Session 3)
### Track: feature_bleed_cleanup_20260302 — Completed |TASK:feature_bleed_cleanup_20260302|

View File

@@ -6,12 +6,14 @@
*(none — all planned tracks queued below)*
## Completed This Session
- `mma_agent_focus_ux_20260302` — Per-tier source_tier tagging on comms+tool entries; Focus Agent combo UI; filter logic in comms+tool panels; [tier] label per comms entry. 18 tests. Checkpoint: b30e563.
- `feature_bleed_cleanup_20260302` — Removed dead comms panel dup, dead menubar block, duplicate __init__ vars; added working Quit; fixed Token Budget layout. All phases verified. Checkpoint: 0d081a2.
- `context_token_viz_20260301` — Token budget panel (color bar, breakdown table, trim warning, cache status, auto-refresh). All phases verified. Commit: d577457.
## Planned: Next Track
### `mma_agent_focus_ux_20260302` (initialized — run after bleed cleanup)
### `mma_agent_focus_ux_20260302` — COMPLETED (b30e563)
~~(initialized — run after bleed cleanup)~~
**Priority:** High
**Depends on:** `feature_bleed_cleanup_20260302` Phase 1 (dead comms panel removed)
**Track dir:** `conductor/tracks/mma_agent_focus_ux_20260302/`
@@ -105,6 +107,14 @@ To ensure smooth execution, execute the tracks in the following order:
**Context:** Running `uv run ruff check .` and `uv run mypy --explicit-package-bases .` revealed massive technical debt in type safety (512+ Mypy errors across 64 files, 200+ remaining Ruff violations). The `gui_2.py` and `api_hook_client.py` files specifically have severe "Any" bleeding and incorrect unions.
**Goal:** Resolve all static analysis errors. Enforce strict `mypy` compliance, remove implicit `Optional` types, and fix ambiguous variables (`l`). Integrate `ruff` and `mypy` into a CI pre-commit hook so Tier 3 workers are forced to write type-safe code going forward.
### `hook_api_ui_state_verification`
**Context:** Manual verification of UI widget state is difficult and unreliable. `live_gui` fixture + `ApiHookClient` exist but new widget state vars (e.g. `ui_focus_agent`) are not wired to `_settable_fields` or GET endpoints. Future tracks must add state to `_settable_fields` and write `live_gui`-based tests instead of relying on user confirmation.
**Goal:** Add `ui_focus_agent` (and a standard pattern for future widgets) to `_settable_fields`; add a `/api/gui/state` GET endpoint returning key UI vars; write `live_gui` integration test for Focus Agent filter.
### `concurrent_tier_source_tier`
**Context:** `ai_client.current_tier` is a module-level `str | None`. Safe today because the MMA engine serializes `send()` calls. When concurrent Tier 3/4 agents run in parallel (multiple tickets processed simultaneously), this will produce incorrect tier tags.
**Goal:** Replace with `threading.local()` storage or pass `source_tier` explicitly through the `send()` call signature so each concurrent agent self-identifies without sharing module state.
### `test_suite_performance_and_flakiness`
**Context:** Running `uv run pytest` takes over 5.0 minutes to execute and frequently hangs on integration tests (e.g. `test_spawn_interception.py`). Several simulation tests (`test_sim_ai_settings.py`, `test_extended_sims.py`) are also currently failing or timing out.
**Goal:** Audit the test suite for `time.sleep()` abuse. Replace hardcoded sleeps with `threading.Event()` hooks or robust polling. Isolate slow integration tests with `@pytest.mark.slow` and ensure the core unit test suite runs in under 10 seconds to maintain high-velocity TDD.