Documentation
¶
Overview ¶
Package budget measures the checked-in catalog and applies release policy.
Index ¶
Constants ¶
View Source
const ( // CurrentPolicyVersion identifies the machine-readable release policy shape. CurrentPolicyVersion uint64 = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Classification ¶
type Classification string
Classification controls whether a policy finding blocks a release.
const ( // ClassificationHardGate blocks a release when a correctness invariant fails. ClassificationHardGate Classification = "hard_gate" // ClassificationReviewThreshold records a review trigger without rejecting a release. ClassificationReviewThreshold Classification = "review_threshold" )
type Finding ¶
type Finding struct {
Code string `json:"code"`
Classification Classification `json:"classification"`
Message string `json:"message"`
}
Finding records one measurement that crossed a classified policy boundary.
type Policy ¶
Policy is the versioned catalog release policy applied to one measurement.
func DefaultPolicy ¶
func DefaultPolicy() Policy
DefaultPolicy returns the reviewed catalog release policy.
type Report ¶
type Report struct {
SchemaVersion uint64 `json:"schema_version"`
GenerationID string `json:"generation_id"`
GeneratedAt time.Time `json:"generated_at"`
MeasuredAt time.Time `json:"measured_at"`
AgeSeconds int64 `json:"age_seconds"`
PayloadChecksum string `json:"payload_checksum"`
UncompressedBytes int64 `json:"uncompressed_bytes"`
CompressedBytes int64 `json:"compressed_bytes"`
ProviderCount int `json:"provider_count"`
ModelCount int `json:"model_count"`
Policy Policy `json:"policy"`
Passed bool `json:"passed"`
Findings []Finding `json:"findings,omitempty"`
}
Report records exact catalog measurements and the policy applied to them.
type Rule ¶
type Rule struct {
Code string `json:"code"`
Classification Classification `json:"classification"`
Objective string `json:"objective"`
MeasurementMethod string `json:"measurement_method"`
Unit string `json:"unit"`
ApprovedLimit string `json:"approved_limit"`
Consequence string `json:"consequence"`
Owner string `json:"owner"`
ExceptionPath string `json:"exception_path"`
ReopenCondition string `json:"reopen_condition"`
}
Rule defines one classified release-policy decision.
Click to show internal directories.
Click to hide internal directories.