agents-relay 1.0.177 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/adapters.js +26 -2
- package/dist/blockers.js +60 -65
- package/dist/cli-support.js +33 -1
- package/dist/cli.js +72 -86
- package/dist/dashboard-actions.js +13 -35
- package/dist/dashboard-html.js +1 -1
- package/dist/dashboard.js +39 -0
- package/dist/execution-recovery.js +37 -0
- package/dist/graph-runtime.js +1 -0
- package/dist/job-actions.js +53 -0
- package/dist/manual-plan.js +15 -17
- package/dist/planner-runtime.js +135 -0
- package/dist/planner.js +76 -60
- package/dist/pool.js +54 -10
- package/dist/projected-store.js +314 -0
- package/dist/reconciler-review.js +185 -110
- package/dist/reconciler-runtime.js +67 -7
- package/dist/reconciler.js +134 -282
- package/dist/relay-store.js +380 -0
- package/dist/relayd.js +122 -29
- package/dist/runtime-status.js +2 -1
- package/dist/scheduled-jobs.js +40 -31
- package/dist/scheduler.js +19 -18
- package/dist/store.js +1 -1
- package/dist/task-actions.js +139 -0
- package/dist/troubleshooter.js +14 -8
- package/dist/types.js +3 -3
- package/dist/unblock.js +31 -21
- package/dist/workflow/authoritative-unblock-v2.js +20 -0
- package/dist/workflow/blocker-resolution-v2.js +33 -0
- package/dist/workflow/contracts.js +21 -0
- package/dist/workflow/definitions-v2.js +75 -0
- package/dist/workflow/dispatcher.js +56 -0
- package/dist/workflow/entity-creation.js +32 -0
- package/dist/workflow/graph-v2.js +391 -0
- package/dist/workflow/job-reconcile-v2.js +19 -0
- package/dist/workflow/lifecycle.js +82 -4
- package/dist/workflow/planner-orchestration-v2.js +58 -0
- package/dist/workflow/planner-trigger-v2.js +24 -0
- package/dist/workflow/review-v2.js +42 -0
- package/dist/workflow/runtime.js +15 -1
- package/dist/workflow/schedule-cycle-v2.js +25 -0
- package/dist/workflow/scheduled-run-v2.js +30 -0
- package/dist/workflow/task-action-policy.js +19 -0
- package/dist/workflow/task-reconcile.js +6 -6
- package/dist/workflow/task-related-action-v2.js +42 -0
- package/dist/workflow/troubleshooter-v2.js +29 -0
- package/dist/workspace.js +6 -1
- package/package.json +1 -1
- package/skills/agents-relay/agents/planner.agent.md +5 -5
- package/skills/agents-relay/contracts/task-job-contract.md +2 -51
- package/workflow/authoritative-unblock-v2.mmd +15 -0
- package/workflow/blocker-resolution-v2.mmd +73 -0
- package/workflow/job-lifecycle-v2.mmd +70 -0
- package/workflow/job-lifecycle.mmd +2 -2
- package/workflow/planner-orchestration-v2.mmd +65 -0
- package/workflow/planner-trigger-v2.mmd +32 -0
- package/workflow/review-lifecycle-v2.mmd +124 -0
- package/workflow/schedule-cycle-v2.mmd +19 -0
- package/workflow/scheduled-run-v2.mmd +55 -0
- package/workflow/task-lifecycle-v2.mmd +201 -0
- package/workflow/task-lifecycle.mmd +3 -0
- package/workflow/task-related-action-v2.mmd +28 -0
- package/workflow/troubleshooter-v2.mmd +43 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
flowchart LR
|
|
2
|
+
%% relay: initial idle
|
|
3
|
+
idle["state: idle"]
|
|
4
|
+
checkLegacy["state: check_legacy_pending"]
|
|
5
|
+
checkRecover["state: check_recover"]
|
|
6
|
+
checkSeed["state: check_seed"]
|
|
7
|
+
checkPlanner["state: check_planner"]
|
|
8
|
+
checkBlocked["state: check_blocked"]
|
|
9
|
+
checkWork["state: check_work"]
|
|
10
|
+
checkMaterialized["state: check_materialized"]
|
|
11
|
+
checkObjective["state: check_objective"]
|
|
12
|
+
wait["state: wait"]
|
|
13
|
+
recovered["state: recovered"]
|
|
14
|
+
created["state: created"]
|
|
15
|
+
|
|
16
|
+
autonomous["guard: autonomousJob"]
|
|
17
|
+
legacyPending["guard: legacyPlanningPending"]
|
|
18
|
+
recoverablePending["guard: recoverablePendingPlan"]
|
|
19
|
+
hasSeed["guard: hasSeedWork"]
|
|
20
|
+
noActivePlanner["guard: noActivePlanner"]
|
|
21
|
+
noBlocked["guard: noBlockedWork"]
|
|
22
|
+
noActiveWork["guard: noActiveImplementation"]
|
|
23
|
+
materialized["guard: continuationMaterialized"]
|
|
24
|
+
unsatisfied["guard: objectiveUnsatisfied"]
|
|
25
|
+
|
|
26
|
+
recoverAction["action: planner.recoverPending"]
|
|
27
|
+
createAction["action: planner.createRound"]
|
|
28
|
+
|
|
29
|
+
idle -->|on: planner.reconcile| autonomous
|
|
30
|
+
autonomous -->|false| wait
|
|
31
|
+
autonomous -->|true| checkLegacy
|
|
32
|
+
|
|
33
|
+
checkLegacy -->|on: planner.reconcile| legacyPending
|
|
34
|
+
legacyPending -->|true| wait
|
|
35
|
+
legacyPending -->|false| checkRecover
|
|
36
|
+
|
|
37
|
+
checkRecover -->|on: planner.reconcile| recoverablePending
|
|
38
|
+
recoverablePending -->|true| recoverAction
|
|
39
|
+
recoverAction --> recovered
|
|
40
|
+
recoverablePending -->|false| checkSeed
|
|
41
|
+
|
|
42
|
+
checkSeed -->|on: planner.reconcile| hasSeed
|
|
43
|
+
hasSeed -->|false| wait
|
|
44
|
+
hasSeed -->|true| checkPlanner
|
|
45
|
+
|
|
46
|
+
checkPlanner -->|on: planner.reconcile| noActivePlanner
|
|
47
|
+
noActivePlanner -->|false| wait
|
|
48
|
+
noActivePlanner -->|true| checkBlocked
|
|
49
|
+
|
|
50
|
+
checkBlocked -->|on: planner.reconcile| noBlocked
|
|
51
|
+
noBlocked -->|false| wait
|
|
52
|
+
noBlocked -->|true| checkWork
|
|
53
|
+
|
|
54
|
+
checkWork -->|on: planner.reconcile| noActiveWork
|
|
55
|
+
noActiveWork -->|false| wait
|
|
56
|
+
noActiveWork -->|true| checkMaterialized
|
|
57
|
+
|
|
58
|
+
checkMaterialized -->|on: planner.reconcile| materialized
|
|
59
|
+
materialized -->|false| wait
|
|
60
|
+
materialized -->|true| checkObjective
|
|
61
|
+
|
|
62
|
+
checkObjective -->|on: planner.reconcile| unsatisfied
|
|
63
|
+
unsatisfied -->|false| wait
|
|
64
|
+
unsatisfied -->|true| createAction
|
|
65
|
+
createAction --> created
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
flowchart LR
|
|
2
|
+
%% relay: initial idle
|
|
3
|
+
idle["state: idle"]
|
|
4
|
+
checkUnblock["state: check_unblock"]
|
|
5
|
+
checkSchedule["state: check_schedule"]
|
|
6
|
+
checkInitial["state: check_initial"]
|
|
7
|
+
manual["state: manual"]
|
|
8
|
+
unblock["state: unblock"]
|
|
9
|
+
schedule["state: schedule"]
|
|
10
|
+
initial["state: initial"]
|
|
11
|
+
continuation["state: continuation"]
|
|
12
|
+
|
|
13
|
+
manualGuard["guard: manualPlan"]
|
|
14
|
+
unblockGuard["guard: hasUnblock"]
|
|
15
|
+
scheduleGuard["guard: scheduledRun"]
|
|
16
|
+
initialGuard["guard: initialPlan"]
|
|
17
|
+
|
|
18
|
+
idle -->|on: plan.requested| manualGuard
|
|
19
|
+
manualGuard -->|true| manual
|
|
20
|
+
manualGuard -->|false| checkUnblock
|
|
21
|
+
|
|
22
|
+
checkUnblock -->|on: plan.requested| unblockGuard
|
|
23
|
+
unblockGuard -->|true| unblock
|
|
24
|
+
unblockGuard -->|false| checkSchedule
|
|
25
|
+
|
|
26
|
+
checkSchedule -->|on: plan.requested| scheduleGuard
|
|
27
|
+
scheduleGuard -->|true| schedule
|
|
28
|
+
scheduleGuard -->|false| checkInitial
|
|
29
|
+
|
|
30
|
+
checkInitial -->|on: plan.requested| initialGuard
|
|
31
|
+
initialGuard -->|true| initial
|
|
32
|
+
initialGuard -->|false| continuation
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
flowchart LR
|
|
2
|
+
%% relay: initial none
|
|
3
|
+
none["state: NONE"]
|
|
4
|
+
pending["state: PENDING"]
|
|
5
|
+
started["state: STARTED"]
|
|
6
|
+
approved["state: APPROVED"]
|
|
7
|
+
changes["state: CHANGES_REQUIRED"]
|
|
8
|
+
blocked["state: BLOCKED"]
|
|
9
|
+
stale["state: STALE"]
|
|
10
|
+
|
|
11
|
+
unscheduledNone["guard: unscheduled"]
|
|
12
|
+
reviewEnabledNone["guard: reviewEnabled"]
|
|
13
|
+
prOpenNone["guard: prOpen"]
|
|
14
|
+
jobActiveNone["guard: jobActive"]
|
|
15
|
+
implementationCompleteNone["guard: implementationComplete"]
|
|
16
|
+
headAvailableNone["guard: headAvailable"]
|
|
17
|
+
completionGateNone["guard: completionGateSatisfied"]
|
|
18
|
+
noActiveReviewNone["guard: noActiveReviewTask"]
|
|
19
|
+
noApprovedReviewNone["guard: noApprovedCurrentReview"]
|
|
20
|
+
unscheduledStale["guard: unscheduled"]
|
|
21
|
+
reviewEnabledStale["guard: reviewEnabled"]
|
|
22
|
+
prOpenStale["guard: prOpen"]
|
|
23
|
+
jobActiveStale["guard: jobActive"]
|
|
24
|
+
implementationCompleteStale["guard: implementationComplete"]
|
|
25
|
+
headAvailableStale["guard: headAvailable"]
|
|
26
|
+
completionGateStale["guard: completionGateSatisfied"]
|
|
27
|
+
noActiveReviewStale["guard: noActiveReviewTask"]
|
|
28
|
+
noApprovedReviewStale["guard: noApprovedCurrentReview"]
|
|
29
|
+
pendingRetry["guard: noActiveReviewTask"]
|
|
30
|
+
pendingCancelled["guard: currentReviewCancelled"]
|
|
31
|
+
pendingUnapproved["guard: noApprovedCurrentReview"]
|
|
32
|
+
createPendingRetry["action: review.create"]
|
|
33
|
+
autoMergePending["guard: autoMerge"]
|
|
34
|
+
autoMergeStarted["guard: autoMerge"]
|
|
35
|
+
createNone["action: review.create"]
|
|
36
|
+
createStale["action: review.create"]
|
|
37
|
+
cancelPending["action: review.cancelStale"]
|
|
38
|
+
cancelStarted["action: review.cancelStale"]
|
|
39
|
+
cancelApproved["action: review.cancelStale"]
|
|
40
|
+
cancelChanges["action: review.cancelStale"]
|
|
41
|
+
cancelBlocked["action: review.cancelStale"]
|
|
42
|
+
fixPending["action: review.createFix"]
|
|
43
|
+
fixStarted["action: review.createFix"]
|
|
44
|
+
mergePending["action: review.requestMerge"]
|
|
45
|
+
mergeStarted["action: review.requestMerge"]
|
|
46
|
+
|
|
47
|
+
none -->|on: reconcile| unscheduledNone
|
|
48
|
+
unscheduledNone -->|true| reviewEnabledNone
|
|
49
|
+
unscheduledNone -->|false| none
|
|
50
|
+
reviewEnabledNone -->|true| prOpenNone
|
|
51
|
+
reviewEnabledNone -->|false| none
|
|
52
|
+
prOpenNone -->|true| jobActiveNone
|
|
53
|
+
prOpenNone -->|false| none
|
|
54
|
+
jobActiveNone -->|true| implementationCompleteNone
|
|
55
|
+
jobActiveNone -->|false| none
|
|
56
|
+
implementationCompleteNone -->|true| headAvailableNone
|
|
57
|
+
implementationCompleteNone -->|false| none
|
|
58
|
+
headAvailableNone -->|true| completionGateNone
|
|
59
|
+
headAvailableNone -->|false| none
|
|
60
|
+
completionGateNone -->|true| noActiveReviewNone
|
|
61
|
+
completionGateNone -->|false| none
|
|
62
|
+
noActiveReviewNone -->|true| noApprovedReviewNone
|
|
63
|
+
noActiveReviewNone -->|false| none
|
|
64
|
+
noApprovedReviewNone -->|true| createNone
|
|
65
|
+
noApprovedReviewNone -->|false| none
|
|
66
|
+
createNone --> pending
|
|
67
|
+
|
|
68
|
+
stale -->|on: reconcile| unscheduledStale
|
|
69
|
+
unscheduledStale -->|true| reviewEnabledStale
|
|
70
|
+
unscheduledStale -->|false| stale
|
|
71
|
+
reviewEnabledStale -->|true| prOpenStale
|
|
72
|
+
reviewEnabledStale -->|false| stale
|
|
73
|
+
prOpenStale -->|true| jobActiveStale
|
|
74
|
+
prOpenStale -->|false| stale
|
|
75
|
+
jobActiveStale -->|true| implementationCompleteStale
|
|
76
|
+
jobActiveStale -->|false| stale
|
|
77
|
+
implementationCompleteStale -->|true| headAvailableStale
|
|
78
|
+
implementationCompleteStale -->|false| stale
|
|
79
|
+
headAvailableStale -->|true| completionGateStale
|
|
80
|
+
headAvailableStale -->|false| stale
|
|
81
|
+
completionGateStale -->|true| noActiveReviewStale
|
|
82
|
+
completionGateStale -->|false| stale
|
|
83
|
+
noActiveReviewStale -->|true| noApprovedReviewStale
|
|
84
|
+
noActiveReviewStale -->|false| stale
|
|
85
|
+
noApprovedReviewStale -->|true| createStale
|
|
86
|
+
noApprovedReviewStale -->|false| stale
|
|
87
|
+
createStale --> pending
|
|
88
|
+
|
|
89
|
+
pending -->|on: reconcile| pendingRetry
|
|
90
|
+
pendingRetry -->|true| pendingCancelled
|
|
91
|
+
pendingRetry -->|false| pending
|
|
92
|
+
pendingCancelled -->|true| pendingUnapproved
|
|
93
|
+
pendingCancelled -->|false| pending
|
|
94
|
+
pendingUnapproved -->|true| createPendingRetry
|
|
95
|
+
pendingUnapproved -->|false| pending
|
|
96
|
+
createPendingRetry --> pending
|
|
97
|
+
|
|
98
|
+
pending -->|on: review.started| started
|
|
99
|
+
pending -->|on: review.approved| autoMergePending
|
|
100
|
+
autoMergePending -->|true| mergePending
|
|
101
|
+
mergePending --> approved
|
|
102
|
+
autoMergePending -->|false| approved
|
|
103
|
+
pending -->|on: review.changes_required| fixPending
|
|
104
|
+
fixPending --> changes
|
|
105
|
+
pending -->|on: review.blocked| blocked
|
|
106
|
+
|
|
107
|
+
started -->|on: review.approved| autoMergeStarted
|
|
108
|
+
autoMergeStarted -->|true| mergeStarted
|
|
109
|
+
mergeStarted --> approved
|
|
110
|
+
autoMergeStarted -->|false| approved
|
|
111
|
+
started -->|on: review.changes_required| fixStarted
|
|
112
|
+
fixStarted --> changes
|
|
113
|
+
started -->|on: review.blocked| blocked
|
|
114
|
+
|
|
115
|
+
pending -->|on: head.changed| cancelPending
|
|
116
|
+
cancelPending --> stale
|
|
117
|
+
started -->|on: head.changed| cancelStarted
|
|
118
|
+
cancelStarted --> stale
|
|
119
|
+
approved -->|on: head.changed| cancelApproved
|
|
120
|
+
cancelApproved --> stale
|
|
121
|
+
changes -->|on: head.changed| cancelChanges
|
|
122
|
+
cancelChanges --> stale
|
|
123
|
+
blocked -->|on: head.changed| cancelBlocked
|
|
124
|
+
cancelBlocked --> stale
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
flowchart LR
|
|
2
|
+
%% relay: initial idle
|
|
3
|
+
idle["state: idle"]
|
|
4
|
+
checkSatisfied["state: check_satisfied"]
|
|
5
|
+
waiting["state: waiting"]
|
|
6
|
+
finished["state: finished"]
|
|
7
|
+
|
|
8
|
+
hasSlot["guard: hasCurrentSlot"]
|
|
9
|
+
satisfied["guard: plannerSatisfied"]
|
|
10
|
+
finish["action: schedule.finishSlot"]
|
|
11
|
+
|
|
12
|
+
idle -->|on: schedule.reconcile| hasSlot
|
|
13
|
+
hasSlot -->|false| waiting
|
|
14
|
+
hasSlot -->|true| checkSatisfied
|
|
15
|
+
|
|
16
|
+
checkSatisfied -->|on: schedule.reconcile| satisfied
|
|
17
|
+
satisfied -->|false| waiting
|
|
18
|
+
satisfied -->|true| finish
|
|
19
|
+
finish --> finished
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
flowchart LR
|
|
2
|
+
%% relay: initial idle
|
|
3
|
+
idle["state: idle"]
|
|
4
|
+
checkUnclaimed["state: check_unclaimed"]
|
|
5
|
+
checkJob["state: check_job"]
|
|
6
|
+
checkActive["state: check_active"]
|
|
7
|
+
checkConcurrency["state: check_concurrency"]
|
|
8
|
+
checkQueue["state: check_queue"]
|
|
9
|
+
checkMissed["state: check_missed"]
|
|
10
|
+
skipIdempotent["state: skip_idempotent"]
|
|
11
|
+
skipActive["state: skip_active"]
|
|
12
|
+
claimed["state: claimed"]
|
|
13
|
+
|
|
14
|
+
slotDue["guard: slotDue"]
|
|
15
|
+
slotUnclaimed["guard: slotUnclaimed"]
|
|
16
|
+
jobActive["guard: jobActive"]
|
|
17
|
+
hasActiveTasks["guard: hasActiveTasks"]
|
|
18
|
+
concurrencySkip["guard: concurrencySkip"]
|
|
19
|
+
concurrencyQueue["guard: concurrencyQueue"]
|
|
20
|
+
runMissed["guard: runMissed"]
|
|
21
|
+
|
|
22
|
+
skipAdvance["action: schedule.skipActiveAdvance"]
|
|
23
|
+
claimFromSlot["action: schedule.claimFromSlot"]
|
|
24
|
+
claimFromNow["action: schedule.claimFromNow"]
|
|
25
|
+
|
|
26
|
+
idle -->|on: schedule.tick| slotDue
|
|
27
|
+
slotDue -->|false| skipIdempotent
|
|
28
|
+
slotDue -->|true| checkUnclaimed
|
|
29
|
+
|
|
30
|
+
checkUnclaimed -->|on: schedule.tick| slotUnclaimed
|
|
31
|
+
slotUnclaimed -->|false| skipIdempotent
|
|
32
|
+
slotUnclaimed -->|true| checkJob
|
|
33
|
+
|
|
34
|
+
checkJob -->|on: schedule.tick| jobActive
|
|
35
|
+
jobActive -->|false| skipIdempotent
|
|
36
|
+
jobActive -->|true| checkActive
|
|
37
|
+
|
|
38
|
+
checkActive -->|on: schedule.tick| hasActiveTasks
|
|
39
|
+
hasActiveTasks -->|false| checkMissed
|
|
40
|
+
hasActiveTasks -->|true| checkConcurrency
|
|
41
|
+
|
|
42
|
+
checkConcurrency -->|on: schedule.tick| concurrencySkip
|
|
43
|
+
concurrencySkip -->|true| skipAdvance
|
|
44
|
+
skipAdvance --> skipActive
|
|
45
|
+
concurrencySkip -->|false| checkQueue
|
|
46
|
+
|
|
47
|
+
checkQueue -->|on: schedule.tick| concurrencyQueue
|
|
48
|
+
concurrencyQueue -->|true| skipActive
|
|
49
|
+
concurrencyQueue -->|false| checkMissed
|
|
50
|
+
|
|
51
|
+
checkMissed -->|on: schedule.tick| runMissed
|
|
52
|
+
runMissed -->|true| claimFromSlot
|
|
53
|
+
claimFromSlot --> claimed
|
|
54
|
+
runMissed -->|false| claimFromNow
|
|
55
|
+
claimFromNow --> claimed
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
flowchart LR
|
|
2
|
+
%% relay: initial draft
|
|
3
|
+
draft["state: DRAFT"]
|
|
4
|
+
queued["state: QUEUED"]
|
|
5
|
+
running["state: RUNNING"]
|
|
6
|
+
blocked["state: BLOCKED"]
|
|
7
|
+
unblocked["state: UNBLOCKED"]
|
|
8
|
+
succeeded["state: SUCCEEDED"]
|
|
9
|
+
failed["state: FAILED"]
|
|
10
|
+
cancelled["state: CANCELLED"]
|
|
11
|
+
|
|
12
|
+
depSat["guard: dependenciesSatisfied"]
|
|
13
|
+
depUnsat["guard: dependenciesUnsatisfied"]
|
|
14
|
+
runnable["guard: runnable"]
|
|
15
|
+
dispatchable["guard: dispatchable"]
|
|
16
|
+
recoverStart["guard: recoverableExecution"]
|
|
17
|
+
recoverComplete["guard: recoverableExecution"]
|
|
18
|
+
recoverBlocked["guard: recoverableExecution"]
|
|
19
|
+
recoverFailed["guard: recoverableExecution"]
|
|
20
|
+
recoverCancelled["guard: recoverableExecution"]
|
|
21
|
+
|
|
22
|
+
retryAvailableRunning["guard: retryAvailable"]
|
|
23
|
+
plannerRetryAvailable["guard: retryAvailable"]
|
|
24
|
+
plannerUnavailableMark["action: mutation.markPlannerUnavailable"]
|
|
25
|
+
orphanRetryAvailable["guard: retryAvailable"]
|
|
26
|
+
orphanRetryClearError["action: mutation.clearError"]
|
|
27
|
+
orphanRetryClearLease["action: mutation.clearLease"]
|
|
28
|
+
orphanRetryClearExecution["action: mutation.clearExecution"]
|
|
29
|
+
orphanFailMark["action: mutation.markStartupOrphanedExhausted"]
|
|
30
|
+
orphanFailClearLease["action: mutation.clearLease"]
|
|
31
|
+
orphanFailClearExecution["action: mutation.clearExecution"]
|
|
32
|
+
plannerRetryClearError["action: mutation.clearError"]
|
|
33
|
+
plannerRetryClearLease["action: mutation.clearLease"]
|
|
34
|
+
plannerRetryClearExecution["action: mutation.clearExecution"]
|
|
35
|
+
plannerFailClearLease["action: mutation.clearLease"]
|
|
36
|
+
plannerFailClearExecution["action: mutation.clearExecution"]
|
|
37
|
+
retryAvailableQueued["guard: retryAvailable"]
|
|
38
|
+
leaseRetryRunningClearError["action: mutation.clearError"]
|
|
39
|
+
leaseRetryRunningClearLease["action: mutation.clearLease"]
|
|
40
|
+
leaseRetryRunningClearExecution["action: mutation.clearExecution"]
|
|
41
|
+
leaseFailRunningMark["action: mutation.markLeaseExpired"]
|
|
42
|
+
leaseFailRunningClearLease["action: mutation.clearLease"]
|
|
43
|
+
leaseFailRunningClearExecution["action: mutation.clearExecution"]
|
|
44
|
+
leaseRetryQueuedClearError["action: mutation.clearError"]
|
|
45
|
+
leaseRetryQueuedClearLease["action: mutation.clearLease"]
|
|
46
|
+
leaseRetryQueuedClearExecution["action: mutation.clearExecution"]
|
|
47
|
+
leaseFailQueuedMark["action: mutation.markLeaseExpired"]
|
|
48
|
+
leaseFailQueuedClearLease["action: mutation.clearLease"]
|
|
49
|
+
leaseFailQueuedClearExecution["action: mutation.clearExecution"]
|
|
50
|
+
|
|
51
|
+
releaseClearError["action: mutation.clearError"]
|
|
52
|
+
releaseClearReason["action: mutation.clearFailureReason"]
|
|
53
|
+
reconcileDraftClearError["action: mutation.clearError"]
|
|
54
|
+
reconcileDraftClearReason["action: mutation.clearFailureReason"]
|
|
55
|
+
reconcileQueuedClearError["action: mutation.clearError"]
|
|
56
|
+
reconcileQueuedClearReason["action: mutation.clearFailureReason"]
|
|
57
|
+
dispatchLaunch["action: effect.launchTask"]
|
|
58
|
+
startClearError["action: mutation.clearError"]
|
|
59
|
+
startClearReason["action: mutation.clearFailureReason"]
|
|
60
|
+
reviewStartClearError["action: mutation.clearError"]
|
|
61
|
+
reviewStartClearReason["action: mutation.clearFailureReason"]
|
|
62
|
+
reviewApproveQueuedClearError["action: mutation.clearError"]
|
|
63
|
+
reviewApproveQueuedClearReason["action: mutation.clearFailureReason"]
|
|
64
|
+
reviewChangesQueuedClearError["action: mutation.clearError"]
|
|
65
|
+
reviewChangesQueuedClearReason["action: mutation.clearFailureReason"]
|
|
66
|
+
reviewApproveRunningClearError["action: mutation.clearError"]
|
|
67
|
+
reviewApproveRunningClearReason["action: mutation.clearFailureReason"]
|
|
68
|
+
reviewChangesRunningClearError["action: mutation.clearError"]
|
|
69
|
+
reviewChangesRunningClearReason["action: mutation.clearFailureReason"]
|
|
70
|
+
completeClearError["action: mutation.clearError"]
|
|
71
|
+
completeClearReason["action: mutation.clearFailureReason"]
|
|
72
|
+
unblockRetryClearError["action: mutation.clearError"]
|
|
73
|
+
unblockRetryClearReason["action: mutation.clearFailureReason"]
|
|
74
|
+
failedRetryClearError["action: mutation.clearError"]
|
|
75
|
+
failedRetryClearReason["action: mutation.clearFailureReason"]
|
|
76
|
+
recoverStartClearError["action: mutation.clearError"]
|
|
77
|
+
recoverStartClearReason["action: mutation.clearFailureReason"]
|
|
78
|
+
recoverCompleteClearError["action: mutation.clearError"]
|
|
79
|
+
recoverCompleteClearReason["action: mutation.clearFailureReason"]
|
|
80
|
+
|
|
81
|
+
draft -->|on: release| releaseClearError
|
|
82
|
+
releaseClearError --> releaseClearReason
|
|
83
|
+
releaseClearReason --> queued
|
|
84
|
+
draft -->|on: queue| depSat
|
|
85
|
+
draft -->|on: reconcile| depSat
|
|
86
|
+
depSat -->|true| reconcileDraftClearError
|
|
87
|
+
reconcileDraftClearError --> reconcileDraftClearReason
|
|
88
|
+
reconcileDraftClearReason --> queued
|
|
89
|
+
draft -->|on: block| blocked
|
|
90
|
+
draft -->|on: cancel| cancelled
|
|
91
|
+
|
|
92
|
+
queued -->|on: hold| draft
|
|
93
|
+
queued -->|on: reconcile| depUnsat
|
|
94
|
+
depUnsat -->|true| draft
|
|
95
|
+
queued -->|on: reconcile| runnable
|
|
96
|
+
runnable -->|true| reconcileQueuedClearError
|
|
97
|
+
reconcileQueuedClearError --> reconcileQueuedClearReason
|
|
98
|
+
reconcileQueuedClearReason --> queued
|
|
99
|
+
queued -->|on: dispatch| dispatchable
|
|
100
|
+
dispatchable -->|true| dispatchLaunch
|
|
101
|
+
dispatchLaunch --> queued
|
|
102
|
+
queued -->|on: task.started| startClearError
|
|
103
|
+
startClearError --> startClearReason
|
|
104
|
+
startClearReason --> running
|
|
105
|
+
queued -->|on: review.started| reviewStartClearError
|
|
106
|
+
reviewStartClearError --> reviewStartClearReason
|
|
107
|
+
reviewStartClearReason --> running
|
|
108
|
+
queued -->|on: review.approved| reviewApproveQueuedClearError
|
|
109
|
+
reviewApproveQueuedClearError --> reviewApproveQueuedClearReason
|
|
110
|
+
reviewApproveQueuedClearReason --> succeeded
|
|
111
|
+
queued -->|on: review.changes_required| reviewChangesQueuedClearError
|
|
112
|
+
reviewChangesQueuedClearError --> reviewChangesQueuedClearReason
|
|
113
|
+
reviewChangesQueuedClearReason --> succeeded
|
|
114
|
+
queued -->|on: review.blocked| blocked
|
|
115
|
+
queued -->|on: block| blocked
|
|
116
|
+
queued -->|on: fail| failed
|
|
117
|
+
queued -->|on: effect.launchTask.failed| failed
|
|
118
|
+
queued -->|on: watchdog.failed| failed
|
|
119
|
+
queued -->|on: worker.delivery_failed| failed
|
|
120
|
+
queued -->|on: worker.start_ack_failed| failed
|
|
121
|
+
queued -->|on: planner.unavailable| plannerUnavailableMark
|
|
122
|
+
plannerUnavailableMark --> failed
|
|
123
|
+
queued -->|on: lease.expired| retryAvailableQueued
|
|
124
|
+
retryAvailableQueued -->|true| leaseRetryQueuedClearError
|
|
125
|
+
leaseRetryQueuedClearError --> leaseRetryQueuedClearLease
|
|
126
|
+
leaseRetryQueuedClearLease --> leaseRetryQueuedClearExecution
|
|
127
|
+
leaseRetryQueuedClearExecution --> queued
|
|
128
|
+
retryAvailableQueued -->|false| leaseFailQueuedMark
|
|
129
|
+
leaseFailQueuedMark --> leaseFailQueuedClearLease
|
|
130
|
+
leaseFailQueuedClearLease --> leaseFailQueuedClearExecution
|
|
131
|
+
leaseFailQueuedClearExecution --> failed
|
|
132
|
+
queued -->|on: cancel| cancelled
|
|
133
|
+
|
|
134
|
+
running -->|on: task.blocked| blocked
|
|
135
|
+
running -->|on: review.approved| reviewApproveRunningClearError
|
|
136
|
+
reviewApproveRunningClearError --> reviewApproveRunningClearReason
|
|
137
|
+
reviewApproveRunningClearReason --> succeeded
|
|
138
|
+
running -->|on: review.changes_required| reviewChangesRunningClearError
|
|
139
|
+
reviewChangesRunningClearError --> reviewChangesRunningClearReason
|
|
140
|
+
reviewChangesRunningClearReason --> succeeded
|
|
141
|
+
running -->|on: review.blocked| blocked
|
|
142
|
+
running -->|on: task.completed| completeClearError
|
|
143
|
+
completeClearError --> completeClearReason
|
|
144
|
+
completeClearReason --> succeeded
|
|
145
|
+
running -->|on: task.failed| failed
|
|
146
|
+
running -->|on: watchdog.failed| failed
|
|
147
|
+
running -->|on: planner.failed| plannerRetryAvailable
|
|
148
|
+
running -->|on: execution.orphaned| orphanRetryAvailable
|
|
149
|
+
orphanRetryAvailable -->|true| orphanRetryClearError
|
|
150
|
+
orphanRetryClearError --> orphanRetryClearLease
|
|
151
|
+
orphanRetryClearLease --> orphanRetryClearExecution
|
|
152
|
+
orphanRetryClearExecution --> queued
|
|
153
|
+
orphanRetryAvailable -->|false| orphanFailMark
|
|
154
|
+
orphanFailMark --> orphanFailClearLease
|
|
155
|
+
orphanFailClearLease --> orphanFailClearExecution
|
|
156
|
+
orphanFailClearExecution --> failed
|
|
157
|
+
plannerRetryAvailable -->|true| plannerRetryClearError
|
|
158
|
+
plannerRetryClearError --> plannerRetryClearLease
|
|
159
|
+
plannerRetryClearLease --> plannerRetryClearExecution
|
|
160
|
+
plannerRetryClearExecution --> queued
|
|
161
|
+
plannerRetryAvailable -->|false| plannerFailClearLease
|
|
162
|
+
plannerFailClearLease --> plannerFailClearExecution
|
|
163
|
+
plannerFailClearExecution --> failed
|
|
164
|
+
running -->|on: lease.expired| retryAvailableRunning
|
|
165
|
+
retryAvailableRunning -->|true| leaseRetryRunningClearError
|
|
166
|
+
leaseRetryRunningClearError --> leaseRetryRunningClearLease
|
|
167
|
+
leaseRetryRunningClearLease --> leaseRetryRunningClearExecution
|
|
168
|
+
leaseRetryRunningClearExecution --> queued
|
|
169
|
+
retryAvailableRunning -->|false| leaseFailRunningMark
|
|
170
|
+
leaseFailRunningMark --> leaseFailRunningClearLease
|
|
171
|
+
leaseFailRunningClearLease --> leaseFailRunningClearExecution
|
|
172
|
+
leaseFailRunningClearExecution --> failed
|
|
173
|
+
running -->|on: task.cancelled| cancelled
|
|
174
|
+
running -->|on: cancel| cancelled
|
|
175
|
+
|
|
176
|
+
blocked -->|on: task.unblocked| unblocked
|
|
177
|
+
blocked -->|on: cancel| cancelled
|
|
178
|
+
|
|
179
|
+
unblocked -->|on: retry| unblockRetryClearError
|
|
180
|
+
unblockRetryClearError --> unblockRetryClearReason
|
|
181
|
+
unblockRetryClearReason --> queued
|
|
182
|
+
|
|
183
|
+
failed -->|on: queue| depSat
|
|
184
|
+
failed -->|on: retry| failedRetryClearError
|
|
185
|
+
failedRetryClearError --> failedRetryClearReason
|
|
186
|
+
failedRetryClearReason --> queued
|
|
187
|
+
failed -->|on: task.started| recoverStart
|
|
188
|
+
recoverStart -->|true| recoverStartClearError
|
|
189
|
+
recoverStartClearError --> recoverStartClearReason
|
|
190
|
+
recoverStartClearReason --> running
|
|
191
|
+
failed -->|on: task.completed| recoverComplete
|
|
192
|
+
recoverComplete -->|true| recoverCompleteClearError
|
|
193
|
+
recoverCompleteClearError --> recoverCompleteClearReason
|
|
194
|
+
recoverCompleteClearReason --> succeeded
|
|
195
|
+
failed -->|on: task.blocked| recoverBlocked
|
|
196
|
+
recoverBlocked -->|true| blocked
|
|
197
|
+
failed -->|on: task.failed| recoverFailed
|
|
198
|
+
recoverFailed -->|true| failed
|
|
199
|
+
failed -->|on: task.cancelled| recoverCancelled
|
|
200
|
+
recoverCancelled -->|true| cancelled
|
|
201
|
+
failed -->|on: cancel| cancelled
|
|
@@ -2,6 +2,7 @@ stateDiagram-v2
|
|
|
2
2
|
[*] --> DRAFT
|
|
3
3
|
|
|
4
4
|
DRAFT --> QUEUED: release / mutation.clearError,mutation.clearFailureReason
|
|
5
|
+
DRAFT --> QUEUED: queue [dependenciesSatisfied] / mutation.clearError,mutation.clearFailureReason
|
|
5
6
|
DRAFT --> QUEUED: reconcile [dependenciesSatisfied] / mutation.clearError,mutation.clearFailureReason
|
|
6
7
|
DRAFT --> BLOCKED: block
|
|
7
8
|
DRAFT --> CANCELLED: cancel
|
|
@@ -31,12 +32,14 @@ stateDiagram-v2
|
|
|
31
32
|
RUNNING --> FAILED: task.failed
|
|
32
33
|
RUNNING --> FAILED: watchdog.failed
|
|
33
34
|
RUNNING --> CANCELLED: task.cancelled
|
|
35
|
+
RUNNING --> CANCELLED: cancel
|
|
34
36
|
|
|
35
37
|
BLOCKED --> UNBLOCKED: task.unblocked
|
|
36
38
|
BLOCKED --> CANCELLED: cancel
|
|
37
39
|
|
|
38
40
|
UNBLOCKED --> QUEUED: retry / mutation.clearError,mutation.clearFailureReason
|
|
39
41
|
|
|
42
|
+
FAILED --> QUEUED: queue [dependenciesSatisfied] / mutation.clearError,mutation.clearFailureReason
|
|
40
43
|
FAILED --> QUEUED: retry / mutation.clearError,mutation.clearFailureReason
|
|
41
44
|
FAILED --> RUNNING: task.started [recoverableExecution] / mutation.clearError,mutation.clearFailureReason
|
|
42
45
|
FAILED --> SUCCEEDED: task.completed [recoverableExecution] / mutation.clearError,mutation.clearFailureReason
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
flowchart LR
|
|
2
|
+
%% relay: initial evaluate
|
|
3
|
+
evaluate["state: evaluate"]
|
|
4
|
+
checkOther["state: check_other"]
|
|
5
|
+
checkRecovery["state: check_recovery"]
|
|
6
|
+
skip["state: skip"]
|
|
7
|
+
selected["state: selected"]
|
|
8
|
+
|
|
9
|
+
otherTask["guard: otherTask"]
|
|
10
|
+
recoveryForTask["guard: recoveryForTask"]
|
|
11
|
+
candidateCancellable["guard: candidateCancellable"]
|
|
12
|
+
cancelRelated["action: related.cancel"]
|
|
13
|
+
|
|
14
|
+
evaluate -->|request: task.cancel| skip
|
|
15
|
+
evaluate -->|request: task.unblock.retry| skip
|
|
16
|
+
evaluate -->|request: task.queue| skip
|
|
17
|
+
evaluate -->|request: task.release| skip
|
|
18
|
+
evaluate -->|request: task.hold| skip
|
|
19
|
+
evaluate -->|request: task.retry| otherTask
|
|
20
|
+
otherTask -->|false| skip
|
|
21
|
+
otherTask -->|true| checkOther
|
|
22
|
+
checkOther -->|request: task.retry| recoveryForTask
|
|
23
|
+
recoveryForTask -->|false| skip
|
|
24
|
+
recoveryForTask -->|true| checkRecovery
|
|
25
|
+
checkRecovery -->|request: task.retry| candidateCancellable
|
|
26
|
+
candidateCancellable -->|false| skip
|
|
27
|
+
candidateCancellable -->|true| cancelRelated
|
|
28
|
+
cancelRelated --> selected
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
flowchart LR
|
|
2
|
+
%% relay: initial idle
|
|
3
|
+
idle["state: idle"]
|
|
4
|
+
checkOrdinary["state: check_ordinary"]
|
|
5
|
+
checkRun["state: check_run"]
|
|
6
|
+
checkNeeds["state: check_needs"]
|
|
7
|
+
checkId["state: check_id"]
|
|
8
|
+
checkBarrier["state: check_barrier"]
|
|
9
|
+
skip["state: skip"]
|
|
10
|
+
create["state: create"]
|
|
11
|
+
|
|
12
|
+
failedOrBlocked["guard: failedOrBlocked"]
|
|
13
|
+
ordinary["guard: ordinaryWork"]
|
|
14
|
+
currentRun["guard: currentRun"]
|
|
15
|
+
needsRecovery["guard: needsRecovery"]
|
|
16
|
+
idUnused["guard: idUnused"]
|
|
17
|
+
noBarrier["guard: noRecoveryBarrier"]
|
|
18
|
+
createAction["action: troubleshooter.create"]
|
|
19
|
+
|
|
20
|
+
idle -->|on: troubleshooter.reconcile| failedOrBlocked
|
|
21
|
+
failedOrBlocked -->|false| skip
|
|
22
|
+
failedOrBlocked -->|true| checkOrdinary
|
|
23
|
+
|
|
24
|
+
checkOrdinary -->|on: troubleshooter.reconcile| ordinary
|
|
25
|
+
ordinary -->|false| skip
|
|
26
|
+
ordinary -->|true| checkRun
|
|
27
|
+
|
|
28
|
+
checkRun -->|on: troubleshooter.reconcile| currentRun
|
|
29
|
+
currentRun -->|false| skip
|
|
30
|
+
currentRun -->|true| checkNeeds
|
|
31
|
+
|
|
32
|
+
checkNeeds -->|on: troubleshooter.reconcile| needsRecovery
|
|
33
|
+
needsRecovery -->|false| skip
|
|
34
|
+
needsRecovery -->|true| checkId
|
|
35
|
+
|
|
36
|
+
checkId -->|on: troubleshooter.reconcile| idUnused
|
|
37
|
+
idUnused -->|false| skip
|
|
38
|
+
idUnused -->|true| checkBarrier
|
|
39
|
+
|
|
40
|
+
checkBarrier -->|on: troubleshooter.reconcile| noBarrier
|
|
41
|
+
noBarrier -->|false| skip
|
|
42
|
+
noBarrier -->|true| createAction
|
|
43
|
+
createAction --> create
|