chrono_forge 0.9.1 → 0.10.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -0
- data/README.md +305 -44
- data/docs/superpowers/plans/2026-06-25-chrono_forge-dashboard.md +1748 -0
- data/docs/superpowers/plans/2026-06-25-chrono_forge-dashboard.md.tasks.json +17 -0
- data/docs/superpowers/plans/2026-06-25-composite-retry-policies.md +930 -0
- data/docs/superpowers/plans/2026-06-25-composite-retry-policies.md.tasks.json +54 -0
- data/docs/superpowers/plans/2026-06-25-reserved-kwarg-guard.md +241 -0
- data/docs/superpowers/plans/2026-06-25-reserved-kwarg-guard.md.tasks.json +12 -0
- data/docs/superpowers/plans/2026-06-26-branches-spawn-merge.md +1378 -0
- data/docs/superpowers/plans/2026-06-26-branches-spawn-merge.md.tasks.json +67 -0
- data/docs/superpowers/plans/2026-06-26-deferral-continuation-race-and-catchup.md +709 -0
- data/docs/superpowers/plans/2026-06-26-deferral-continuation-race-and-catchup.md.tasks.json +19 -0
- data/docs/superpowers/specs/2026-06-03-unified-retry-policy-design.md +226 -0
- data/docs/superpowers/specs/2026-06-25-chrono_forge-dashboard-design.md +190 -0
- data/docs/superpowers/specs/2026-06-25-composite-retry-policies-design.md +228 -0
- data/docs/superpowers/specs/2026-06-25-reserved-kwarg-guard-design.md +169 -0
- data/docs/superpowers/specs/2026-06-25-spawn-merge-branches-design.md +468 -0
- data/docs/superpowers/specs/2026-06-26-dashboard-branch-view-design.md +142 -0
- data/docs/superpowers/specs/2026-06-26-deferral-continuation-race-and-catchup-design.md +265 -0
- data/lib/chrono_forge/branch_merge_job.rb +138 -0
- data/lib/chrono_forge/branch_probe.rb +26 -0
- data/lib/chrono_forge/cleanup.rb +6 -0
- data/lib/chrono_forge/execution_log.rb +6 -0
- data/lib/chrono_forge/executor/composite_retry_policy.rb +47 -0
- data/lib/chrono_forge/executor/methods/branch.rb +185 -0
- data/lib/chrono_forge/executor/methods/durably_execute.rb +21 -19
- data/lib/chrono_forge/executor/methods/durably_repeat.rb +118 -25
- data/lib/chrono_forge/executor/methods/merge_branches.rb +83 -0
- data/lib/chrono_forge/executor/methods/wait.rb +2 -4
- data/lib/chrono_forge/executor/methods/wait_until.rb +25 -25
- data/lib/chrono_forge/executor/methods/workflow_states.rb +16 -0
- data/lib/chrono_forge/executor/methods.rb +2 -0
- data/lib/chrono_forge/executor/retry_policy.rb +111 -0
- data/lib/chrono_forge/executor.rb +216 -28
- data/lib/chrono_forge/version.rb +1 -1
- data/lib/chrono_forge/workflow.rb +10 -1
- data/lib/generators/chrono_forge/migration_actions.rb +1 -0
- data/lib/generators/chrono_forge/templates/add_chrono_forge_parent_execution_log.rb +38 -0
- metadata +42 -5
- data/lib/chrono_forge/executor/retry_strategy.rb +0 -29
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: chrono_forge
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stefan Froelich
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-06-
|
|
11
|
+
date: 2026-06-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -30,14 +30,14 @@ dependencies:
|
|
|
30
30
|
requirements:
|
|
31
31
|
- - ">="
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '
|
|
33
|
+
version: '7.1'
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '
|
|
40
|
+
version: '7.1'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: zeitwerk
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -164,6 +164,20 @@ dependencies:
|
|
|
164
164
|
- - ">="
|
|
165
165
|
- !ruby/object:Gem::Version
|
|
166
166
|
version: '0'
|
|
167
|
+
- !ruby/object:Gem::Dependency
|
|
168
|
+
name: strong_migrations
|
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
|
170
|
+
requirements:
|
|
171
|
+
- - ">="
|
|
172
|
+
- !ruby/object:Gem::Version
|
|
173
|
+
version: '0'
|
|
174
|
+
type: :development
|
|
175
|
+
prerelease: false
|
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
177
|
+
requirements:
|
|
178
|
+
- - ">="
|
|
179
|
+
- !ruby/object:Gem::Version
|
|
180
|
+
version: '0'
|
|
167
181
|
description: ChronoForge provides a robust framework for building durable, distributed
|
|
168
182
|
workflows in Ruby on Rails applications. It offers reliable state management, error
|
|
169
183
|
recovery, and workflow orchestration through features like durable execution, wait
|
|
@@ -181,32 +195,55 @@ files:
|
|
|
181
195
|
- README.md
|
|
182
196
|
- Rakefile
|
|
183
197
|
- config.ru
|
|
198
|
+
- docs/superpowers/plans/2026-06-25-chrono_forge-dashboard.md
|
|
199
|
+
- docs/superpowers/plans/2026-06-25-chrono_forge-dashboard.md.tasks.json
|
|
200
|
+
- docs/superpowers/plans/2026-06-25-composite-retry-policies.md
|
|
201
|
+
- docs/superpowers/plans/2026-06-25-composite-retry-policies.md.tasks.json
|
|
202
|
+
- docs/superpowers/plans/2026-06-25-reserved-kwarg-guard.md
|
|
203
|
+
- docs/superpowers/plans/2026-06-25-reserved-kwarg-guard.md.tasks.json
|
|
204
|
+
- docs/superpowers/plans/2026-06-26-branches-spawn-merge.md
|
|
205
|
+
- docs/superpowers/plans/2026-06-26-branches-spawn-merge.md.tasks.json
|
|
206
|
+
- docs/superpowers/plans/2026-06-26-deferral-continuation-race-and-catchup.md
|
|
207
|
+
- docs/superpowers/plans/2026-06-26-deferral-continuation-race-and-catchup.md.tasks.json
|
|
208
|
+
- docs/superpowers/specs/2026-06-03-unified-retry-policy-design.md
|
|
209
|
+
- docs/superpowers/specs/2026-06-25-chrono_forge-dashboard-design.md
|
|
210
|
+
- docs/superpowers/specs/2026-06-25-composite-retry-policies-design.md
|
|
211
|
+
- docs/superpowers/specs/2026-06-25-reserved-kwarg-guard-design.md
|
|
212
|
+
- docs/superpowers/specs/2026-06-25-spawn-merge-branches-design.md
|
|
213
|
+
- docs/superpowers/specs/2026-06-26-dashboard-branch-view-design.md
|
|
214
|
+
- docs/superpowers/specs/2026-06-26-deferral-continuation-race-and-catchup-design.md
|
|
184
215
|
- examples/continue_if_webhook_example.rb
|
|
185
216
|
- gemfiles/rails_7.1.gemfile
|
|
186
217
|
- gemfiles/rails_7.1.gemfile.lock
|
|
187
218
|
- lib/chrono_forge.rb
|
|
219
|
+
- lib/chrono_forge/branch_merge_job.rb
|
|
220
|
+
- lib/chrono_forge/branch_probe.rb
|
|
188
221
|
- lib/chrono_forge/cleanup.rb
|
|
189
222
|
- lib/chrono_forge/cleanup_job.rb
|
|
190
223
|
- lib/chrono_forge/error_log.rb
|
|
191
224
|
- lib/chrono_forge/execution_log.rb
|
|
192
225
|
- lib/chrono_forge/executor.rb
|
|
226
|
+
- lib/chrono_forge/executor/composite_retry_policy.rb
|
|
193
227
|
- lib/chrono_forge/executor/context.rb
|
|
194
228
|
- lib/chrono_forge/executor/execution_tracker.rb
|
|
195
229
|
- lib/chrono_forge/executor/lock_strategy.rb
|
|
196
230
|
- lib/chrono_forge/executor/methods.rb
|
|
231
|
+
- lib/chrono_forge/executor/methods/branch.rb
|
|
197
232
|
- lib/chrono_forge/executor/methods/continue_if.rb
|
|
198
233
|
- lib/chrono_forge/executor/methods/durably_execute.rb
|
|
199
234
|
- lib/chrono_forge/executor/methods/durably_repeat.rb
|
|
235
|
+
- lib/chrono_forge/executor/methods/merge_branches.rb
|
|
200
236
|
- lib/chrono_forge/executor/methods/wait.rb
|
|
201
237
|
- lib/chrono_forge/executor/methods/wait_until.rb
|
|
202
238
|
- lib/chrono_forge/executor/methods/workflow_states.rb
|
|
203
|
-
- lib/chrono_forge/executor/
|
|
239
|
+
- lib/chrono_forge/executor/retry_policy.rb
|
|
204
240
|
- lib/chrono_forge/version.rb
|
|
205
241
|
- lib/chrono_forge/workflow.rb
|
|
206
242
|
- lib/generators/chrono_forge/install/USAGE
|
|
207
243
|
- lib/generators/chrono_forge/install/install_generator.rb
|
|
208
244
|
- lib/generators/chrono_forge/migration_actions.rb
|
|
209
245
|
- lib/generators/chrono_forge/templates/add_chrono_forge_error_log_step_context.rb
|
|
246
|
+
- lib/generators/chrono_forge/templates/add_chrono_forge_parent_execution_log.rb
|
|
210
247
|
- lib/generators/chrono_forge/templates/add_chrono_forge_workflow_state_index.rb
|
|
211
248
|
- lib/generators/chrono_forge/templates/install_chrono_forge.rb
|
|
212
249
|
- lib/generators/chrono_forge/upgrade/USAGE
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
module ChronoForge
|
|
2
|
-
module Executor
|
|
3
|
-
class RetryStrategy
|
|
4
|
-
BACKOFF_STRATEGY = [
|
|
5
|
-
1.second, # Initial retry
|
|
6
|
-
5.seconds, # Second retry
|
|
7
|
-
30.seconds, # Third retry
|
|
8
|
-
2.minutes, # Fourth retry
|
|
9
|
-
10.minutes # Final retry
|
|
10
|
-
]
|
|
11
|
-
|
|
12
|
-
def self.schedule_retry(workflow, attempt: 0)
|
|
13
|
-
wait_duration = BACKOFF_STRATEGY[attempt] || BACKOFF_STRATEGY.last
|
|
14
|
-
|
|
15
|
-
# Schedule with exponential backoff
|
|
16
|
-
workflow.job_klass
|
|
17
|
-
.set(wait: wait_duration)
|
|
18
|
-
.perform_later(
|
|
19
|
-
workflow.key,
|
|
20
|
-
attempt: attempt + 1
|
|
21
|
-
)
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def self.max_attempts
|
|
25
|
-
BACKOFF_STRATEGY.length
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|