feat(02-02): record manifest route cases and report coverage

Drive ordered route cases through RecordFlow, resume in batches of
15, and print recorded/passing/failing/unrecorded coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jakub Zych
2026-09-17 12:36:48 +02:00
parent aa165fe3d0
commit 24c1f43e84
7 changed files with 1147 additions and 18 deletions

View File

@@ -31,6 +31,10 @@ func ReplayFlow(ctx context.Context, flow Flow, cfg ReplayConfig) (Result, error
continue
}
sr := StepResult{ID: step.ID, OK: true}
want := step
if err := materializeSidecar(cfg.BaseDir, &want.Response); err != nil {
return result, fmt.Errorf("tide: replay step %s: %w", step.ID, err)
}
req, err := expandRequest(step.Request, store)
if err != nil {
sr.OK = false
@@ -56,7 +60,7 @@ func ReplayFlow(ctx context.Context, flow Flow, cfg ReplayConfig) (Result, error
continue
}
_ = ScrubStep(store, &live)
sr.Diffs = append(sr.Diffs, compareStep(step, live.Response)...)
sr.Diffs = append(sr.Diffs, compareStep(want, live.Response)...)
if len(sr.Diffs) > 0 {
sr.OK = false
result.OK = false