Document invocation observation and cost reporting
This commit is contained in:
@@ -216,10 +216,16 @@ ordinary `Run` reuses its run ID and carries it to the generation coordinator
|
||||
through context. Prompt and profile identities are enriched only after their
|
||||
respective resolutions succeed, before admission. The facade starts observation
|
||||
before request conversion and emits its terminal event after public error
|
||||
mapping and after the runner's deferred admission release. Preparation and
|
||||
prepared execution follows the same terminal mapping after a successful claim;
|
||||
mapping and after the runner's deferred admission release. Preparation emits no
|
||||
events; prepared execution follows the same terminal mapping after a successful claim;
|
||||
invalid or discarded handles do not acquire an observer.
|
||||
|
||||
Ordinary runs establish fresh private cost state before observation; a claimed
|
||||
prepared execution establishes its own state after claim. Contextual observers
|
||||
remain available at public boundaries, while enclosing recorder and cost state
|
||||
are masked. Prepared handles retain the request observer and frozen provider
|
||||
policy, not preparation-context selection or an accumulator.
|
||||
|
||||
The facade establishes an optional operation scope for ordinary runs before
|
||||
observation and preparation. A claimed prepared execution establishes its own
|
||||
scope from the retained duration; preparation and idle time do not consume it.
|
||||
@@ -273,11 +279,13 @@ run identifier, and UTC timing. The same effective session reaches initial
|
||||
generation and any repair attempt through the rendered prompt. The same
|
||||
effective target and presence metadata, including backend identity and direct
|
||||
credential during execution, reaches generation and every repair attempt.
|
||||
Result usage is the field-wise sum of all five usage values from the initial
|
||||
Result usage is the field-wise sum of usage values from the initial
|
||||
response and every completed repair response. Final raw output, artifact, and
|
||||
validation state still come from the last candidate. A repair error returns no
|
||||
partial run result or partial result usage, although the invocation-local
|
||||
observer retains completed-attempt usage and reports it in the terminal event.
|
||||
Result cost instead snapshots the shared accumulator across all dispatched
|
||||
attempts, including retries and repairs, whether or not observation is enabled.
|
||||
|
||||
## Failure Categories
|
||||
|
||||
|
||||
Reference in New Issue
Block a user