Documentation
¶
Overview ¶
Package report renders one immutable result model into human and machine formats. Renderers never reinterpret verdicts or attribution.
Index ¶
- Constants
- Variables
- func BaselineJSON(baseline Baseline) ([]byte, error)
- func HAR(exchanges []HTTPExchange) ([]byte, error)
- func HTML(bundle Bundle) ([]byte, error)
- func JSON(bundle Bundle) ([]byte, error)
- func JUnit(bundle Bundle) ([]byte, error)
- func Markdown(bundle Bundle) ([]byte, error)
- func SARIF(bundle Bundle) ([]byte, error)
- func Terminal(bundle Bundle) ([]byte, error)
- type Baseline
- type Bundle
- type CaseState
- type Change
- type Condition
- type Counts
- type Difference
- type HTTPExchange
Constants ¶
View Source
const BaselineSchemaVersion = "urn:agentapi-doctor:baseline:v1"
View Source
const (
SchemaVersion = "urn:agentapi-doctor:report-bundle:v1alpha2"
)
Variables ¶
View Source
var ErrIncomparable = errors.New("baseline and run have different immutable test identities")
Functions ¶
func BaselineJSON ¶
func HAR ¶
func HAR(exchanges []HTTPExchange) ([]byte, error)
Types ¶
type Baseline ¶
type Baseline struct {
SchemaVersion string `json:"schema_version"`
Name string `json:"name"`
ProfileDigest schema.Digest `json:"profile_digest"`
PackDigest schema.Digest `json:"pack_digest"`
SupportLockDigest schema.Digest `json:"support_lock_digest"`
DenominatorDigest schema.Digest `json:"denominator_digest"`
Cases map[string]CaseState `json:"cases"`
}
func DecodeBaseline ¶
func NewBaseline ¶
NewBaseline snapshots only exact comparable identities. A report without exactly one ProtocolPack is rejected rather than choosing one implicitly.
type Bundle ¶
type Bundle struct {
SchemaVersion string `json:"schema_version"`
RunID schema.InstanceID `json:"run_id"`
IntentPlanRef schema.ObjectRef `json:"intent_plan_ref"`
ResolvedPlanRef schema.ObjectRef `json:"resolved_plan_ref"`
Profile schema.ArtifactPin `json:"profile"`
Artifacts []schema.ArtifactPin `json:"artifacts"`
SupportLock schema.Digest `json:"support_lock_digest"`
Denominators schema.DenominatorSummary `json:"denominators"`
Outcome schema.ProfileOutcome `json:"profile_outcome"`
Dimensions map[string]schema.DimensionOutcome `json:"dimension_outcomes"`
Cases []schema.CaseResult `json:"cases"`
Conditions []Condition `json:"conditions"`
PrimaryExitCode int `json:"primary_exit_code"`
}
type CaseState ¶
type CaseState struct {
Disposition schema.PlanDisposition `json:"plan_disposition"`
Execution schema.ExecutionStatus `json:"execution_status,omitempty"`
Verdict *schema.Verdict `json:"verdict,omitempty"`
}
type Counts ¶
type Difference ¶
type Difference struct {
ScenarioID string `json:"scenario_id"`
Change Change `json:"change"`
Before *CaseState `json:"before,omitempty"`
After *CaseState `json:"after,omitempty"`
}
func Compare ¶
func Compare(before, after Baseline) ([]Difference, error)
type HTTPExchange ¶
type HTTPExchange struct {
// contains filtered or unexported fields
}
HTTPExchange can only be constructed from payloads that crossed the redaction boundary. URL and headers are intentionally omitted because their independent sanitization belongs to the recorder.
func NewHTTPExchange ¶
func NewHTTPExchange(started time.Time, duration time.Duration, method string, status int, request, response redaction.SanitizedPayload) (HTTPExchange, error)
Click to show internal directories.
Click to hide internal directories.