@@ -46,8 +46,8 @@ type EvalResult struct {
4646}
4747
4848type EvalSummary struct {
49- Result EvalResult `json:"result"`
50- DebugInfo EvalSummaryDebugInfo `json:"debug_info"`
49+ Result * EvalResult `json:"result"`
50+ DebugInfo * EvalSummaryDebugInfo `json:"debug_info,omitempty "`
5151}
5252
5353type EvalSummaryDebugInfo struct {
@@ -112,15 +112,11 @@ func verifyMaterial(schema *v1.CraftingSchema, material *v12.Attestation_Materia
112112 policyEv := policyEvs [0 ]
113113
114114 summary := & EvalSummary {
115- Result : EvalResult {
115+ Result : & EvalResult {
116116 Skipped : policyEv .GetSkipped (),
117117 SkipReasons : policyEv .SkipReasons ,
118118 Violations : make ([]string , 0 , len (policyEv .Violations )),
119119 },
120- DebugInfo : EvalSummaryDebugInfo {
121- Inputs : []map [string ]interface {}{},
122- RawResults : []map [string ]interface {}{},
123- },
124120 }
125121
126122 // Collect violation messages
@@ -130,6 +126,11 @@ func verifyMaterial(schema *v1.CraftingSchema, material *v12.Attestation_Materia
130126
131127 // Include raw debug info if requested
132128 if debug {
129+ summary .DebugInfo = & EvalSummaryDebugInfo {
130+ Inputs : []map [string ]interface {}{},
131+ RawResults : []map [string ]interface {}{},
132+ }
133+
133134 for _ , rr := range apiRawResultsToEngineRawResults (policyEv .RawResults ) {
134135 if in , ok := rr ["input" ].(map [string ]interface {}); ok {
135136 // Take the first input found, as we only allow one material input
0 commit comments