Report correction repair operations and outcomes

This commit is contained in:
2026-11-11 04:31:44 +00:00
parent d927c61199
commit 735dfc1834
10 changed files with 159 additions and 10 deletions

View File

@@ -53,6 +53,16 @@ func Markdown(snapshot Snapshot, secrets ...string) []byte {
fmt.Fprintln(&b)
writeMatrix(&b, snapshot, r, true)
fmt.Fprintln(&b)
if len(snapshot.RepairOutcomes) > 0 {
fmt.Fprintln(&b, "## Correction repair")
fmt.Fprintln(&b)
fmt.Fprintln(&b, "| Stage | Chunk | Proposal index | Attempts | Outcome |")
fmt.Fprintln(&b, "| ---: | ---: | ---: | ---: | --- |")
for _, row := range snapshot.RepairOutcomes {
fmt.Fprintf(&b, "| %d | %d | %d | %d | %s |\n", row.StageIndex+1, row.ChunkIndex+1, row.ProposalIndex, row.Attempts, safe(row.Outcome))
}
fmt.Fprintln(&b)
}
fmt.Fprintln(&b, "Legend: `—` = not started; `n*` = interrupted with n recorded errors or recoveries. Completed error cells are 0 or 1.")
fmt.Fprintln(&b)
writeReasons(&b, "Error reasons", errorReasons(snapshot.Errors), safe)

View File

@@ -129,6 +129,15 @@ type WorkUnit struct {
RecoveryCount int
}
// RepairOutcome is a compact correction repair row.
type RepairOutcome struct {
StageIndex int
ChunkIndex int
ProposalIndex int
Attempts int
Outcome string
}
// Snapshot is built once from processing state and shared by presentations.
type Snapshot struct {
RunID string
@@ -139,6 +148,7 @@ type Snapshot struct {
OutputPath string
StageNames []string
WorkUnits []WorkUnit
RepairOutcomes []RepairOutcome
Summary Summary
Errors []ErrorRecord
Recoveries []RecoveryRecord