mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
Attribute violations to the causing step and render witness evidence (#59)
* feat(ltl): attribute violations to the obligation origin step * feat(verifier): label evaluator observations with the runner step index * feat(trace): carry the causing step in violation witnesses and summary * feat(replay): move the violation marker to the causing step * feat(replay-ui): render witness evidence in the violations panel * feat(replay-ui): wire witnesses and step jump into violation panels * fix(ltl): treat next obligations as vacuous at run end * fix(runner): give the finalize trace record its own step index
This commit is contained in:
15 files changed
+719
-85
No files matched your search
@@ -39,6 +39,7 @@ type Verifier struct {
|
||||
lastLogs []LogEntry
|
||||
lastExceptions []Exception
|
||||
stepTime time.Time
|
||||
stepIndex int
|
||||
runStart time.Time
|
||||
|
||||
appPackage string
|
||||
@@ -259,6 +260,7 @@ func (v *Verifier) PushSnapshot(input SnapshotInput) error {
|
||||
v.lastLogs = input.Logs
|
||||
v.lastExceptions = input.Exceptions
|
||||
v.stepTime = input.StepTime
|
||||
v.stepIndex = input.StepIndex
|
||||
if v.runStart.IsZero() {
|
||||
v.runStart = input.RunStart
|
||||
}
|
||||
@@ -385,6 +387,11 @@ type SnapshotInput struct {
|
||||
Tree *hierarchy.Tree
|
||||
LastAction *Action
|
||||
StepTime time.Time
|
||||
// StepIndex is the runner's step number for this snapshot. Evaluators label
|
||||
// observations with it so violation witnesses carry runner step numbers even
|
||||
// when transitional steps were skipped. Zero means unlabeled; evaluators
|
||||
// then fall back to their internal counter.
|
||||
StepIndex int
|
||||
RunStart time.Time
|
||||
Logs []LogEntry
|
||||
Exceptions []Exception
|
||||
@@ -404,7 +411,11 @@ func (v *Verifier) EvaluateProperties() map[string]ltl.Verdict {
|
||||
stepTime = time.Now()
|
||||
}
|
||||
for name, evaluator := range v.evaluators {
|
||||
verdicts[name] = evaluator.ObserveAt(stepTime)
|
||||
if v.stepIndex > 0 {
|
||||
verdicts[name] = evaluator.ObserveAtStep(stepTime, v.stepIndex)
|
||||
} else {
|
||||
verdicts[name] = evaluator.ObserveAt(stepTime)
|
||||
}
|
||||
}
|
||||
|
||||
var onset []string
|
||||
|
||||
Reference in new issue
Block a user