legionio 1.5.0 → 1.5.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 610c8e32889fe2c4f1fe939e6281ea9a4ed47438723d47b605f6ce74b51a3f7c
4
- data.tar.gz: c727fbf0febe067f634be639ed46a7642e2c47d5e3accadcb276b506f5f02c9a
3
+ metadata.gz: ab73463db65a9727d48f06fe62241a998ed59bd4f65ae37e3beea891ff7a039f
4
+ data.tar.gz: 61da69443e787e03c589605f604bf5cc03b22d05699a18bcb6bd04b5127cd00a
5
5
  SHA512:
6
- metadata.gz: 17acc62f2465c285639a2b1bce2a59f14555e89189aa5c3932d1b49f36dd5500a3a1441f0b0810f52ebecc1160d68c2e834ff852f1309872b2212404195c8bf9
7
- data.tar.gz: e48c0a848e8bccc2ba4af5ad51c8f39a87b4825968329bae36f84d6a6f06b46492c57ce2b0c5f612f511ed360508488cbd06e44758461f7214803dd18026c628
6
+ metadata.gz: 61a381380b6120a894ea646ba6bc4a7e03d2aadb354a482d4217069de840f95f0aa42c4ef42ae8d1c333e2bfc5d8de7873c90441fc99d8a54f01a44c96f44150
7
+ data.tar.gz: 2cc61385a084947067caaf5201aaf32865b994f9d330842801c5e1f41794cb0c35bbb444739a426cf3ac0d05124a4638e664742dc3f5a2816db826b270855d65
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Legion Changelog
2
2
 
3
+ ## [1.5.2] - 2026-03-24
4
+
5
+ ### Fixed
6
+ - `check_cache_local` in CLI now reads display values from `Legion::Settings[:cache_local]` instead of static code defaults
7
+
8
+ ## [1.5.1] - 2026-03-24
9
+
10
+ ### Added
11
+ - Wire lex-extinction into digital worker lifecycle transitions
12
+ - `EXTINCTION_MAPPING` maps lifecycle states to containment levels (0-4)
13
+ - Guarded `Client#escalate` call during `transition!` when containment level increases
14
+
3
15
  ## [1.5.0] - 2026-03-24
4
16
 
5
17
  ### Added
@@ -24,6 +36,7 @@
24
36
  ### Fixed
25
37
  - Runner log output now tagged with extension name (e.g. `[mesh][Runner]` instead of bare `[Runner]`)
26
38
  - Extension Transport and Routes builders use tagged `log` helper instead of bare `Legion::Logging`
39
+ - Runner.run now sets `status = 'task.exception'` before calling `handle_exception`, preventing null function/result in CheckSubtask messages when handle_exception raises
27
40
 
28
41
  ## [1.4.198] - 2026-03-24
29
42
 
@@ -180,7 +180,7 @@ module Legion
180
180
  raise 'Legion::Cache::Local not available' unless defined?(Legion::Cache::Local) && Legion::Cache::Local.respond_to?(:setup)
181
181
 
182
182
  Legion::Cache::Local.setup
183
- cs = Legion::Cache::Settings.respond_to?(:local) ? Legion::Cache::Settings.local : {}
183
+ cs = Legion::Settings[:cache_local] || (Legion::Cache::Settings.respond_to?(:local) ? Legion::Cache::Settings.local : {})
184
184
  driver = cs[:driver] || 'dalli'
185
185
  servers = Array(cs[:servers] || cs[:server] || ['127.0.0.1'])
186
186
  "#{driver} -> #{servers.join(', ')}"
@@ -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?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Legion
4
- VERSION = '1.5.0'
4
+ VERSION = '1.5.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legionio
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity