report

package
v0.2026257.1817 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: MIT Imports: 8 Imported by: 3

Documentation

Overview

Package report hosts the check-run result reporters — the FormatStepResults* family + ReportStepResultsCount + ClassifyStepFailures — relocated to a spec fabric slice (#55 CHECK-ENGINE cone Option A) so the deploy-verify path (candy/plugin-fleet's verify_local.go, #55 W3 B3 — a plugin now, not core) reaches them importing zero kit. The reporters operate on []spec.StepResult (the CUE-sourced spec wire type, checkresult.cue) + spec.Status; the INFRA-failure discriminator IsContainerInfraResult lives in spec/exec (a host primitive over podman exit strings), so this slice is its own package to import spec/exec WITHOUT forcing spec/spec to import spec/exec (which would cycle: spec/exec already imports spec/spec). sdk/kit re-exports each symbol (sdk/kit/report.go) so every existing kit.ReportStepResultsCount / kit.FormatStepResults* / kit.ClassifyStepFailures call site (charly core + the candies + sdk) is untouched. New consumers reference spec/report directly.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClassifyStepFailures

func ClassifyStepFailures(results []spec.StepResult) (checkFails, infraFails int)

ClassifyStepFailures splits FAIL results into genuine check failures vs. container-setup INFRA failures (IsContainerInfraResult) — the shared discriminator every check-run caller (box/live/feature, in-core and externalized) uses to map its own exit-code error type. An infra failure means the check command never ran (a probe container's mount/passwd-gen raced concurrent build churn); it must never read as a checks-failed verdict.

func FormatStepResultsJSON

func FormatStepResultsJSON(w io.Writer, results []spec.StepResult) error

FormatStepResultsJSON emits a structured JSON document.

func FormatStepResultsJUnit

func FormatStepResultsJUnit(w io.Writer, results []spec.StepResult) error

FormatStepResultsJUnit emits a JUnit XML report grouped by step origin.

func FormatStepResultsTAP

func FormatStepResultsTAP(w io.Writer, results []spec.StepResult)

FormatStepResultsTAP emits TAP v13. Each step is one TAP test point.

func FormatStepResultsText

func FormatStepResultsText(w io.Writer, results []spec.StepResult)

FormatStepResultsText emits a human-readable per-step report to w.

func Plural

func Plural(n int) string

Plural returns "" for n==1 and "s" otherwise — the trivial English pluralization used by the result reporters and the eventually-retry summaries.

func ReportStepResults

func ReportStepResults(w io.Writer, results []spec.StepResult, format string)

ReportStepResults writes results in the requested format ("json"/"tap"/"junit", default text), dispatching to the FormatStepResults* family above.

func ReportStepResultsCount

func ReportStepResultsCount(w io.Writer, results []spec.StepResult, format string) int

ReportStepResultsCount renders results per format via ReportStepResults and returns how many results ended in a FAIL verdict (no infra/check split — a caller needing that split uses ClassifyStepFailures directly).

Types

This section is empty.

Jump to

Keyboard shortcuts

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