{"record":{"id":"b91b2d9882d1736b","repo":"JuliusBrussee/caveman","slug":"cachebench-replay-schedule-interrupted-w","errorCode":null,"errorMessage":"cachebench: replay schedule interrupted: %w","messagePattern":"cachebench: replay schedule interrupted: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cacheengine/cachebench/replay.go","lineNumber":565,"sourceCode":"\t\t}\n\t}\n\tfor provider := range providers {\n\t\tif eligible[provider] < target.MinEligibleRequest {\n\t\t\treturn fmt.Errorf(\"cachebench: provider %q engine-eligible population %d cannot meet minimum %d\", provider, eligible[provider], target.MinEligibleRequest)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (runner ReplayRunner) runSequential(ctx context.Context, prepared []preparedReplay, anchorTrace, anchorReal time.Time, now func() time.Time, sleep func(context.Context, time.Duration) error, emit func(ReplayResult) error) error {\n\tfor _, item := range prepared {\n\t\trecord := item.record\n\t\ttraceAt, _ := time.Parse(time.RFC3339Nano, record.At)\n\t\toffset, _ := scaledReplayGap(traceAt.Sub(anchorTrace), runner.TimeScale)\n\t\tscheduled := anchorReal.Add(offset)\n\t\tif delay := scheduled.Sub(now().UTC()); delay > 0 {\n\t\t\tif err := sleep(ctx, delay); err != nil {\n\t\t\t\treturn fmt.Errorf(\"cachebench: replay schedule interrupted: %w\", err)\n\t\t\t}\n\t\t}\n\t\tstarted := now().UTC()\n\t\tevidence := replayEvidenceBase(record, item.optimized, runner.TimeScale, scheduled, started, runner.Limits.MaxScheduleDrift)\n\t\tif runner.Limits.RequireGroundedTiming && evidence.ScheduleDriftMilliseconds > evidence.ScheduleToleranceMilliseconds {\n\t\t\tevidence.FailureCode = \"schedule_drift\"\n\t\t\tevidence.CompletedAt = now().UTC().Format(time.RFC3339Nano)\n\t\t\tif err := emitValidatedReplayResult(emit, ReplayResult{Evidence: evidence}); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\treturn &ReplayRunError{\n\t\t\t\tRequestID: record.RequestID, FailureCode: evidence.FailureCode,\n\t\t\t\tErr: fmt.Errorf(\"cachebench: request %q exceeded schedule drift tolerance\", record.RequestID),\n\t\t\t}\n\t\t}\n\t\tresult, runErr := runner.executePrepared(ctx, item, evidence, started, now)\n\t\tif err := emitValidatedReplayResult(emit, result); err != nil {\n\t\t\treturn err","sourceCodeStart":547,"sourceCodeEnd":583,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/cacheengine/cachebench/replay.go#L547-L583","documentation":"runSequential (or the concurrent scheduler) aborted because the context was cancelled while sleeping to honor the trace's absolute-time schedule. The wrapped context error indicates the replay was interrupted mid-schedule.","triggerScenarios":"Thrown at cacheengine/cachebench/replay.go:565 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Extend the run deadline to cover the full replay schedule","Increase TimeScale to compress waits if the deadline is fixed"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"766dce6b1394ebb56a3090748d5a0240a5aefb36","analyzedAt":"2026-08-18T03:14:35.516Z","contentChangedAt":"2026-08-18T03:14:35.516Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}