Documentation
¶
Overview ¶
Package conformance exposes the checked-in, language-neutral resolve/read verification corpus. The corpus is immutable protocol test data; producing runtime evidence remains the responsibility of the deterministic generator.
Index ¶
- Constants
- func Accepted(ctx context.Context, verifier Verifier, vector Vector) bool
- func Bytes() ([]byte, error)
- func BytesVersion(version string) ([]byte, error)
- func Schema(name string) ([]byte, error)
- func SchemaVersion(version, name string) ([]byte, error)
- type Corpus
- type Expected
- type Vector
- type Verifier
Constants ¶
const ( // ResolveReadV1 and ResolveReadV2 are independent conformance-corpus // versions, not replacements for the resolve/read wire profile identifiers. ResolveReadV1 = "malt.resolve-read.conformance/v1" ResolveReadV2 = "malt.resolve-read.conformance/v2" ResolveReadCurrent = ResolveReadV2 OperationResolve = "resolve" OperationRead = "read" BackendNone = "none" BackendKZG = "kzg" BackendIPA = "ipa" )
Variables ¶
This section is empty.
Functions ¶
func Accepted ¶
Accepted evaluates one vector through the same strict DTO decoders used by transport adapters. Any decode, shape, binding, or cryptographic error is a portable rejection; diagnostic error text is intentionally ignored.
func BytesVersion ¶
BytesVersion returns a detached copy of one supported checked-in corpus.
func SchemaVersion ¶
SchemaVersion returns a detached schema for one supported corpus version.
Types ¶
type Corpus ¶
type Corpus struct {
SchemaVersion string `json:"schema_version"`
Vectors []Vector `json:"vectors"`
}
Corpus is the stable, ordered envelope shared by every verifier adapter.
func LoadVersion ¶
LoadVersion returns and validates one explicitly supported corpus version.
type Expected ¶
type Expected struct {
Valid bool `json:"valid"`
}
Expected records the portable outcome. Error strings are deliberately not conformance data because they are implementation-specific diagnostics.
func (*Expected) UnmarshalJSON ¶
UnmarshalJSON makes expected.valid required while retaining a convenient bool-facing API for corpus consumers.
type Vector ¶
type Vector struct {
ID string `json:"id"`
Operation string `json:"operation"`
Backend string `json:"backend"`
Category string `json:"category"`
Verification json.RawMessage `json:"verification"`
Expected Expected `json:"expected"`
}
Vector binds one exact serialized verification input to an accept/reject expectation. Verification remains raw so malformed field encodings can be tested without weakening the corpus envelope decoder.
type Verifier ¶
type Verifier interface {
VerifyResolve(context.Context, protocol.ResolveVerification) error
VerifyRead(context.Context, protocol.ReadVerification) error
}
Verifier is the portable resolve/read verification surface exercised by the corpus. sdk/verifier.Verifier satisfies this interface.