Documentation
¶
Overview ¶
Package agentresult converts agent envelope payloads into the CRD status shapes. It is the one place the float-bearing wire format meets the no-float structural schemas. Both job controllers (investigation, remediation) use it so cost/confidence formatting and size caps never drift apart.
Index ¶
- func Analysis(a envelope.AnalysisResult) *v1alpha1.Analysis
- func FailedStage(reported *envelope.Stage, outcome, detail string) envelope.Stage
- func FormatConfidence(f float64) string
- func FormatCost(f float64) string
- func FromStage(st *envelope.Stage) *v1alpha1.StageResult
- func TruncateDetail(s string) string
- func TruncateReport(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Analysis ¶
func Analysis(a envelope.AnalysisResult) *v1alpha1.Analysis
Analysis maps one envelope analysis dimension; nil when unassessed.
func FailedStage ¶ added in v0.8.0
FailedStage builds the stage to record for a run the controller is failing.
When the agent reported a stage, that stage is kept and only the verdict is overwritten. A failed run still burned turns, tokens and money; dropping its accounting would blank the child's usage and leave the harness/model rollup scopes with nothing to key on. reported is nil only when no event arrived at all (a vanished or unparseable Job), and then the verdict is all there is to record.
func FormatConfidence ¶
FormatConfidence renders confidence as the CRD's decimal string; empty when out of range.
func FormatCost ¶
FormatCost renders a float cost as the CRD's decimal string (6 fractional digits, micro-USD precision); empty when unreported.
func FromStage ¶
func FromStage(st *envelope.Stage) *v1alpha1.StageResult
FromStage maps an envelope stage onto the CRD stage result.
func TruncateDetail ¶
TruncateDetail caps a short detail/summary for a CRD field.
func TruncateReport ¶
TruncateReport caps a report markdown for a CRD field.
Types ¶
This section is empty.