fix: harden run persistence and error surfacing from code review
Snapshot store paths under lock before async runs, roll back failed start/save state, emit UI events only after successful persistence, surface log write failures, and sync stale YAML docs to JSON. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+1
-1
@@ -51,7 +51,7 @@ type Service struct {
|
||||
// processes. ctx is the lifecycle context passed to runs; Start replaces it
|
||||
// with a cancelable context so Stop can abort in-flight runs, and until Start
|
||||
// it is context.Background().
|
||||
runJob func(ctx context.Context, job *domain.Job, trigger string, logsDir string) domain.RunRecord
|
||||
runJob func(ctx context.Context, job *domain.Job, trigger string, logsDir string) (domain.RunRecord, error)
|
||||
ctx context.Context
|
||||
|
||||
// sched is the timing loop installed by Start; cancel tears down ctx on Stop.
|
||||
|
||||
Reference in New Issue
Block a user