Avoid intermediate conversation history copies

This commit is contained in:
2026-11-14 14:28:08 +00:00
parent c23393b2cc
commit 64cf84c9b5
6 changed files with 72 additions and 11 deletions

View File

@@ -91,7 +91,12 @@ does not require changing runtime behavior or duplicating existing tests.
## 2. Avoid Intermediate History Copies During Assembly And Inspection
**Priority:** P3. **Status:** For consideration. **Plan stages:** 2 and 5.
**Priority:** P3. **Status:** Complete. **Plan stages:** 2 and 5.
**Completion:** Preparation now fills one history-plus-suffix buffer. Inspection
projects indexed history directly into public messages, cloning exposed cache
metadata once. The parent-linked representation and public types are unchanged.
Focused race-enabled history, continuation, preparation, and ownership tests passed.
**Locations:** `completePreparationWithStructuredOutput` in
[the runner](../../internal/usecase/runner.go), `Exchange.Messages` in