feat(trace): witnesses map and skipped-verification marker on Step

This commit is contained in:
pj committed 2026-06-01 13:56:31 +05:30
1 parent 4dcd01eba9
commit 3cf668e59a
1 file changed
+15
+15
View File
@@ -30,6 +30,21 @@ type Step struct {
// retry budget. The verifier is skipped for these steps so transient // retry budget. The verifier is skipped for these steps so transient
// state does not poison the previous/current extractor advance. // state does not poison the previous/current extractor advance.
Transitional bool `json:"transitional,omitempty"` Transitional bool `json:"transitional,omitempty"`
// SkippedVerification is set true exactly when the verifier was skipped
// for this step, so downstream tooling can tell a deliberately-skipped
// step from one that was verified and came back clean.
SkippedVerification bool `json:"skipped_verification,omitempty"`
// Witnesses records the violation witness for each property that newly
// violated at this step: the cause and the extractor values at onset.
Witnesses map[string]Witness `json:"witnesses,omitempty"`
}
// Witness is the trace-side record of a property violation: why it fired and a
// snapshot of every extractor's value at the violating step.
type Witness struct {
Reason string `json:"reason,omitempty"`
IsError bool `json:"is_error,omitempty"`
Extractors map[string]json.RawMessage `json:"extractors,omitempty"`
} }
// ExtractorChange records the prev/curr JSON values of an extractor whose // ExtractorChange records the prev/curr JSON values of an extractor whose