From 584bff9c061ebe2b245ea4066bf942bd6bed3ca3 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Tue, 24 Feb 2026 22:26:27 -0500 Subject: [PATCH] docs(mma): Draft Track 4 - Tier 4 QA Interception --- .../migration_epics.md | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/conductor/tracks/mma_implementation_20260224/migration_epics.md b/conductor/tracks/mma_implementation_20260224/migration_epics.md index 20799a8..32ec26e 100644 --- a/conductor/tracks/mma_implementation_20260224/migration_epics.md +++ b/conductor/tracks/mma_implementation_20260224/migration_epics.md @@ -77,3 +77,27 @@ ### 3. Acceptance Testing Criteria - **Unit Tests:** Context generation, API schema mapping, and event-blocking are tested for all Edge cases. - **Integration Test:** Manually execute a script pointing the \ConductorEngine\ at a dummy file. The CLI should pause before \write_file\ execution, display the diff, allow manual JSON editing via terminal input, execute the updated JSON file modification, and return \Task Complete\. + +## Track 4: Tier 4 QA Interception + +**Goal:** Stop error traces from destroying the Worker's token window by routing crashes through a cheap, stateless translator. + +### 1. TDD Approach for \shell_runner.py\ +- Create \ ests/test_shell_runner.py\. +- Write tests that mock a local execution failure (e.g., returning a mock 3000-line Python stack trace). +- Test that the error is intercepted and passed to a mock Tier 4 agent. +- Test that the output is compressed into a 20-word fix before returning. +- **Red Phase:** Fails because no interception loop exists in \shell_runner.py\. +- **Green Phase:** Implement the try/except logic handling \subprocess.run()\ with \ eturncode != 0\. + +### 2. QA Interception Tasks +- **Task 4.1: The Interceptor Loop** + - Open \shell_runner.py\ and catch execution errors. +- **Task 4.2: Tier 4 Instantiation** + - Construct a secondary, synchronous API call directly to the \default_cheap\ model, sending the raw \stderr\ and the offending code snippet. +- **Task 4.3: Payload Formatting** + - Inject the 20-word fix response from the Tier 4 agent back into the main Tier 3 worker's history context as a system hint. + +### 3. Acceptance Testing Criteria +- **Unit Tests:** Verify that massive error outputs never leak uncompressed into the main history logs. +- **Integration Test:** Purposely introduce a syntax error in a local script. Ensure the orchestrator catches it, pings the mock/cheap API, and the history log receives the 20-word hint instead of the 200-line stack trace.