Documentation
¶
Overview ¶
Package compositesupport owns portable, self-contained composite provenance.
Index ¶
- Constants
- func ExcerptPath(id string, index int) string
- func FindingPath(id string) string
- func RetainCapture(material *Material, raw []byte) error
- func SHA256(raw []byte) string
- func SourcePrefix(role domain.Role) string
- func VerifyFinal(doc Document, session domain.SessionID, run domain.RunID, raw []byte, ...) error
- type Document
- type Evidence
- type Finding
- type FindingMaterial
- type Material
- type Source
Constants ¶
const DocumentPath = artifactwire.CompositeSupportPath
const Version = "mulgae-composite-support.v1"
Variables ¶
This section is empty.
Functions ¶
func ExcerptPath ¶
func FindingPath ¶
func RetainCapture ¶
RetainCapture reconstructs historical material only when all required sides are present; partial legacy archives stay explicitly unavailable.
func SourcePrefix ¶
func VerifyFinal ¶
func VerifyFinal(doc Document, session domain.SessionID, run domain.RunID, raw []byte, artifacts map[string]ports.ImmutablePublicationArtifact) error
VerifyFinal binds copied provenance and original content to the existing composite final format without rewriting that compatibility-sensitive format.
Types ¶
type Document ¶
type Document struct {
SchemaVersion string `json:"schema_version"`
Sources []Source `json:"sources"`
Findings []Finding `json:"findings"`
}
func Verify ¶
func Verify(session domain.SessionID, run domain.RunID, target string, artifacts map[string]ports.ImmutablePublicationArtifact) (Document, error)
Verify checks every copied byte and reconstructs each advertised capture. The caller additionally compares this document with its final finding/source map.
func (Document) CommonCapture ¶
type Evidence ¶
type Evidence struct {
Index int `json:"index"`
Availability string `json:"availability"`
TargetSHA256 string `json:"target_sha256"`
Side evidence.Side `json:"side"`
Path string `json:"path"`
LineStart int `json:"line_start"`
LineEnd int `json:"line_end"`
ExcerptSHA256 string `json:"excerpt_sha256"`
ContentSHA256 string `json:"content_sha256"`
}
type FindingMaterial ¶
type Material ¶
type Material struct {
Source Source
CaptureManifest []byte
CapturedArchive []byte
Findings []FindingMaterial
}
Material is collected while the source is independently verified. IDs in its findings are remapped before it crosses the publication boundary.
type Source ¶
type Source struct {
Role domain.Role `json:"role"`
SessionID string `json:"session_id"`
RunID string `json:"run_id"`
ReviewID string `json:"review_id"`
AttemptID string `json:"attempt_id"`
RecoveryManifestSHA256 string `json:"recovery_manifest_sha256"`
FinalSHA256 string `json:"final_sha256"`
ManifestSHA256 string `json:"manifest_sha256"`
SupportSHA256 string `json:"support_sha256"`
LineageSHA256 string `json:"lineage_sha256"`
Epoch uint64 `json:"epoch"`
TargetSHA256 string `json:"target_sha256"`
ProviderIdentities []string `json:"provider_identities"`
CaptureIdentity string `json:"capture_identity"`
CaptureAvailability string `json:"capture_availability"`
}
Source is portable provenance, deliberately excluding local project binding. Failed recovery sources have a manifest digest, not a P2 receipt.