Documentation
¶
Overview ¶
Package greencontract records validation requirements for completed work.
Index ¶
Constants ¶
View Source
const ( LevelTargetedTests = "targeted_tests" LevelPackage = "package" LevelWorkspace = "workspace" LevelMergeReady = "merge_ready" RequirementRequiredLevel = "required_level" RequirementTestCommandProvenance = "test_command_provenance" RequirementBaseBranchFreshness = "base_branch_freshness" RequirementRecoveryAttemptContext = "recovery_attempt_context" OutcomeSatisfied = "satisfied" OutcomeUnsatisfied = "unsatisfied" StatusSatisfied = "satisfied" StatusUnsatisfied = "unsatisfied" )
Variables ¶
This section is empty.
Functions ¶
func LevelSatisfies ¶
func NormalizeLevel ¶
func StatusForOutcome ¶
Types ¶
type Contract ¶
type Contract struct {
RequiredLevel string `json:"required_level"`
Requirements []string `json:"requirements,omitempty"`
BlockKnownFlakes bool `json:"block_known_flakes"`
}
func MergeReady ¶
type Evidence ¶
type Evidence struct {
ObservedLevel string `json:"observed_level"`
TestCommands []TestCommandProvenance `json:"test_commands,omitempty"`
BaseBranchFresh bool `json:"base_branch_fresh"`
KnownFlakes []KnownFlake `json:"known_flakes,omitempty"`
RecoveryAttemptContextRecorded bool `json:"recovery_attempt_context_recorded"`
}
func (Evidence) HasPassingTestCommand ¶
type KnownFlake ¶
type Outcome ¶
type Outcome struct {
Outcome string `json:"outcome"`
RequiredLevel string `json:"required_level"`
ObservedLevel string `json:"observed_level,omitempty"`
Missing []string `json:"missing,omitempty"`
BlockingFlakes []KnownFlake `json:"blocking_flakes,omitempty"`
}
type TestCommandProvenance ¶
type TestCommandProvenance struct {
Command string `json:"command"`
ExitCode int `json:"exit_code"`
}
func (TestCommandProvenance) Passed ¶
func (p TestCommandProvenance) Passed() bool
Click to show internal directories.
Click to hide internal directories.