Avoid intermediate conversation history copies
This commit is contained in:
@@ -32,7 +32,8 @@ The runner has no durable run or session store.
|
||||
|
||||
Captured exchanges are immutable parent-linked domain values. Each holds only
|
||||
its new rendered suffix, final assistant message, and run identities; flattening
|
||||
iteratively makes a detached history for preparation or inspection. Preparation
|
||||
iteratively fills a single detached message buffer for preparation or projects
|
||||
directly into public inspection values. Preparation
|
||||
prepends this history to newly rendered definition messages and appended caller
|
||||
messages before computing the rendered hash. Follow-up selection and credentials
|
||||
remain those of the new request. Prepared execution retains capture and parent
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user