saga_forge 0.1.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 +7 -0
- data/CHANGELOG.md +87 -0
- data/LICENSE +21 -0
- data/README.md +635 -0
- data/lib/generators/saga_forge/install/USAGE +28 -0
- data/lib/generators/saga_forge/install/install_generator.rb +60 -0
- data/lib/generators/saga_forge/migration_actions.rb +68 -0
- data/lib/generators/saga_forge/templates/initializer.rb +23 -0
- data/lib/generators/saga_forge/templates/install_saga_forge.rb +84 -0
- data/lib/generators/saga_forge/upgrade/USAGE +15 -0
- data/lib/generators/saga_forge/upgrade/upgrade_generator.rb +30 -0
- data/lib/saga_forge/application_record.rb +15 -0
- data/lib/saga_forge/base.rb +61 -0
- data/lib/saga_forge/compensation_job.rb +24 -0
- data/lib/saga_forge/compensation_runner.rb +142 -0
- data/lib/saga_forge/composite_retry_policy.rb +48 -0
- data/lib/saga_forge/configuration.rb +32 -0
- data/lib/saga_forge/dashboard/graph.rb +20 -0
- data/lib/saga_forge/definition.rb +268 -0
- data/lib/saga_forge/event.rb +16 -0
- data/lib/saga_forge/execution/compensation_facade.rb +21 -0
- data/lib/saga_forge/execution/facade.rb +45 -0
- data/lib/saga_forge/execution/post_commit.rb +53 -0
- data/lib/saga_forge/execution/runner.rb +240 -0
- data/lib/saga_forge/execution_job.rb +41 -0
- data/lib/saga_forge/publisher.rb +43 -0
- data/lib/saga_forge/railtie.rb +17 -0
- data/lib/saga_forge/retention_job.rb +28 -0
- data/lib/saga_forge/retry_policy.rb +107 -0
- data/lib/saga_forge/router.rb +70 -0
- data/lib/saga_forge/state.rb +113 -0
- data/lib/saga_forge/sweeper_job.rb +80 -0
- data/lib/saga_forge/timeout_job.rb +96 -0
- data/lib/saga_forge/version.rb +3 -0
- data/lib/saga_forge.rb +81 -0
- metadata +140 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 9198aa3ee09a2ee78074a346f4df07d7581559dec0f56128579f1840b4499a10
|
|
4
|
+
data.tar.gz: 6a471689442709ff20cb58baf40ea9847c5135995f9e60f4bf87ccd394778512
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 0ef95d4a19acdcc0d6c8a745b9b42c7e067416417918b7ad1e1df282e13167afeed28694104d3cb773aa288c852264a8154cfd3065d1d47c6784e60496e1e6b1
|
|
7
|
+
data.tar.gz: 30d863984778d17c11e57220b2c0326f4a6e7004eac8c1ef469bf7962e4694a2cf46af4cf0a812b4da69622d221cead97437a8eb99a00310269334dfa8ad2c13
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
## [0.1.0] - 2026-08-26
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- Json fallback columns get null:false + empty-hash defaults
|
|
10
|
+
- Deep-freeze Definition, exact block-extent jump attribution, DSL guards
|
|
11
|
+
- Loud boot-time definition compilation, router skip logging, test registry hygiene
|
|
12
|
+
- Savepoint duplicate-insert dedup for PG, testable boot compile, doc notes
|
|
13
|
+
- Atomic stall counter, not-found discard boundary test
|
|
14
|
+
- Lock retry bookkeeping against concurrent deliveries, encoding-safe error capture
|
|
15
|
+
- Version-fence compensation commits against concurrent runners
|
|
16
|
+
- Index compensating scan, sweep concurrency guards, batched retention deletes
|
|
17
|
+
- Status-scoped recovery writes, operator guards, bulk enqueue
|
|
18
|
+
- Anchor the migration exists-check to exact names
|
|
19
|
+
- Freeze graph members; test + document multi-terminal to_graph
|
|
20
|
+
- Close forward-only guard hole in TimeoutJob; stamp last_active_at on timeout/compensation paths
|
|
21
|
+
|
|
22
|
+
### Documentation
|
|
23
|
+
|
|
24
|
+
- SagaForge design spec and core implementation plan
|
|
25
|
+
- Match recurring.yml snippet comment verbatim to plan wording
|
|
26
|
+
- Final task-tracking sync — all 14 plan tasks completed
|
|
27
|
+
- Hero example initiates a pending payment; settlement is genuinely async
|
|
28
|
+
- Rewrite README to the angarium standard
|
|
29
|
+
- Landing page and Pages deploy workflow
|
|
30
|
+
- 'events' not 'webhooks' in the hook; drop the headless claim
|
|
31
|
+
- Explain the stall budget (timing, tuning, re-delivery)
|
|
32
|
+
- Saga_forge-dashboard design spec (phase 2)
|
|
33
|
+
- Saga_forge-dashboard implementation plan (phase 2)
|
|
34
|
+
- Dashboard plan follow-ups and task completion tracking
|
|
35
|
+
- Forward-only DAG + structural dedup implementation plan
|
|
36
|
+
- Forward-only DAG, structural dedup, persisted lifecycle timestamps, Rails-required
|
|
37
|
+
- Task tracking for DAG/structural-dedup refactor (all tasks complete)
|
|
38
|
+
- Mark review-fix task complete
|
|
39
|
+
|
|
40
|
+
### Features
|
|
41
|
+
|
|
42
|
+
- Gem scaffold, configuration, combustion test harness
|
|
43
|
+
- Schema, ApplicationRecord multi-DB routing, State and Event models
|
|
44
|
+
- Port RetryPolicy and CompositeRetryPolicy from chrono_forge
|
|
45
|
+
- Saga DSL and compiled Definition with boot validations and mermaid
|
|
46
|
+
- Router, external publisher with dedup and guard, saga eager-load railtie
|
|
47
|
+
- Execution lifecycle — not-found absorption, halt, stall spin and parking
|
|
48
|
+
- Facade verbs, single-commit execution, staged publish delivery, parking re-delivery
|
|
49
|
+
- Retry policy integration with per-error budgets and failed-event isolation
|
|
50
|
+
- Derived LIFO compensation with per-step commits and tolerant retries
|
|
51
|
+
- Version-fenced timeouts with fail! and branch actions
|
|
52
|
+
- Sweeper delivery guarantee with stranded-recovery duties, terminal-only retention
|
|
53
|
+
- Operator recovery API — retry_stalled!, resume!, compensate!, cancel!
|
|
54
|
+
- Install and migrations generators with --database multi-DB support
|
|
55
|
+
- Durability suite, CI matrix, README, solid_queue key coverage
|
|
56
|
+
- Definition#to_graph, stay_targets, State.compensating (dashboard reads)
|
|
57
|
+
- Lower stall_budget default to 3 (parking is cheap and self-healing)
|
|
58
|
+
- Structural dedup key + finalized_at/last_active_at/last_processed_at
|
|
59
|
+
- Structural (saga,correlation,event) dedup; drop event_id/digest
|
|
60
|
+
- Tolerate benign staged-insert collisions via per-row savepoints
|
|
61
|
+
- [**breaking**] Remove stay verb; sagas advance, branch, or fail — never loop
|
|
62
|
+
- [**breaking**] Enforce forward-only DAG — reject advances into visited states
|
|
63
|
+
- Stamp last_active_at/finalized_at/last_processed_at atomically at commit
|
|
64
|
+
- Sweeper/retention key off persisted last_active_at/finalized_at/last_processed_at
|
|
65
|
+
- [**breaking**] Default job_queue to :default; add maintenance_queue seam
|
|
66
|
+
|
|
67
|
+
### Miscellaneous Tasks
|
|
68
|
+
|
|
69
|
+
- Shebang and strict mode for bin/appraise
|
|
70
|
+
- LICENSE, lean gem manifest, record A.8 warning deferral
|
|
71
|
+
- Add cliff-driven release tooling for both gems
|
|
72
|
+
- Exclude the dashboard's demo config.ru from root standard
|
|
73
|
+
- Tidy gemspecs for release
|
|
74
|
+
- Require MFA to push the gems (rubygems_mfa_required)
|
|
75
|
+
|
|
76
|
+
### Refactoring
|
|
77
|
+
|
|
78
|
+
- Boot-validate timeouts, extract shared post-commit effects, timeout concurrency key
|
|
79
|
+
- Adopt chrono_forge's migration template pattern (install/upgrade generators)
|
|
80
|
+
- [**breaking**] Require Rails (railties dep); drop standalone ActiveRecord/ActiveJob guards
|
|
81
|
+
|
|
82
|
+
### Testing
|
|
83
|
+
|
|
84
|
+
- UnknownStateError rollback + duplicate-start race coverage, engine contract comments
|
|
85
|
+
- Exercise limits_concurrency through the real solid_queue macro
|
|
86
|
+
|
|
87
|
+
## [Unreleased]
|
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Stefan Froelich
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|