Documentation
¶
Index ¶
- func CertifyBackend(ctx context.Context, h BackendHarness) (semantic.Certification, error)
- func RunPromptCacheResidencyTCK(t *testing.T, factory func() PromptCacheResidencySubject)
- type BackendFacts
- type BackendHarness
- type BackendView
- type CapturedRequest
- type ExecBackendView
- func (v ExecBackendView) EffectiveCapabilities(ctx context.Context, call *lipapi.Call) BackendFacts
- func (v ExecBackendView) Open(ctx context.Context, call *lipapi.Call) (lipapi.EventStream, error)
- func (v ExecBackendView) Probe(ctx context.Context, scenario semantic.ScenarioDescriptor, probe UpstreamProbe) (semantic.ExecutionEvidence, error)
- func (v ExecBackendView) Reject(ctx context.Context, call *lipapi.Call, scenario semantic.ScenarioDescriptor) (semantic.ExecutionEvidence, error)
- func (v ExecBackendView) TCKExecutesBoundary() bool
- func (v ExecBackendView) TCKInvocation() lipapi.Invocation
- type HardNegativeView
- type PromptCacheResidencySubject
- type ReferenceResidencyController
- func (r *ReferenceResidencyController) Close() error
- func (r *ReferenceResidencyController) Evict(handle promptcache.Handle) error
- func (r *ReferenceResidencyController) Issue(targetID promptcache.TargetID, generationID promptcache.GenerationID, ...) (promptcache.Observation, error)
- func (r *ReferenceResidencyController) Observations() []promptcache.Observation
- func (r *ReferenceResidencyController) Release(ctx context.Context, req promptcache.ReleaseRequest) error
- func (r *ReferenceResidencyController) Renew(ctx context.Context, req promptcache.RenewRequest) (promptcache.RenewResponse, error)
- func (r *ReferenceResidencyController) SetAffinityAvailable(available bool)
- func (r *ReferenceResidencyController) UpstreamResident(handle promptcache.Handle) bool
- type UpstreamProbe
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertifyBackend ¶
func CertifyBackend(ctx context.Context, h BackendHarness) (semantic.Certification, error)
CertifyBackend selects and records scenarios for one backend harness.
func RunPromptCacheResidencyTCK ¶
func RunPromptCacheResidencyTCK(t *testing.T, factory func() PromptCacheResidencySubject)
RunPromptCacheResidencyTCK certifies lifecycle, identity, affinity, release, generation-close, accounting, and multi-target behavior without a provider.
Types ¶
type BackendFacts ¶
type BackendFacts struct {
Capabilities []lipapi.Capability
Dialects lipapi.DialectSupport
}
BackendFacts describes effective backend capabilities for a scenario call.
type BackendHarness ¶
type BackendHarness interface {
Subject() semantic.SubjectDescriptor
Backend(ctx context.Context) (BackendView, error)
Upstream() UpstreamProbe
Reset(ctx context.Context) error
}
BackendHarness provides the test harness interface for backend certification.
type BackendView ¶
type BackendView interface {
Open(ctx context.Context, call *lipapi.Call) (lipapi.EventStream, error)
EffectiveCapabilities(ctx context.Context, call *lipapi.Call) BackendFacts
// Probe executes a positive semantic scenario and reports canonical/upstream evidence.
Probe(ctx context.Context, scenario semantic.ScenarioDescriptor, probe UpstreamProbe) (semantic.ExecutionEvidence, error)
}
BackendView is a narrow test interface for driving a backend adapter in TCK.
type CapturedRequest ¶
CapturedRequest captures upstream probe details.
type ExecBackendView ¶
type ExecBackendView struct {
Backend execbackend.Backend
Candidate routing.AttemptCandidate
Invocation lipapi.Invocation
}
ExecBackendView drives a real core execbackend.Backend without importing a provider adapter into the TCK runner. The backend's Open function is the actual upstream boundary and candidate admission is the actual pre-network hard-negative path.
func (ExecBackendView) EffectiveCapabilities ¶
func (v ExecBackendView) EffectiveCapabilities(ctx context.Context, call *lipapi.Call) BackendFacts
func (ExecBackendView) Open ¶
func (v ExecBackendView) Open(ctx context.Context, call *lipapi.Call) (lipapi.EventStream, error)
func (ExecBackendView) Probe ¶
func (v ExecBackendView) Probe(ctx context.Context, scenario semantic.ScenarioDescriptor, probe UpstreamProbe) (semantic.ExecutionEvidence, error)
func (ExecBackendView) Reject ¶
func (v ExecBackendView) Reject(ctx context.Context, call *lipapi.Call, scenario semantic.ScenarioDescriptor) (semantic.ExecutionEvidence, error)
func (ExecBackendView) TCKExecutesBoundary ¶
func (v ExecBackendView) TCKExecutesBoundary() bool
TCKExecutesBoundary marks this adapter as executing Open itself during Probe. The runner uses the marker to avoid a duplicate upstream call in preflight.
func (ExecBackendView) TCKInvocation ¶
func (v ExecBackendView) TCKInvocation() lipapi.Invocation
TCKInvocation exposes the operation metadata used by scenario construction.
type HardNegativeView ¶
type HardNegativeView interface {
Reject(ctx context.Context, call *lipapi.Call, scenario semantic.ScenarioDescriptor) (semantic.ExecutionEvidence, error)
}
HardNegativeView is implemented by adapters that can run candidate admission without opening upstream work. It is deliberately separate from BackendView so simple backend-family adapters can opt into the proof at their composition edge.
type PromptCacheResidencySubject ¶
type PromptCacheResidencySubject interface {
promptcache.Controller
Issue(targetID promptcache.TargetID, generationID promptcache.GenerationID, renewable bool) (promptcache.Observation, error)
Observations() []promptcache.Observation
Evict(handle promptcache.Handle) error
SetAffinityAvailable(bool)
Close() error
UpstreamResident(handle promptcache.Handle) bool
}
PromptCacheResidencySubject is the small setup/observation surface used by the residency TCK. Provider implementations keep their own setup semantics; the TCK only observes the stable promptcache.Controller contract.
type ReferenceResidencyController ¶
type ReferenceResidencyController struct {
// contains filtered or unexported fields
}
ReferenceResidencyController is a bounded in-process controller used by the TCK. It intentionally stores only opaque handles and provider-neutral facts.
func NewReferenceResidencyController ¶
func NewReferenceResidencyController(instanceID, generationID string) *ReferenceResidencyController
func (*ReferenceResidencyController) Close ¶
func (r *ReferenceResidencyController) Close() error
func (*ReferenceResidencyController) Evict ¶
func (r *ReferenceResidencyController) Evict(handle promptcache.Handle) error
func (*ReferenceResidencyController) Issue ¶
func (r *ReferenceResidencyController) Issue(targetID promptcache.TargetID, generationID promptcache.GenerationID, renewable bool) (promptcache.Observation, error)
func (*ReferenceResidencyController) Observations ¶
func (r *ReferenceResidencyController) Observations() []promptcache.Observation
func (*ReferenceResidencyController) Release ¶
func (r *ReferenceResidencyController) Release(ctx context.Context, req promptcache.ReleaseRequest) error
func (*ReferenceResidencyController) Renew ¶
func (r *ReferenceResidencyController) Renew(ctx context.Context, req promptcache.RenewRequest) (promptcache.RenewResponse, error)
func (*ReferenceResidencyController) SetAffinityAvailable ¶
func (r *ReferenceResidencyController) SetAffinityAvailable(available bool)
func (*ReferenceResidencyController) UpstreamResident ¶
func (r *ReferenceResidencyController) UpstreamResident(handle promptcache.Handle) bool
type UpstreamProbe ¶
type UpstreamProbe interface {
RequestCount() int
LastRequest() CapturedRequest
Reset()
}
UpstreamProbe tracks upstream request counts for zero-upstream proofs.