legionio 1.5.5 → 1.5.6

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: 73b570b5654f1f6a65839229bbe08b7dcba61b301cb894efcd34c453c824be3c
4
- data.tar.gz: 666be120babae098c300353258d1045c06963d258b58db0cc21241eb9be3ddcd
3
+ metadata.gz: 2e2128d21b3835602805a33b591e2f8384b9133562d2ea2f5958cc83652e4dbf
4
+ data.tar.gz: 96e81f0b0064238cd0da2ea32f7c2428cdc18b940b4a4e76272231e37f963696
5
5
  SHA512:
6
- metadata.gz: 6f9c0d44daa83169a9ef909bb506ac4b29d37a272d0b7a837aa3e44acc2db40f125de383697784499981d47a13907b0186059f669499cc1c3251e19e544d9df8
7
- data.tar.gz: 8ab9224d32f76321a5b56143b63b945c95199016df101f856850bada1632683f46d1c894117fac0508f587e3a93ec499ace11b521efb3d7b0298331da0afcd3a
6
+ metadata.gz: aca4cc2b631f9f7caa17a1ba3a3601de56400530cfb8ee2a37de8bb65d450e5ea1c1e67cbeb207838dcba70a85024e57d1abe921a490b94b99ca21decda32577
7
+ data.tar.gz: 64a0442a7838b090f9ddeab25a9f822a49f7d76fe6dd5418a58408944c3f23ca06b962cdcd85f2cce6c4665579b266d5e1850f61b82c61ac08771f8d46dc91aa
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Legion Changelog
2
2
 
3
+ ## [1.5.6] - 2026-03-24
4
+
5
+ ### Changed
6
+ - `Service#register_logging_hooks` uses dedicated `log_channel` from `Connection` instead of shared channel; passes `channel:` to `Exchanges::Logging` to avoid contention
7
+ - `Service#reload` re-setup sequence now includes `register_logging_hooks`, cache re-setup, and guarded `setup_rbac`/`setup_llm`/`setup_gaia` calls
8
+ - `Readiness::COMPONENTS` expanded with `:rbac` and `:llm` for accurate startup tracking
9
+ - LLM and GAIA boot blocks gated so `mark_ready` only fires on success path
10
+ - `Cache` and `Data` boot blocks wrap remote failures with graceful fallback to local adapters
11
+
3
12
  ## [1.5.5] - 2026-03-24
4
13
 
5
14
  ### Added
@@ -316,26 +316,32 @@ module Legion
316
316
  end
317
317
 
318
318
  def register_logging_hooks
319
+ return unless defined?(Legion::Transport::Connection)
319
320
  return unless Legion::Transport::Connection.session_open?
320
321
 
322
+ log_ch = Legion::Transport::Connection.log_channel
323
+ unless log_ch
324
+ Legion::Logging.debug 'No dedicated log channel available, log forwarding disabled'
325
+ return
326
+ end
327
+
321
328
  require 'legion/transport/exchanges/logging' unless defined?(Legion::Transport::Exchanges::Logging)
322
- exchange = Legion::Transport::Exchanges::Logging.new
329
+ exchange = Legion::Transport::Exchanges::Logging.new(channel: log_ch)
323
330
 
324
331
  %i[fatal error warn].each do |level|
325
332
  Legion::Logging.send(:"on_#{level}") do |event|
326
- next unless Legion::Transport::Connection.session_open?
333
+ next unless log_ch&.open?
327
334
 
328
335
  source = event[:lex] || 'core'
329
336
  routing_key = "legion.#{source}.#{level}"
330
337
  exchange.publish(Legion::JSON.dump(event), routing_key: routing_key)
331
- rescue StandardError => e
332
- Legion::Logging.debug "Service#register_logging_hooks publish failed for #{level}: #{e.message}" if defined?(Legion::Logging)
338
+ rescue StandardError
333
339
  nil
334
340
  end
335
341
  end
336
342
 
337
343
  Legion::Logging.enable_hooks!
338
- Legion::Logging.info('Logging hooks registered for RMQ publishing')
344
+ Legion::Logging.info('Logging hooks registered (dedicated channel)')
339
345
  end
340
346
 
341
347
  def setup_alerts
@@ -524,21 +530,30 @@ module Legion
524
530
 
525
531
  Legion::Readiness.wait_until_not_ready(:transport, :data, :cache, :crypt)
526
532
 
527
- setup_settings
528
- Legion::Crypt.start
533
+ Legion::Settings.load(force: true, config_dirs: Legion::Settings::Loader.default_directories.select { |d| Dir.exist?(d) })
534
+ Legion::Readiness.mark_ready(:settings)
535
+
536
+ Legion::Crypt.start if defined?(Legion::Crypt)
529
537
  Legion::Readiness.mark_ready(:crypt)
530
538
 
531
539
  setup_transport
532
540
  Legion::Readiness.mark_ready(:transport)
541
+ register_logging_hooks
542
+
543
+ require 'legion/cache' unless defined?(Legion::Cache)
544
+ Legion::Cache.setup
545
+ Legion::Readiness.mark_ready(:cache)
533
546
 
534
547
  setup_data
535
548
  Legion::Readiness.mark_ready(:data)
536
549
 
537
- setup_gaia
550
+ setup_rbac if defined?(Legion::Rbac)
551
+ setup_llm if defined?(Legion::LLM)
552
+
553
+ setup_gaia if defined?(Legion::Gaia)
538
554
  Legion::Readiness.mark_ready(:gaia)
539
555
 
540
556
  setup_supervision
541
-
542
557
  load_extensions
543
558
  Legion::Readiness.mark_ready(:extensions)
544
559
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Legion
4
- VERSION = '1.5.5'
4
+ VERSION = '1.5.6'
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.5
4
+ version: 1.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity