conductor(archive): move 39 completed tracks (2026-05 to 2026-06) to archive/

This commit is contained in:
ed
2026-06-03 00:09:52 -04:00
parent 0ffeccc7d3
commit 594f14f943
160 changed files with 94 additions and 21 deletions
@@ -0,0 +1,5 @@
# Track minimax_history_fix_20260601 Context
- [Specification](./spec.md)
- [Implementation Plan](./plan.md)
- [Metadata](./metadata.json)
@@ -0,0 +1,8 @@
{
"track_id": "minimax_history_fix_20260601",
"type": "bug",
"status": "new",
"created_at": "2026-06-01T00:00:00Z",
"updated_at": "2026-06-01T00:00:00Z",
"description": "Fix MiniMax history sequencing and truncation"
}
@@ -0,0 +1,18 @@
# Implementation Plan: MiniMax History Fix
## Phase 1: Implementation
- [x] Task: Implement History Repair
- [x] Create `_repair_minimax_history(history: list[dict[str, Any]])` in `src/ai_client.py`.
- [x] Logic: Check if the last message is `assistant` with `tool_calls`. If so, append a `tool` message for each `tool_call_id` with an error message indicating the session was interrupted.
- [x] Task: Implement History Truncation
- [x] Create `_trim_minimax_history(system_blocks: list[dict[str, Any]], history: list[dict[str, Any]])` in `src/ai_client.py` (adapt from `_trim_anthropic_history`).
- [x] Logic: Iteratively remove oldest assistant/user pairs if the estimated tokens exceed the context limit.
- [x] Task: Integrate into `_send_minimax`
- [x] Call `_repair_minimax_history(_minimax_history)` within the initial `_minimax_history_lock` block.
- [x] Call `_trim_minimax_history` at the start of the `for round_idx` loop.
- [x] Log dropped messages to `_append_comms`.
## Phase 2: Verification
- [x] Task: Verification
- [x] Verify that switching to MiniMax and executing a tool call, then forcibly stopping (e.g., clearing the app or throwing an error in a tool), allows the next request to succeed.
- [x] Task: Conductor - User Manual Verification 'Phase 2: Verification' (Protocol in workflow.md)
@@ -0,0 +1,17 @@
# Specification: MiniMax API History Sequence Fix
## 1. Overview
The user is experiencing a `MiniMax Bad Request: invalid params, tool call result does not follow tool call (2013)` error. This occurs when the `_minimax_history` in `src/ai_client.py` becomes corrupted, typically when a session is interrupted after the AI makes a tool call but before the `tool` role result messages are appended. The next user message breaks the required `assistant(tool_calls) -> tool` sequence.
## 2. Functional Requirements
* **History Repair:** Implement a `_repair_minimax_history` function (similar to `_repair_deepseek_history`) to detect dangling tool calls at the end of the history and append synthesized error `tool` responses to close the loop before adding new user messages.
* **History Truncation:** Implement a `_trim_minimax_history` function to prevent the history array from growing indefinitely and hitting token limits. It should intelligently drop old message pairs (assistant/user) while preserving tool call sequences.
* **Integration:** Apply these mechanisms within the `_send_minimax` execution flow.
## 3. Non-Functional Requirements
* **Stability:** The changes must safely handle locking (`_minimax_history_lock`) and not crash if history is empty.
* **Consistency:** The implementation should align with the established patterns used for the DeepSeek and Anthropic providers.
## 4. Acceptance Criteria
* The `_send_minimax` function no longer crashes with error code 2013 when resuming a session after an interrupted tool call.
* The history remains within manageable token limits over long sessions.