Record empty usage summary and observation boundary decisions

This commit is contained in:
2026-11-22 19:31:47 +00:00
parent b1193564e9
commit d8f2f67671

View File

@@ -1,7 +1,7 @@
# Automatic PromptKit Usage Reporting
Status: adoption goal agreed; upstream v0.25.0 reviewed and available;
OD-1 through OD-4 selected; OD-5 and OD-6 open; implementation not started.
OD-1 through OD-5 selected; OD-6 open; implementation not started.
## Goal
@@ -206,7 +206,7 @@ including the new vLLM adapter, through the current smoke command.
## Decisions
OD-1 through OD-4 are selected below. Recommendations under OD-5 and OD-6
OD-1 through OD-5 are selected below. Recommendations under OD-6
remain proposals, not selected contracts. Resolve the remaining choices before
writing a concrete implementation plan; implementation should then be able to
proceed through that plan without intermediate design gates.
@@ -269,15 +269,24 @@ it. Such an interface needs an explicit destination and framing, because the
diagnostic stream may also contain other messages. A separate report file is a
possible future approach, not a selected interface.
### OD-5: No observations and commands that do not execute models
### OD-5: No observations and commands that do not execute models — selected
Decide what an explicitly requested summary shows when no ordinary execution
events were observed, including inspection-only commands or early returned
failures. Recommend a concise "No PromptKit executions observed" message rather
than an unlabeled zero-cost total; retain upstream empty-group semantics in any
structured representation. Recommend help, completion, and parse-only failures
produce no usage summary and require no acquisition work. Specify the boundary
for input/preflight failures when designing the lifecycle hook.
When execution begins but no ordinary execution events are observed, present the
standard summary using PromptKit's native empty-group values: zero runs, attempts,
tokens, and cost, preserving the absence of a cost source. Do not substitute a
special no-executions message. Derived values such as cache-hit ratio remain
unavailable when upstream supplies no value. Observed executions with unknown
usage retain their native unknown state rather than being converted to zeros.
Help, completion, version, routing errors, parsing errors, and input/preflight
validation failures produce no usage summary and perform no acquisition for
reporting. Attach the observer after successful input/preflight validation and
before execution-time initialization, acquisition callbacks, and the handler,
so PromptKit work during acquisition participates.
After returned errors or cancellation, report the native group's observed data;
an empty group uses the same standard zero summary. Active quiet mode suppresses
the summary as selected under OD-3.
### OD-6: Initial summary detail
@@ -299,7 +308,7 @@ availability of the evidence.
## Delivery Sequence
1. Resolve OD-5 and OD-6 against the reviewed PromptKit v0.25.0 API. Upstream
1. Resolve OD-6 against the reviewed PromptKit v0.25.0 API. Upstream
implementation and release are complete; no upstream feature work remains a
prerequisite.
2. Implement and verify the neutral core installation, flag, context, and