report

package
v0.0.0-...-457a063 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package report generates HTML comparison reports for multi-variant runs.

Index

Constants

View Source
const LargeDiffThreshold = 500

LargeDiffThreshold is the number of lines above which a diff is stored in a separate file. This keeps the main report manageable.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator creates HTML comparison reports.

func NewGenerator

func NewGenerator(outputDir string) *Generator

NewGenerator creates a Generator that outputs to the specified directory.

func (*Generator) Generate

func (g *Generator) Generate(data *ReportData) error

Generate creates both HTML and Markdown report files. [Req 1.1]

type ReportData

type ReportData struct {
	SpecName       string
	GeneratedAt    time.Time
	Variants       []VariantReportData
	Comparison     *comparison.Result
	BaseCommit     string
	OriginalBranch string

	// VariantCommits maps variant ID to HEAD commit SHA for staleness detection [Req 1.7]
	VariantCommits map[int]string
}

ReportData holds all data for report generation.

type VariantMetrics

type VariantMetrics struct {
	Cost         *cost.Totals
	Duration     string // Pre-formatted duration string
	NumTurns     int
	LinesAdded   *int
	LinesRemoved *int
}

VariantMetrics holds execution metrics for report display.

type VariantReportData

type VariantReportData struct {
	ID       int
	Branch   string
	Status   string
	Error    string
	Diff     string
	DiffFile string // Relative path to separate diff file if diff is large
	Metrics  VariantMetrics
	Agent    string // Agent used for this variant [Req 10.6]
}

VariantReportData holds per-variant data for report rendering.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL