legionio 1.5.0 → 1.5.1
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 +8 -0
- data/lib/legion/digital_worker/lifecycle.rb +12 -0
- data/lib/legion/runner.rb +2 -2
- data/lib/legion/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 999125c333fd0888aceaf75ce138117264386b4d26c6b86d07054d82c8ce9b3b
|
|
4
|
+
data.tar.gz: 7bba997f372b719b5dc0aa222138870ddfd3550d19b5dfd5e4ae957e21278831
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d01be560c4c99dc403c009771829e1e24c086ae0f2314a1b36bf705dc07f8795f3379d330e542322007e742f0e8dfb2f86296edf3231a51f75d6fcad0a944a68
|
|
7
|
+
data.tar.gz: 70b867cd417ee7146237cc0aacf937240b45bfc482512559ea49c313d6dd5690b81206c7d333eb915c9bc256e3efae7ed1c086e0f7c3f2ad6d8989dff3bb753b
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Legion Changelog
|
|
2
2
|
|
|
3
|
+
## [1.5.1] - 2026-03-24
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- Wire lex-extinction into digital worker lifecycle transitions
|
|
7
|
+
- `EXTINCTION_MAPPING` maps lifecycle states to containment levels (0-4)
|
|
8
|
+
- Guarded `Client#escalate` call during `transition!` when containment level increases
|
|
9
|
+
|
|
3
10
|
## [1.5.0] - 2026-03-24
|
|
4
11
|
|
|
5
12
|
### Added
|
|
@@ -24,6 +31,7 @@
|
|
|
24
31
|
### Fixed
|
|
25
32
|
- Runner log output now tagged with extension name (e.g. `[mesh][Runner]` instead of bare `[Runner]`)
|
|
26
33
|
- Extension Transport and Routes builders use tagged `log` helper instead of bare `Legion::Logging`
|
|
34
|
+
- Runner.run now sets `status = 'task.exception'` before calling `handle_exception`, preventing null function/result in CheckSubtask messages when handle_exception raises
|
|
27
35
|
|
|
28
36
|
## [1.4.198] - 2026-03-24
|
|
29
37
|
|
|
@@ -79,6 +79,18 @@ module Legion
|
|
|
79
79
|
raise AuthorityRequired, "#{from_state} -> #{to_state} requires #{authority} (by: #{by})" if authority && opts[:authority_verified] != true
|
|
80
80
|
end
|
|
81
81
|
|
|
82
|
+
if defined?(Legion::Extensions::Extinction::Client)
|
|
83
|
+
new_level = EXTINCTION_MAPPING[to_state]
|
|
84
|
+
current_level = EXTINCTION_MAPPING[from_state] || 0
|
|
85
|
+
if new_level && new_level > current_level
|
|
86
|
+
Legion::Extensions::Extinction::Client.new.escalate(
|
|
87
|
+
level: new_level,
|
|
88
|
+
authority: by || :system,
|
|
89
|
+
reason: "lifecycle transition: #{from_state} -> #{to_state}"
|
|
90
|
+
)
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
82
94
|
worker.update(
|
|
83
95
|
lifecycle_state: to_state,
|
|
84
96
|
updated_at: Time.now.utc,
|
data/lib/legion/runner.rb
CHANGED
|
@@ -38,6 +38,8 @@ module Legion
|
|
|
38
38
|
result = { error: {} }
|
|
39
39
|
rescue StandardError => e
|
|
40
40
|
rlog.error "[Runner] exception in #{runner_class}##{function}: #{e.message}"
|
|
41
|
+
status = 'task.exception'
|
|
42
|
+
result = { success: false, status: status, error: { message: e.message, backtrace: e.backtrace } }
|
|
41
43
|
runner_class.handle_exception(e,
|
|
42
44
|
**opts,
|
|
43
45
|
runner_class: runner_class,
|
|
@@ -46,8 +48,6 @@ module Legion
|
|
|
46
48
|
task_id: task_id,
|
|
47
49
|
generate_task: generate_task,
|
|
48
50
|
check_subtask: check_subtask)
|
|
49
|
-
status = 'task.exception'
|
|
50
|
-
result = { success: false, status: status, error: { message: e.message, backtrace: e.backtrace } }
|
|
51
51
|
raise e unless catch_exceptions
|
|
52
52
|
ensure
|
|
53
53
|
status = 'task.completed' if status.nil?
|
data/lib/legion/version.rb
CHANGED