report

package
v0.2026327.329 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 9 Imported by: 3 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.

TAP is a line format too — a test point is one line — so the step's text is flattened the same way the text report flattens it (opencharly/spec#282). The diagnostic block below is quoted, so it carries a multi-line message without breaking the point.

func FormatStepResultsText

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

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

func OneLine added in v0.2026302.327

func OneLine(s string) string

OneLine flattens s to a SINGLE line: every run of whitespace — a newline included — becomes one space.

The text report is a LINE format. A reader pairs each step's status with its id by parsing ONE line per step (the shape renderStep writes below), and the report states its own step count in the rollup it prints underneath. A step whose TEXT or whose MESSAGE carries a newline therefore used to SPAN several lines, and its id bracket landed on a line of its own: the report's step lines then disagreed with the report's own rollup, and a reader that checks the two — every verdict reader in the org does — refuses the WHOLE report and credits NOTHING from it (opencharly/spec#282).

The PRODUCER owns the format, so the producer guarantees the shape it publishes. This is the ONE flattening rule for the report: a step's text, keyword, id and message all go through it.

Flattening also collapses every run of TWO OR MORE spaces, so the two-space separator before a step's id bracket is the only one on the line — a reader can split the line on it without a bracket inside the text stealing the split.

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