{"record":{"id":"aabf69dfdf0aa2ca","repo":"micro/go-micro","slug":"flow-s-has-no-checkpoint-configured","errorCode":null,"errorMessage":"flow %s has no checkpoint configured","messagePattern":"flow (.+?) has no checkpoint configured","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"flow/steps.go","lineNumber":422,"sourceCode":"\t\tStarted:  time.Now(),\n\t}\n\tfor _, s := range f.opts.Steps {\n\t\trun.Steps = append(run.Steps, StepRecord{Name: s.Name, Status: \"pending\"})\n\t}\n\treturn f.runFrom(ctx, run)\n}\n\n// Resume continues a persisted run by id, picking up at the step it\n// stopped on. Completed runs are a no-op.\nfunc (f *Flow) Resume(ctx context.Context, runID string) error {\n\tctx, cancel := f.withTimeout(ctx)\n\tdefer cancel()\n\n\tif err := validateSteps(f.opts.Steps); err != nil {\n\t\treturn err\n\t}\n\tif f.checkpoint == nil {\n\t\treturn fmt.Errorf(\"flow %s has no checkpoint configured\", f.name)\n\t}\n\trun, ok, err := f.checkpoint.Load(ctx, runID)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif !ok {\n\t\treturn fmt.Errorf(\"run %s not found\", runID)\n\t}\n\tif run.Status == \"done\" {\n\t\treturn nil\n\t}\n\t_, err = f.runFrom(ctx, run)\n\treturn err\n}\n\n// ResumePending resumes every checkpointed run for this flow that has not\n// completed yet, in the same oldest-first order returned by Pending.\n//","sourceCodeStart":404,"sourceCodeEnd":440,"githubUrl":"https://github.com/micro/go-micro/blob/24529f140421a11a33b6999ab7944f2021cfd69c/flow/steps.go#L404-L440","documentation":"Resume restores a persisted run from the flow's checkpoint store. If the Flow was constructed without a Checkpoint option, f.checkpoint is nil and there is nowhere to load the run from, so Resume fails fast with this error. The library requires checkpointing to be configured before any resume operation.","triggerScenarios":"Calling flow.Resume(ctx, runID) (directly or via ResumePending) on a Flow instance created without flow.Checkpoint(...).","commonSituations":"A flow works fine for fresh starts (Start doesn't need a checkpoint), so the missing option goes unnoticed until a crash/restart and someone tries to resume; flows created in tests often omit the checkpoint option; ResumePending loops over saved runs but the target flow itself never had a checkpoint configured.","solutions":["Add the flow.Checkpoint(...) option when constructing the Flow, pointing it at a persistent store.","Verify the Flow instance used for Resume is the same one (or configured identically to the one) that started the run.","If checkpointing is intentionally disabled, remove the Resume/ResumePending call path instead of resuming."],"exampleFix":"// before\nf := flow.New(flow.Steps(step1, step2))\nerr := f.Resume(ctx, runID) // fails: no checkpoint\n\n// after\nf := flow.New(\n  flow.Steps(step1, step2),\n  flow.Checkpoint(mystore),\n)\nerr := f.Resume(ctx, runID)","handlingStrategy":"validation","validationCode":"if f.checkpoint == nil {\n    return errors.New(\"cannot resume: flow was created without flow.Checkpoint(...)\")\n}","typeGuard":null,"tryCatchPattern":"if err := f.Resume(ctx, runID); err != nil {\n    if strings.Contains(err.Error(), \"no checkpoint configured\") {\n        // rebuild flow with checkpoint option, then retry\n    }\n    return err\n}","preventionTips":["Make flow.Checkpoint a mandatory part of your flow factory function","Use a single constructor so every Flow instance has identical options","Add a startup check that Resume/ResumePending-capable flows have a checkpoint","Document that flows without checkpoints cannot be resumed"],"tags":["go","flow","checkpoint","configuration"],"backgroundTag":"missing-checkpoint-configuration","analyzedSha":"24529f140421a11a33b6999ab7944f2021cfd69c","analyzedAt":"2026-09-01T02:52:24.923Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}