afkevidence

package
v0.0.0-...-804b954 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package afkevidence validates bounded, secret-safe direct-main evidence logs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event string

Event classifies the direct-main checkpoint represented by a record.

const (
	// EventLocalCheck records mutable working-tree evidence only.
	EventLocalCheck Event = "local_check"
	// EventPrePush records a check against the immutable revision about to be pushed.
	EventPrePush Event = "pre_push"
	// EventMainCI records a main-branch CI result for an immutable revision.
	EventMainCI Event = "main_ci"
	// EventRedMainHalt records that delivery stopped after a failed main check.
	EventRedMainHalt Event = "red_main_halt"
)

type Log

type Log struct {
	Version int      `json:"version"`
	Records []Record `json:"records"`
}

Log is the versioned machine-readable AFK evidence document.

func Parse

func Parse(input io.Reader) (Log, error)

Parse decodes exactly one AFK evidence document and validates every record.

type Record

type Record struct {
	Event          Event                     `json:"event"`
	RequirementIDs []milestone.RequirementID `json:"requirement_ids"`
	Seams          []string                  `json:"seams"`
	Documentation  []string                  `json:"documentation"`
	Revision       milestone.RevisionRef     `json:"revision"`
	SourceRef      string                    `json:"source_ref"`
	UTCTime        time.Time                 `json:"utc_time"`
	ProofLevel     milestone.ProofLevel      `json:"proof_level"`
	CommandID      milestone.CommandID       `json:"command_id"`
	ArtifactRef    milestone.ArtifactRef     `json:"artifact_ref"`
	Result         string                    `json:"result"`
	Limitations    []string                  `json:"limitations"`
}

Record contains only bounded references; command output and secrets are external.

func (Record) Immutable

func (r Record) Immutable() bool

Immutable reports whether the record refers to a full immutable revision.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址