Documentation
¶
Index ¶
- Constants
- Variables
- func VerifyCaptureManifest(data []byte, material ports.CapturedReviewMaterial, ...) error
- func VerifySupport(session domain.SessionID, run domain.RunID, targetSHA256 string, ...) (domain.CaptureIdentity, error)
- func VerifySupportAt(prefix, targetSHA256 string, baseOID, headOID *string, ...) (domain.CaptureIdentity, error)
- type CaptureContext
- type CaptureFile
- type CaptureManifest
- type CaptureTarget
Constants ¶
const CaptureManifestVersion = "mulgae-capture-manifest.v1"
Variables ¶
Functions ¶
func VerifyCaptureManifest ¶
func VerifyCaptureManifest(data []byte, material ports.CapturedReviewMaterial, expected domain.CaptureIdentity) error
VerifyCaptureManifest requires the complete hash-verified retained archive; neither a stored digest nor current-tree content can stand in for it.
func VerifySupport ¶
func VerifySupport(session domain.SessionID, run domain.RunID, targetSHA256 string, baseOID, headOID *string, artifacts map[string]ports.ImmutablePublicationArtifact) (domain.CaptureIdentity, error)
VerifySupport reconstructs the complete capture exclusively from hash-bound publication artifacts. Callers retain ownership of the stable P2 observation.
func VerifySupportAt ¶
func VerifySupportAt(prefix, targetSHA256 string, baseOID, headOID *string, artifacts map[string]ports.ImmutablePublicationArtifact) (domain.CaptureIdentity, error)
VerifySupportAt also verifies the role-specific capture namespace of a composite.
Types ¶
type CaptureContext ¶
type CaptureFile ¶
type CaptureManifest ¶
type CaptureManifest struct {
SchemaVersion string `json:"schema_version"`
Target CaptureTarget `json:"target"`
PolicyIdentity string `json:"policy_identity"`
Sides []string `json:"sides"`
Files []CaptureFile `json:"files"`
Context CaptureContext `json:"context"`
}
CaptureManifest is canonical verification support, not a publication or an assertion that a stored digest has been verified. NewCaptureManifest derives it from admitted immutable material; VerifyCaptureManifest checks that material.
func DecodeCaptureManifest ¶
func DecodeCaptureManifest(data []byte) (CaptureManifest, error)
DecodeCaptureManifest admits only canonical field, number and array encoding (insignificant JSON whitespace is allowed). This rejects duplicate/unknown or omitted fields instead of letting a permissive decoder erase them.
func NewCaptureManifest ¶
func NewCaptureManifest(material ports.CapturedReviewMaterial) (CaptureManifest, error)
func (CaptureManifest) CanonicalBytes ¶
func (manifest CaptureManifest) CanonicalBytes() ([]byte, error)
func (CaptureManifest) Identity ¶
func (manifest CaptureManifest) Identity() (domain.CaptureIdentity, error)
func (CaptureManifest) Validate ¶
func (manifest CaptureManifest) Validate() error
type CaptureTarget ¶
type CaptureTarget struct {
Kind string `json:"kind"`
GitMode string `json:"git_mode"`
SHA256 string `json:"sha256"`
Size int64 `json:"size"`
BaseObjectID string `json:"base_object_id"`
HeadObjectID string `json:"head_object_id"`
HeadTreeObjectID string `json:"head_tree_object_id"`
IndexTreeObjectID string `json:"index_tree_object_id"`
}