Clarify artifact reader ownership transfer

This commit is contained in:
2026-11-05 13:51:29 +00:00
parent 7be677c80b
commit 7d500ee62f
4 changed files with 57 additions and 3 deletions

View File

@@ -891,6 +891,11 @@ of collaborator errors. Implementations must honor cancellation, safely manage
copies they retain, avoid unsafe logging of content or credentials, and enforce
the application policy that motivated the injection.
A successful `ArtifactReader.Read` transfers the returned artifact and mutable
body storage to Promptkit. Readers that previously reused a returned buffer
must instead return independent storage and stop mutating it after return;
private scratch buffers may still be reused when the returned bytes are copied.
## Handle Errors
Use `errors.Is` with the

View File

@@ -244,6 +244,10 @@ Focused authentication and public smoke tests pass on Go 1.27.3.
the accepted handoff, without promising safety for contract-violating readers.
Explain migration in consumer guidance; no borrowing/release protocol is added.
Completion: ArtifactReader ownership and migration guidance require independent
transferred storage. Focused concurrent preparation, adapter isolation, and
cause-propagation tests pass with the race detector on Go 1.27.3.
## Stage 9: Detach Prepared Ownership And Session Storage
**Catalog:** 16, 18. **Files:** runner/prepared state and domain session normalization.