Documentation
¶
Index ¶
- Constants
- Variables
- func CheckMaterialFiles(root string, artifact Material) error
- func CheckMaterialInventory(root string, artifact Material) error
- func ChildObservationArgs(plan tool.Object) ([]string, error)
- func DefaultArchive() (string, error)
- func Digest(p string) (string, error)
- func Inventory(root string, empty bool) (tool.Object, error)
- func Keys(m tool.Object) []string
- func Local(name string) bool
- func MaterialPlanBytes(source []byte, runtime tool.Object) ([]byte, error)
- func MaterialPlanFromRuntime(runtime tool.Object) tool.Object
- func OfficialSDKIdentity(provider, caseID string, sdk tool.Object) bool
- func Phases(plan tool.Object) [][2]string
- func Read(p string) (tool.Object, error)
- func RecordingAgentType(plan, manifest, rawManifest tool.Object) (string, error)
- func RecordingRoot(root string) (core string, completePackage bool, err error)
- func Regular(root, name string) (string, error)
- func Resolved(p string) (string, error)
- func ScanCaptureCredentials(root string) (string, error)
- func ScanCaptureCredentialsWithEnvironment(root string, env map[string]string) (string, error)
- func SealCoreInventory(root string) error
- func SeedBusinessReport(core string) (tool.Object, error)
- func SelectionProvenance(plan, manifest tool.Object) (string, error)
- func SelfSeededChildren(plan tool.Object) bool
- func ValidateChildSetup(root string, plan tool.Object) error
- func ValidateCore(root string, material Material) error
- func ValidateOfficialCapture(artifact Material) error
- func ValidateOfficialRecord(root string, artifact Material) error
- func ValidateOfficialVerification(root, id string, material Material) error
- func ValidatePackage(root string, material Material) error
- func ValidatePackageSelection(root string, material Material) error
- func ValidateVerificationSource(material Material, inventory tool.Object) error
- func VerifyAdoptedFiles(root string) (tool.Object, error)
- func VerifyFile(root, path, digest string) error
- func VerifyMaterials(root string, requireComplete bool) error
- func VerifySourcePhase(root string, requireComplete bool) error
- func Within(p, root string) bool
- func Write(p string, value any) error
- func WriteSourceManifest(root string, outcome tool.Result) error
- type Corpus
- func (c *Corpus) Adopt(source, replay, reviewPath string) (target string, err error)
- func (c *Corpus) AdoptWithIndexReplacement(source, replay, reviewPath string, replace func(string, string) error) (target string, err error)
- func (c *Corpus) Catalog() (tool.Object, error)
- func (c *Corpus) LoadIndex() (tool.Object, error)
- func (c *Corpus) Normalize() error
- func (c *Corpus) Qualification(source, replay string, manual bool) (tool.Object, error)
- func (c *Corpus) ValidateAdmission(source, replay string, review tool.Object) (tool.Object, error)
- func (c *Corpus) VerifyAdopted(entry tool.Object) (string, error)
- type Material
- type MaterialInspection
- type OfficialOrigin
- type PackageSelection
- type PackageSelectionReference
- type Validation
- func (v *Validation) Check(ok bool, message string)
- func (v *Validation) Digest(root, name string) string
- func (v *Validation) Hashes(root string, hashes tool.Object)
- func (v *Validation) Inventory(root string, empty bool) tool.Object
- func (v *Validation) Read(root, name string) tool.Object
- func (v *Validation) Replay(source, replay string, plan tool.Object, mode string)
- func (v *Validation) ReplayEvidence(replay string, plan tool.Object) tool.Object
- func (v *Validation) Required(source string, plan tool.Object) tool.Object
- func (v *Validation) Summary(root, mode string, plan tool.Object) tool.Object
Constants ¶
const MaterialFormatVersion = 3
MaterialFormatVersion is the portable material descriptor version. It stores identity, provenance, hashes and material-root-relative bindings without a machine-local location.
Variables ¶
var SourceEvidence = []string{"plan.json", "manifest.json", "report.json", "result.json", "summary.json"}
Functions ¶
func CheckMaterialFiles ¶ added in v0.2.0
CheckMaterialFiles verifies a descriptorless legacy package against the identity and hashes held by the current fixture index.
func CheckMaterialInventory ¶
func ChildObservationArgs ¶ added in v0.2.0
func DefaultArchive ¶
func MaterialPlanBytes ¶ added in v0.2.0
MaterialPlanBytes preserves unknown source values, including numeric literals. Only defined preparation facts may replace values from the source document.
func MaterialPlanFromRuntime ¶ added in v0.2.0
MaterialPlanFromRuntime keeps recording facts and removes only values that describe one local preparation. The source plan remains a separate immutable binding; this projection is what replay and qualification may consume.
func OfficialSDKIdentity ¶ added in v0.2.2
OfficialSDKIdentity validates the SDK package used by the official case driver.
func RecordingAgentType ¶
RecordingAgentType reconciles every saved agent identity before fixture import.
func RecordingRoot ¶ added in v0.2.0
RecordingRoot recognizes layouts, never a recursively discovered plan.
func ScanCaptureCredentials ¶
The scan describes this capture only. It never sanitizes or rewrites evidence.
func ScanCaptureCredentialsWithEnvironment ¶
ScanCaptureCredentialsWithEnvironment is for prepared actions whose selected environment is already represented by a descriptor and must not be copied into material as a private native.env file.
func SealCoreInventory ¶ added in v0.2.0
SealCoreInventory is called only after all core writers have closed.
func SeedBusinessReport ¶ added in v0.2.0
SeedBusinessReport reads the explicitly selected official record. A sealed core alone proves capture, never the business qualification of a history seed.
func SelfSeededChildren ¶ added in v0.2.0
func ValidateChildSetup ¶ added in v0.2.0
func ValidateCore ¶ added in v0.2.0
ValidateCore verifies the closed format 3 inventory. The two envelopes are excluded from that inventory: the descriptor hashes the manifest, and the caller hashes the descriptor. No object hashes itself.
func ValidateOfficialCapture ¶
ValidateOfficialCapture checks portable, sealed capture ownership. It does not read the originating fixture or imply that the parent's business passed.
func ValidateOfficialRecord ¶
ValidateOfficialRecord is the downstream qualification seam. Capture ownership alone is insufficient: verify/admission must require the exact successful run, business report, supervised connections and unchanged material hashes.
func ValidateOfficialVerification ¶ added in v0.2.0
func ValidatePackage ¶ added in v0.2.0
ValidatePackage validates imported immutable domains without registering any imported execution in the new fixture's scheduling index.
func ValidatePackageSelection ¶ added in v0.2.0
func ValidateVerificationSource ¶
Legacy material keeps its original evidence contract. New public recordings seal capture provenance before the parent business report exists.
func VerifyAdoptedFiles ¶
VerifyAdoptedFiles validates the reduced immutable view. External mock may reuse its saved-history hashes without claiming official/publication eligibility.
func VerifyFile ¶
func VerifyMaterials ¶
Check source bytes, not runtime identities: current drivers, SDK versions and peer binaries remain freely selectable. Shared/synthetic materials need no recording manifest. Existing manifests, when present, must remain truthful.
func VerifySourcePhase ¶
Types ¶
type Corpus ¶
type Corpus struct {
Index, Scenarios, Archive string
}
Corpus policy belongs to the Go tool, not to an SDK driver. Paths are explicit so the compiled binary can operate outside its source checkout.
func (*Corpus) AdoptWithIndexReplacement ¶
func (*Corpus) Qualification ¶
func (*Corpus) ValidateAdmission ¶
type Material ¶
type Material struct {
FormatVersion int `json:"formatVersion,omitempty"`
LegacyInventorySHA256 string `json:"legacyInventorySHA256,omitempty"`
SourcePlanSHA256 string `json:"sourcePlanSHA256,omitempty"`
OriginSHA256 string `json:"originSHA256,omitempty"`
OfficialOrigin *OfficialOrigin `json:"officialOrigin,omitempty"`
Files map[string]string `json:"files,omitempty"`
ID string `json:"id"`
Kind string `json:"kind"`
Action string `json:"action"`
Provenance string `json:"provenance"`
Path string `json:"-"`
PlanSHA256 string `json:"planSHA256"`
ManifestSHA256 string `json:"manifestSHA256"`
RecordingSHA256 string `json:"recordingSHA256"`
Connections []string `json:"connections"`
CreatedAt string `json:"createdAt"`
}
func ReadMaterial ¶
ReadMaterial describes an imported payload. Its caller assigns fixture-local identity and checks any builtin snapshot against the builtin contract.
func ReadMaterialDescriptor ¶ added in v0.2.0
ReadMaterialDescriptor loads the descriptor owned by a supported material format. The caller supplies the material root explicitly; a stored legacy path is retained in the file bytes but is never used to locate content. A nil descriptor means a supported legacy package without material.json.
func (Material) MarshalJSON ¶ added in v0.2.0
MarshalJSON never persists a machine-local material location.
func (Material) SameDescriptor ¶ added in v0.2.0
SameDescriptor compares persisted material identity without treating the caller-resolved root as part of the descriptor.
func (*Material) UnmarshalJSON ¶ added in v0.2.0
type MaterialInspection ¶
type MaterialInspection struct {
Plan tool.Object
Manifest tool.Object
Provenance string
HistoryFiles map[string]string
}
func InspectMaterial ¶
func InspectMaterial(artifact Material) (*MaterialInspection, error)
func InspectMaterialWithoutDescriptor ¶ added in v0.2.0
func InspectMaterialWithoutDescriptor(artifact Material) (*MaterialInspection, error)
InspectMaterialWithoutDescriptor validates a supported legacy package whose identity is stored only in the caller's fixture index. The material directory must not gain a descriptor during the import.
type OfficialOrigin ¶
type OfficialOrigin struct {
RunID string `json:"runId"`
FixtureID string `json:"fixtureId"`
CaseID string `json:"caseId"`
AgentType string `json:"agentType"`
RecordSourceSHA256 string `json:"recordSourceSHA256"`
SourceSHA256 string `json:"sourceSHA256"`
DriverSHA256 string `json:"driverSHA256"`
Connections []string `json:"connections"`
}
OfficialOrigin identifies capture ownership, not a business pass. It is sealed into the material before publication; the later run result is separate evidence.
func CaptureOrigin ¶ added in v0.2.0
func CaptureOrigin(material Material) (*OfficialOrigin, error)
CaptureOrigin resolves the one canonical origin object for format 3. The returned pointer is an in-memory view and is never embedded in new metadata.
func (*OfficialOrigin) UnmarshalJSON ¶
func (o *OfficialOrigin) UnmarshalJSON(data []byte) error
UnmarshalJSON keeps immutable repository evidence readable after the tool-owned identity moved from sessionId to fixtureId. MarshalJSON remains the default struct encoding and therefore never writes the old field.
type PackageSelection ¶ added in v0.2.0
type PackageSelection struct {
SchemaVersion int `json:"schemaVersion"`
MaterialID string `json:"materialId"`
Material PackageSelectionReference `json:"material"`
Record PackageSelectionReference `json:"record"`
Verification PackageSelectionReference `json:"verification"`
Executions []PackageSelectionReference `json:"executions"`
}
PackageSelection is the schema 2 reader contract shared with admission. The domain envelopes own inventories; review only selects their exact hashes.
type PackageSelectionReference ¶ added in v0.2.0
PackageSelectionReference selects one sealed domain envelope. References are package-relative and preserve the identity already present in that envelope.
type Validation ¶
type Validation struct {
Err error
// contains filtered or unexported fields
}
Validation keeps the first error. Subsequent reads/checks cannot turn a missing or malformed artifact into a successful qualification.
func (*Validation) Check ¶
func (v *Validation) Check(ok bool, message string)
func (*Validation) Digest ¶
func (v *Validation) Digest(root, name string) string
func (*Validation) Replay ¶
func (v *Validation) Replay(source, replay string, plan tool.Object, mode string)