Documentation
¶
Index ¶
- Constants
- type BackendEmulatorHarness
- type BinaryFixtureDescriptor
- type BoundedCapture
- type CleanupContract
- type DirectWireHarness
- type FixtureDescriptor
- type FrontendStubHarness
- type FullBlackBoxHarness
- type RequestObservation
- type ScenarioDescriptor
- type ScenarioKind
- type ScenarioRegistry
- type ScriptContract
- type ScriptStep
- type TestCleanup
- type TestEvidenceDescriptor
- type TestVirtualClock
- type VirtualClock
Constants ¶
const ( OfficialSourceCommit = "92c12d96d7b61d6d15e2214daa5e9c6000ab6e1c" OfficialSchemaDigest = "sha256:997c4cf16c349751502813f46ea79b2c88880b23171b69f7f2c3d4bf5b330529" OfficialComplianceDigest = "sha256:63b5e6595ac831ee74b8e887af76c28d69aee8e2ec7d9e99dc688eec4bccb7fb" )
Pinned official profile digests for testkit validation (independent of production codecs).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackendEmulatorHarness ¶
type BinaryFixtureDescriptor ¶
type BinaryFixtureDescriptor struct {
ID string `json:"id"`
MediaType string `json:"media_type"`
SizeBytes int64 `json:"size_bytes"`
Digest string `json:"digest"`
RelPath string `json:"rel_path"`
}
BinaryFixtureDescriptor describes neutral binary fixture files (images, audio, etc.).
func (BinaryFixtureDescriptor) Validate ¶
func (b BinaryFixtureDescriptor) Validate() error
type BoundedCapture ¶
type BoundedCapture struct {
// contains filtered or unexported fields
}
BoundedCapture manages a thread-safe, bounded slice of RequestObservations with redaction support.
func NewBoundedCapture ¶
func NewBoundedCapture(maxSize int, redactHeaders []string) *BoundedCapture
func (*BoundedCapture) Capture ¶
func (b *BoundedCapture) Capture(obs RequestObservation) error
func (*BoundedCapture) Len ¶
func (b *BoundedCapture) Len() int
func (*BoundedCapture) Observations ¶
func (b *BoundedCapture) Observations() []RequestObservation
func (*BoundedCapture) OverflowCount ¶
func (b *BoundedCapture) OverflowCount() int
type CleanupContract ¶
CleanupContract specifies idempotent teardown rules.
type DirectWireHarness ¶
type FixtureDescriptor ¶
type FixtureDescriptor struct {
ID string `json:"id"`
Name string `json:"name"`
Category string `json:"category"`
SchemaDigest string `json:"schema_digest"`
ComplianceDigest string `json:"compliance_digest"`
SourceCommit string `json:"source_commit"`
RelPath string `json:"rel_path"`
}
FixtureDescriptor links official fixture metadata to Task 1.1 ProfileDescriptor without duplicating raw bytes.
func NewOfficialFixtureDescriptor ¶
func NewOfficialFixtureDescriptor(id, name, category, relPath string) (FixtureDescriptor, error)
NewOfficialFixtureDescriptor creates a FixtureDescriptor bound to the Task 1.1 Profile.
func (FixtureDescriptor) Validate ¶
func (f FixtureDescriptor) Validate() error
type FrontendStubHarness ¶
type FullBlackBoxHarness ¶
type RequestObservation ¶
type RequestObservation struct {
ID string `json:"id"`
Method string `json:"method"`
URLPath string `json:"url_path"`
Headers http.Header `json:"headers"`
Body []byte `json:"body,omitempty"`
Timestamp time.Time `json:"timestamp"`
Redacted bool `json:"redacted"`
}
RequestObservation captures an observed HTTP/transport request for test assertions.
type ScenarioDescriptor ¶
type ScenarioDescriptor struct {
ID string `json:"id"`
Kind ScenarioKind `json:"kind"`
Description string `json:"description"`
}
func (ScenarioDescriptor) Validate ¶
func (s ScenarioDescriptor) Validate() error
type ScenarioKind ¶
type ScenarioKind string
const ( ScenarioKindJSONText ScenarioKind = "json_text" ScenarioKindSSEText ScenarioKind = "sse_text" ScenarioKindTools ScenarioKind = "tools" ScenarioKindMultimodal ScenarioKind = "multimodal" ScenarioKindReasoning ScenarioKind = "reasoning" ScenarioKindContinuation ScenarioKind = "continuation" ScenarioKindCompaction ScenarioKind = "compaction" ScenarioKindExtensions ScenarioKind = "extensions" ScenarioKindWebSocket ScenarioKind = "websocket" ScenarioKindNegative ScenarioKind = "negative_validation" ScenarioKindAdversarial ScenarioKind = "adversarial" )
type ScenarioRegistry ¶
type ScenarioRegistry struct {
// contains filtered or unexported fields
}
func NewScenarioRegistry ¶
func NewScenarioRegistry() *ScenarioRegistry
func (*ScenarioRegistry) Get ¶
func (r *ScenarioRegistry) Get(id string) (ScenarioDescriptor, bool)
func (*ScenarioRegistry) List ¶
func (r *ScenarioRegistry) List() []ScenarioDescriptor
func (*ScenarioRegistry) Register ¶
func (r *ScenarioRegistry) Register(sd ScenarioDescriptor) error
type ScriptContract ¶
type ScriptContract struct {
// contains filtered or unexported fields
}
ScriptContract manages execution of a sequence of ScriptSteps.
func NewScriptContract ¶
func NewScriptContract(steps []ScriptStep) *ScriptContract
func (*ScriptContract) NextStep ¶
func (s *ScriptContract) NextStep() (ScriptStep, error)
func (*ScriptContract) Remaining ¶
func (s *ScriptContract) Remaining() int
type ScriptStep ¶
type ScriptStep struct {
Name string `json:"name"`
MatchMethod string `json:"match_method"`
MatchPath string `json:"match_path"`
ResponseStatus int `json:"response_status"`
ResponseBody []byte `json:"response_body"`
ResponseHeaders map[string]string `json:"response_headers"`
SimulateDelay time.Duration `json:"simulate_delay"`
SimulateError error `json:"-"`
}
ScriptStep defines one request/response interaction in a scripted test.
type TestCleanup ¶
type TestCleanup struct {
// contains filtered or unexported fields
}
func NewTestCleanup ¶
func NewTestCleanup(onClose func() error) *TestCleanup
func (*TestCleanup) Close ¶
func (c *TestCleanup) Close() error
func (*TestCleanup) IsClosed ¶
func (c *TestCleanup) IsClosed() bool
type TestEvidenceDescriptor ¶
type TestEvidenceDescriptor struct {
ScenarioID string `json:"scenario_id"`
Outcome string `json:"outcome"`
TestArtifacts []string `json:"test_artifacts"`
}
TestEvidenceDescriptor describes scenario evidence linking for testkit validation.
func (TestEvidenceDescriptor) Validate ¶
func (e TestEvidenceDescriptor) Validate() error
type TestVirtualClock ¶
type TestVirtualClock struct {
// contains filtered or unexported fields
}
TestVirtualClock implements VirtualClock backed by deterministic time.
func NewVirtualClock ¶
func NewVirtualClock(initial time.Time) *TestVirtualClock
func (*TestVirtualClock) Advance ¶
func (c *TestVirtualClock) Advance(d time.Duration)
func (*TestVirtualClock) Now ¶
func (c *TestVirtualClock) Now() time.Time
func (*TestVirtualClock) Set ¶
func (c *TestVirtualClock) Set(t time.Time)