fix(audit): expose verified visit exports and export-only recovery
This commit is contained in:
@@ -68,7 +68,7 @@ func TestRuntimeSessionExportRepairPreservesOriginalAndUsesRecordedOwner(t *test
|
||||
t.Fatalf("repair changed run outcome: %+v", repaired)
|
||||
}
|
||||
latest := repaired.Steps[0].SessionExportRepairs[1]
|
||||
if latest.Status != "complete" || latest.Messages != 2 || latest.SessionID != owner.ID || latest.Backend != owner.Backend || !strings.HasPrefix(latest.HTML, "public/session-repair-1-") {
|
||||
if latest.Status != "complete" || latest.Messages != 2 || latest.SessionID != owner.ID || latest.Backend != owner.Backend || !strings.HasPrefix(latest.HTML, "session-repair-1-") {
|
||||
t.Fatalf("repair not recorded: %+v", latest)
|
||||
}
|
||||
after, _ := json.Marshal(repaired.Steps[0].SessionExport)
|
||||
@@ -79,7 +79,7 @@ func TestRuntimeSessionExportRepairPreservesOriginalAndUsesRecordedOwner(t *test
|
||||
if string(body) != "historical evidence" {
|
||||
t.Fatal("historical export overwritten")
|
||||
}
|
||||
body, err = os.ReadFile(filepath.Join(h.runner.artifactsRoot, "1", latest.HTML))
|
||||
body, err = os.ReadFile(filepath.Join(h.runner.artifactsRoot, "1", "stages", "01-"+repaired.Steps[0].Stage, latest.HTML))
|
||||
if err != nil || len(body) == 0 {
|
||||
t.Fatalf("repair file missing: %v", err)
|
||||
}
|
||||
@@ -141,7 +141,7 @@ func TestCLIRepairSessionExportUsesRuntimeProtocol(t *testing.T) {
|
||||
SessionID string `json:"session_id"`
|
||||
HTML string `json:"html"`
|
||||
}
|
||||
if err := json.Unmarshal(out.Bytes(), &evidence); err != nil || evidence.Status != "complete" || evidence.SessionID != "ses_run" || !strings.HasPrefix(evidence.HTML, "public/session-repair-1-") {
|
||||
if err := json.Unmarshal(out.Bytes(), &evidence); err != nil || evidence.Status != "complete" || evidence.SessionID != "ses_run" || !strings.HasPrefix(evidence.HTML, "session-repair-1-") {
|
||||
t.Fatalf("wrong repair reply: %+v %v %s", evidence, err, out.String())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user