contextcompat

package
v2.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package contextcompat verifies original attachment compatibility from durable transcript and model-call evidence. It does not consult live providers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Resolve

func Resolve(ctx context.Context, store runstore.Store, request Request) ([]index.MessageEntry, compaction.State, error)

Resolve verifies committed-plus-pending coverage and terminal call provenance. Adoption order is checked separately by the canonical run-record reader.

func Validate

func Validate(ctx context.Context, store runstore.Store, request Request, result Result) error

Validate independently verifies an adopted result and its addressed fact.

Types

type Fact

type Fact struct {
	Request  Request
	Evidence compaction.Compatibility
}

Fact binds the compact result to its durable request provenance.

func ReadFact

func ReadFact(ctx context.Context, store runstore.Store, scope string, result Result) (Fact, error)

ReadFact resolves and validates the addressed fact's encoding and content hash.

type Request

type Request struct {
	Scope     string
	RunID     string
	IndexHead runstore.Hash
	Pending   []index.MessageEntry
	Calls     []runstore.CallKey
	Coverage  string
	Support   string
}

Request names the durable original content and first adopted model calls.

func BuildRequest

func BuildRequest(scope, runID string, head runstore.Hash, pending, entries []index.MessageEntry, state compaction.State) Request

BuildRequest snapshots coverage and support identities without content reads.

type Result

type Result struct {
	Ref      runstore.Hash
	Evidence compaction.Compatibility
}

Result addresses a compact fact that must be adopted before the decision.

func Check

func Check(ctx context.Context, store runstore.Store, request Request) (Result, error)

Check verifies durable inputs and stores their compatibility fact.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL