Documentation
¶
Overview ¶
Package runtimeoperations owns the protected operational-evidence drill. It is intentionally separate from the runtime data plane: its inputs are operator-provided capabilities and it never makes a production claim from a disposable run.
Index ¶
Constants ¶
const ( RunnerContract = "protected-runtime-operations-v1" SchemaVersion = "agent-runtime.operations-evidence/v1" DirectLabSchemaVersion = "agent-runtime.direct-lab-evidence/v1" DirectLabProofLevel = "direct_authorized_disposable_operational_lab" )
Variables ¶
This section is empty.
Functions ¶
func WriteDirectLabEvidence ¶
func WriteDirectLabEvidence(path string, evidence DirectLabEvidence) error
WriteDirectLabEvidence writes a new redacted direct-lab record. Its schema is intentionally incompatible with WriteEvidence and protected artifacts.
func WriteEvidence ¶
WriteEvidence creates a report only after a successful validated run. It never replaces an earlier artifact, preventing a local retry from masking a protected-run record.
Types ¶
type AuditSinkEvidence ¶
type Config ¶
type Config struct {
SourceDSN, RestoreDSN string
AuditSinkURL, AuditRetentionURL string
RetentionTenant, RetentionAuthorization string
PITRTenant, PITRAuthorization string
PITRRecoveryPoint, SourceRevision string
PITRExpectedGeneration int64
}
Config contains only the explicit protected-run authority. It is never marshalled into the retained report.
func LoadConfig ¶
LoadConfig requires every protected-run capability. Missing authority is a refusal, not a blocked evidence artifact.
func LoadRehearsalConfig ¶
LoadRehearsalConfig loads the same database, audit-sink, and restore inputs as the protected drill without accepting a runner contract. It exists only for disposable local rehearsals: callers must not write or retain Evidence from this configuration as protected operational proof.
type DatabaseEvidence ¶
type DirectLabEvidence ¶
type DirectLabEvidence struct {
SchemaVersion string `json:"schema_version"`
ProofLevel string `json:"proof_level"`
Result string `json:"result"`
OccurredAt string `json:"occurred_at"`
SourceRevision string `json:"source_revision"`
Environment string `json:"environment"`
Database DatabaseEvidence `json:"database"`
AuditSink AuditSinkEvidence `json:"audit_sink"`
PITR PITREvidence `json:"pitr"`
Limitations []string `json:"limitations"`
}
DirectLabEvidence records the same observable database, audit-sink, and isolated-restore exercise as the protected drill, but is intentionally a different schema and proof level. It cannot be mistaken for production or protected-run evidence.
func ReadDirectLabEvidence ¶
func ReadDirectLabEvidence(path string) (evidence DirectLabEvidence, err error)
ReadDirectLabEvidence accepts only the explicitly non-production lab schema.
func RunDirectLab ¶
RunDirectLab performs a deliberately authorized disposable operational lab. The returned record is separate from protected evidence and contains no endpoints, credentials, tenant IDs, or authority identifiers.
func (DirectLabEvidence) Validate ¶
func (evidence DirectLabEvidence) Validate() error
Validate checks the direct-lab schema without accepting it as protected operational evidence.
type Evidence ¶
type Evidence struct {
SchemaVersion string `json:"schema_version"`
ProofLevel string `json:"proof_level"`
Result string `json:"result"`
OccurredAt string `json:"occurred_at"`
SourceRevision string `json:"source_revision"`
Database DatabaseEvidence `json:"database"`
AuditSink AuditSinkEvidence `json:"audit_sink"`
PITR PITREvidence `json:"pitr"`
Limitations []string `json:"limitations"`
}
Evidence is the redacted, schema-validated outcome of one actual protected run. It deliberately contains no DSN, endpoint, credential, or authority ID.
func ReadEvidence ¶
ReadEvidence parses and validates a retained artifact without connecting to any external system.
func Run ¶
Run verifies the operator-prepared, live controls. It fails before a report is written if any authorization, database observation, sink phase, or PITR recovery check cannot be observed through the supplied capabilities.
func RunRehearsal ¶
RunRehearsal executes the same observations using a caller-supplied local CA bundle. It is for disposable local services only and returns no retained evidence artifact itself.