mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-04 20:17:09 +00:00
feat(trace): witnesses map and skipped-verification marker on Step
This commit is contained in:
1 parent
4dcd01eba9
commit
3cf668e59a
1 file changed
+34
-19
+34
-19
@@ -13,23 +13,38 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Step struct {
|
type Step struct {
|
||||||
Index int `json:"step"`
|
Index int `json:"step"`
|
||||||
Timestamp time.Time `json:"timestamp"`
|
Timestamp time.Time `json:"timestamp"`
|
||||||
Screen string `json:"screen,omitempty"`
|
Screen string `json:"screen,omitempty"`
|
||||||
Snapshots map[string]json.RawMessage `json:"snapshots,omitempty"`
|
Snapshots map[string]json.RawMessage `json:"snapshots,omitempty"`
|
||||||
// NextAction is the action chosen for the next iteration based on observing this step.
|
// NextAction is the action chosen for the next iteration based on observing this step.
|
||||||
NextAction *Action `json:"next_action,omitempty"`
|
NextAction *Action `json:"next_action,omitempty"`
|
||||||
Exceptions []Exception `json:"exceptions,omitempty"`
|
Exceptions []Exception `json:"exceptions,omitempty"`
|
||||||
Violations []string `json:"violations,omitempty"`
|
Violations []string `json:"violations,omitempty"`
|
||||||
Hierarchy *hierarchy.Tree `json:"hierarchy,omitempty"`
|
Hierarchy *hierarchy.Tree `json:"hierarchy,omitempty"`
|
||||||
Residuals map[string]json.RawMessage `json:"residuals,omitempty"`
|
Residuals map[string]json.RawMessage `json:"residuals,omitempty"`
|
||||||
Metrics *Metrics `json:"metrics,omitempty"`
|
Metrics *Metrics `json:"metrics,omitempty"`
|
||||||
ExtractorChanges map[string]ExtractorChange `json:"extractor_changes,omitempty"`
|
ExtractorChanges map[string]ExtractorChange `json:"extractor_changes,omitempty"`
|
||||||
// Transitional marks a step whose hierarchy still showed a NavHost
|
// Transitional marks a step whose hierarchy still showed a NavHost
|
||||||
// cross-fade (multiple route-level *Screen ids) after the runner's
|
// cross-fade (multiple route-level *Screen ids) after the runner's
|
||||||
// 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
|
||||||
@@ -83,14 +98,14 @@ type Exception struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Meta struct {
|
type Meta struct {
|
||||||
Seed int64 `json:"seed"`
|
Seed int64 `json:"seed"`
|
||||||
SpecPath string `json:"spec_path"`
|
SpecPath string `json:"spec_path"`
|
||||||
BundleSHA256 string `json:"bundle_sha256"`
|
BundleSHA256 string `json:"bundle_sha256"`
|
||||||
Platform string `json:"platform"`
|
Platform string `json:"platform"`
|
||||||
BundleID string `json:"bundle_id"`
|
BundleID string `json:"bundle_id"`
|
||||||
StartedAt time.Time `json:"started_at"`
|
StartedAt time.Time `json:"started_at"`
|
||||||
EndedAt *time.Time `json:"ended_at,omitempty"`
|
EndedAt *time.Time `json:"ended_at,omitempty"`
|
||||||
SanderlingVersion string `json:"sanderling_version"`
|
SanderlingVersion string `json:"sanderling_version"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Writer struct {
|
type Writer struct {
|
||||||
|
|||||||
Reference in new issue
Block a user