Documentation
¶
Overview ¶
Package rawdriver executes registry-bound raw HTTP scenarios through the origin-restricted transport and the evidence-first evaluation pipeline.
Index ¶
- type AssertionSpec
- type BodyBudget
- type CheckKind
- type Config
- type IDSource
- type MemoryRegistry
- func (registry *MemoryRegistry) Clear()
- func (registry *MemoryRegistry) Estimate(decision schema.ScenarioDecision) (budget.Usage, error)
- func (registry *MemoryRegistry) Lookup(planDigest schema.Digest, decision schema.ScenarioDecision) (Scenario, error)
- func (registry *MemoryRegistry) Register(input Scenario) error
- type Protocol
- type Registry
- type Runner
- type Scenario
- type TokenUsage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssertionSpec ¶
type AssertionSpec struct {
AssertionID string
RequirementID string
Role schema.AssertionRole
Oracle schema.ArtifactPin
EvaluatorDigest schema.Digest
Check CheckKind
AllowedValues []string
ExpectedUsage *TokenUsage
}
AssertionSpec binds an executable check to its catalog requirement, oracle, and protected evaluator digest.
type BodyBudget ¶
BodyBudget is an enforced per-scenario body boundary. RequestBytes applies to the canonical JSON body; ResponseBytes applies before parsing or CAS persistence.
type CheckKind ¶
type CheckKind string
CheckKind selects one bounded assertion over the normalized exchange. Core JSON, relationship, and stream-state checks always run in addition to this scenario-specific assertion.
const ( CheckArgumentsString CheckKind = "arguments_string" CheckOutputIndexes CheckKind = "output_indexes" CheckStreamingToolCall CheckKind = "streaming_tool_call" CheckFinishReason CheckKind = "finish_reason" CheckTerminalEvent CheckKind = "terminal_event" CheckStableToolCallID CheckKind = "stable_tool_call_id" CheckNoUnknownEvent CheckKind = "no_unknown_event" CheckClosedReasoning CheckKind = "closed_reasoning" CheckUsageConsistent CheckKind = "usage_consistent" CheckValidUTF8 CheckKind = "valid_utf8" CheckRequiredEnvelope CheckKind = "required_response_envelope" CheckStreamMediaType CheckKind = "stream_media_type" CheckNoPostTerminal CheckKind = "no_post_terminal_data" )
type IDSource ¶
type IDSource func() (schema.InstanceID, error)
type MemoryRegistry ¶
type MemoryRegistry struct {
// contains filtered or unexported fields
}
MemoryRegistry is a concurrency-safe synthetic registry suitable for local execution and tests. Register clones all mutable input.
func NewMemoryRegistry ¶
func NewMemoryRegistry(scenarios ...Scenario) (*MemoryRegistry, error)
func (*MemoryRegistry) Clear ¶
func (registry *MemoryRegistry) Clear()
Clear releases all registered request material after one local execution. Mutable bodies are overwritten before references are dropped. Header values are strings and cannot be reliably erased by Go; they remain process-memory only and are never accepted by a persistence API before redaction.
func (*MemoryRegistry) Estimate ¶
func (registry *MemoryRegistry) Estimate(decision schema.ScenarioDecision) (budget.Usage, error)
func (*MemoryRegistry) Lookup ¶
func (registry *MemoryRegistry) Lookup(planDigest schema.Digest, decision schema.ScenarioDecision) (Scenario, error)
func (*MemoryRegistry) Register ¶
func (registry *MemoryRegistry) Register(input Scenario) error
type Protocol ¶
type Protocol string
Protocol identifies the provider wire shape interpreted by the built-in normalizer. It is deliberately closed; unknown protocols require a new, reviewed decoder rather than falling through to a permissive guess.
type Registry ¶
type Registry interface {
Estimate(schema.ScenarioDecision) (budget.Usage, error)
Lookup(schema.Digest, schema.ScenarioDecision) (Scenario, error)
}
Registry performs both the pre-reservation estimate lookup and the exact plan-bound execution lookup required by executor.Runner.
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner implements executor.Runner. It owns no endpoint URL and therefore cannot bypass the exact origin already frozen into transport.Client.
type Scenario ¶
type Scenario struct {
PlanDigest schema.Digest
ID string
Driver schema.ArtifactPin
Protocol Protocol
Method string
Path string
Headers http.Header
Body json.RawMessage
Streaming bool
ExpectedStatus int
Budget BodyBudget
Assertion AssertionSpec
}
Scenario is the immutable request and oracle material returned by the registry. No origin is present here: the only origin comes from transport's separately authorized exact-origin client.
type TokenUsage ¶
TokenUsage is an exact synthetic expectation. It is only used by a scenario whose catalog assertion explicitly checks deterministic fixture usage.