Documentation
¶
Overview ¶
Package summary provides types for summary-style evaluation reports with GO/WARN/NO-GO status per task. This is suited for deterministic checks like tests, linting, and vulnerability scans.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Status ¶
type Status string
Status represents the pass/fail status for a task or team. Based on NASA Go/No-Go terminology.
func ComputeStatus ¶
ComputeStatus determines the overall status from multiple statuses. Priority: NO-GO > WARN > GO > SKIP
func ComputeStatusFromTasks ¶
func ComputeStatusFromTasks(tasks []TaskResult) Status
ComputeStatusFromTasks determines the overall status from task results.
func (Status) IsBlocking ¶
IsBlocking returns true if the status is NO-GO.
type SummaryReport ¶
type SummaryReport struct {
// Schema is the JSON Schema URL for validation.
Schema string `json:"$schema,omitempty"`
// Project identifies the project being evaluated.
Project string `json:"project"`
// Version is the version being evaluated.
Version string `json:"version,omitempty"`
// Target is a human-readable target description.
Target string `json:"target,omitempty"`
// Phase describes the evaluation phase (e.g., "RELEASE VALIDATION").
Phase string `json:"phase,omitempty"`
// Teams are the individual team/agent sections.
Teams []TeamSection `json:"teams"`
// Status is the computed overall status.
Status Status `json:"status"`
// GeneratedAt is when the report was created.
GeneratedAt time.Time `json:"generated_at"`
// GeneratedBy identifies what created this report.
GeneratedBy string `json:"generated_by,omitempty"`
}
SummaryReport is the top-level report for summary-style evaluations. It aggregates results from multiple teams/agents.
func NewSummaryReport ¶
func NewSummaryReport(project, version, phase string) *SummaryReport
NewSummaryReport creates a new summary report with defaults.
func (*SummaryReport) AddTeam ¶
func (r *SummaryReport) AddTeam(team TeamSection)
AddTeam adds a team section to the report.
func (*SummaryReport) ComputeOverallStatus ¶
func (r *SummaryReport) ComputeOverallStatus() Status
ComputeOverallStatus calculates the overall status from all teams.
func (*SummaryReport) FinalMessage ¶
func (r *SummaryReport) FinalMessage() string
FinalMessage returns a formatted final status message.
func (*SummaryReport) IsGo ¶
func (r *SummaryReport) IsGo() bool
IsGo returns true if the overall status allows proceeding.
type TaskResult ¶
type TaskResult struct {
// ID is the unique identifier for this task.
ID string `json:"id"`
// Status is the task outcome (GO, WARN, NO-GO, SKIP).
Status Status `json:"status"`
// Detail provides a brief description of the result.
Detail string `json:"detail,omitempty"`
// DurationMs is the execution time in milliseconds.
DurationMs int64 `json:"duration_ms,omitempty"`
// Metadata contains additional task-specific data.
Metadata map[string]any `json:"metadata,omitempty"`
}
TaskResult represents the outcome of a single check or task.
type TeamSection ¶
type TeamSection struct {
// ID is the unique identifier (workflow step ID).
ID string `json:"id"`
// Name is the human-readable name.
Name string `json:"name"`
// AgentID is the agent that produced this section.
AgentID string `json:"agent_id,omitempty"`
// Model is the LLM model used (if applicable).
Model string `json:"model,omitempty"`
// DependsOn lists upstream team IDs (for DAG ordering).
DependsOn []string `json:"depends_on,omitempty"`
// Tasks are the individual check results.
Tasks []TaskResult `json:"tasks"`
// Status is the computed overall status for this section.
Status Status `json:"status"`
}
TeamSection represents results from a single agent or validation area.
func (*TeamSection) ComputeStatus ¶
func (t *TeamSection) ComputeStatus() Status
ComputeStatus calculates the status from tasks.