Documentation
¶
Overview ¶
Package evidence defines the content-addressed evidence-bundle manifest. Manifest data is an observation only: parsing or verifying it never grants approval, publication authority, or any other capability.
Index ¶
- Constants
- func Marshal(manifest Manifest) ([]byte, error)
- func ValidateSchema(data []byte) error
- func Verify(manifest Manifest, expected CandidateIdentityV1, outputs []ArtifactInput) error
- func VerifyBytes(data []byte, expected CandidateIdentityV1, outputs []ArtifactInput) error
- type Artifact
- type ArtifactInput
- type CandidateIdentityV1
- type Error
- type Manifest
Constants ¶
const ( SchemaName = "aurum.evidence-bundle" SchemaVersion = 1 MaxManifestBytes = 4 * 1024 * 1024 MaxArtifacts = 64 MaxArtifactBytes = 4 * 1024 * 1024 MaxPathBytes = 512 )
const ( CodeMalformed = "malformed" CodeUnknownField = "unknown_field" CodeDuplicateField = "duplicate_field" CodeMissingField = "missing_field" CodeInvalidField = "invalid_field" CodeUnsafePath = "unsafe_path" CodeLimitExceeded = "limit_exceeded" CodeNonCanonical = "non_canonical" CodeDigestMismatch = "digest_mismatch" CodeCandidateMismatch = "candidate_mismatch" CodeArtifactMissing = "artifact_missing" CodeArtifactUnexpected = "artifact_unexpected" CodeAuthorityDenied = "authority_denied" CodeSchemaContract = "schema_contract" )
Variables ¶
This section is empty.
Functions ¶
func ValidateSchema ¶
ValidateSchema checks that the repository JSON Schema expresses the same closed fields, limits, enums, and canonicalization rules as this parser.
func Verify ¶
func Verify(manifest Manifest, expected CandidateIdentityV1, outputs []ArtifactInput) error
Verify recomputes candidate, manifest, and output bindings without I/O.
func VerifyBytes ¶
func VerifyBytes(data []byte, expected CandidateIdentityV1, outputs []ArtifactInput) error
VerifyBytes combines hostile parsing and verification.
Types ¶
type Artifact ¶
type Artifact struct {
Path string `json:"path"`
Kind string `json:"kind"`
MediaType string `json:"media_type"`
Authority string `json:"authority"`
Bytes int64 `json:"bytes"`
SHA256 string `json:"sha256"`
}
Artifact is a digest record for one sanitized output. Authority is always "none"; an evidence record cannot authorize its own acceptance.
type ArtifactInput ¶
ArtifactInput carries output bytes only while sealing or verifying. The bytes are never persisted in a Manifest by this package.
type CandidateIdentityV1 ¶
type CandidateIdentityV1 struct {
RepositoryIdentity string `json:"repository_identity"`
BaseTreeDigest string `json:"base_tree_digest"`
HeadTreeDigest string `json:"head_tree_digest"`
ChangeDigest string `json:"change_digest"`
TaskSpecDigest string `json:"task_spec_digest"`
ConfigurationDigest string `json:"configuration_digest"`
PolicyDigest string `json:"policy_digest"`
PromptAndRubricDigest string `json:"prompt_and_rubric_digest"`
SkillSetDigest string `json:"skill_set_digest"`
ProviderModelBackendIdentityDigest string `json:"provider_model_backend_identity_digest"`
ToolchainAndToolSetDigest string `json:"toolchain_and_tool_set_digest"`
DependencyLockDigest string `json:"dependency_lock_digest"`
ContainerImageSetDigest string `json:"container_image_set_digest"`
TestManifestDigest string `json:"test_manifest_digest"`
RoleContextManifestDigest string `json:"role_context_manifest_digest"`
}
CandidateIdentityV1 is the complete canonical tuple. Every member is a digest; consumers may not define a shorter local identity.
type Error ¶
Error is a bounded, typed rejection. It intentionally never includes an untrusted value from the manifest or an evidence output.
type Manifest ¶
type Manifest struct {
Schema string `json:"schema"`
Version int `json:"version"`
CandidateIdentity CandidateIdentityV1 `json:"candidate_identity"`
Artifacts []Artifact `json:"artifacts"`
ManifestDigest string `json:"manifest_digest"`
}
Manifest is self-addressed through ManifestDigest. That digest is computed over the canonical form with manifest_digest omitted.
func Parse ¶
Parse rejects malformed, duplicate, unknown, non-canonical, or unsealed input before returning a manifest.
func Seal ¶
func Seal(candidate CandidateIdentityV1, inputs []ArtifactInput) (Manifest, error)
Seal constructs a deterministic manifest from an externally established candidate identity and sanitized output bytes.