legion-settings 1.3.19 → 1.3.20

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: bcb9fa64de0a33406f5fd9ff5565901422a3db6ab594546d6fdee46d69cd38b7
4
- data.tar.gz: 6201105537a8d3475e732b22a16e48b10b12787b03c18b1ce29d5b6e9531d85f
3
+ metadata.gz: beeec634e807f88a6a10a9076a258efedc233d5cfe0412be24d96f01f2b9be35
4
+ data.tar.gz: be84692b4242373941f10ee92dd0ed86df689d805283a6cd4e14879f7cd2a907
5
5
  SHA512:
6
- metadata.gz: c4f621cfe19539e3da7c16d7673334e5db9b70591b6e3cb269dba12f3dd9d0591ef37204d48c7c97a6dd3ed6ac8708d99346b58797bd0c15d6824fec5de45304
7
- data.tar.gz: 5c2fdb94529ace5f3e8922b00984539add86621f1582105f96d12782eaf50ca434117bb05da16c5cc6f87cfef9c21564f7de0b1a1f8ca8389799f5b9189a7727
6
+ metadata.gz: 7f9f4ed4728098aeeb92e1925d3465e89d05d30d8ee01ae030fd1424b483d7c31b67f423659b63e7f44bd01dabc28aad1906db8148c3576ebacf73d2667491bd
7
+ data.tar.gz: 247ed6734058a5ef16cd76ab37e7e620b8794d4fa60d6b7d561f616eef1030a1b461f71c65a987f1cc5223387df45e0eaf54105ec16ea9529355e772a9d3e930
data/CHANGELOG.md CHANGED
@@ -1,11 +1,14 @@
1
1
  # Legion::Settings Changelog
2
2
 
3
- ## [Unreleased]
3
+ ## [1.3.20] - 2026-03-27
4
4
 
5
5
  ### Fixed
6
6
  - Add 1-second timeout to FQDN detection to prevent boot hang on slow DNS
7
7
  - Downgrade FQDN detection failure log from warn to debug
8
8
 
9
+ ### Added
10
+ - `Resolver#resolve_vault`: debug logging for vault path, key, cache hits, returned data structure, and extracted values
11
+
9
12
  ## [1.3.18] - 2026-03-24
10
13
 
11
14
  ### Added
data/CLAUDE.md CHANGED
@@ -8,7 +8,7 @@
8
8
  Hash-like configuration store for the LegionIO framework. Loads settings from JSON files, directories, and environment variables. Provides a unified `Legion::Settings[:key]` accessor used by all other Legion gems. Includes schema-based validation with type inference, enum constraints, and cross-module checks.
9
9
 
10
10
  **GitHub**: https://github.com/LegionIO/legion-settings
11
- **Version**: 1.3.9
11
+ **Version**: 1.3.19
12
12
  **License**: Apache-2.0
13
13
 
14
14
  ## Architecture
@@ -46,6 +46,8 @@ Legion::Settings (singleton module)
46
46
  │ ├── .validate_module # Validate values against schema
47
47
  │ └── .detect_unknown_keys # Find typos via Levenshtein distance
48
48
 
49
+ ├── AgentLoader # Role-based profile loading: filters which extensions to load (profile: core/cognitive/service/dev/custom/nil)
50
+ ├── Validators::Tls # TLS block validator: validates all `tls.*` blocks for required fields, certificate existence, and consistency
49
51
  ├── ValidationError # Collects all errors, raises once with formatted message
50
52
  ├── OS # OS detection helpers
51
53
  └── CORE_MODULES # [:transport, :cache, :crypt, :data, :logging, :client]
@@ -81,6 +83,8 @@ Legion::Settings (singleton module)
81
83
  | `lib/legion/settings/os.rb` | OS detection helpers |
82
84
  | `lib/legion/settings/resolver.rb` | Secret resolution: `vault://` and `env://` URI references, fallback chains |
83
85
  | `lib/legion/settings/dns_bootstrap.rb` | DNS-based corporate config discovery, caching, background refresh |
86
+ | `lib/legion/settings/agent_loader.rb` | Role-based extension profile filtering (profile: core/cognitive/service/dev/custom/nil) |
87
+ | `lib/legion/settings/validators/tls.rb` | Validates TLS configuration blocks for required fields, cert existence, and consistency |
84
88
  | `lib/legion/settings/version.rb` | VERSION constant |
85
89
  | `spec/legion/settings_spec.rb` | Core settings module tests |
86
90
  | `spec/legion/settings_module_spec.rb` | Module-level accessor and merge tests |
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Configuration management module for the [LegionIO](https://github.com/LegionIO/LegionIO) framework. Loads settings from JSON files, directories, and environment variables. Provides a unified `Legion::Settings[:key]` accessor used by all other Legion gems.
4
4
 
5
- **Version**: 1.3.9
5
+ **Version**: 1.3.19
6
6
 
7
7
  ## Installation
8
8
 
@@ -139,19 +139,28 @@ module Legion
139
139
  end
140
140
 
141
141
  def resolve_vault(path, key)
142
+ log_debug("resolve_vault: path=#{path}, key=#{key}, vault_available=#{@vault_available}")
142
143
  return nil unless @vault_available
143
144
 
144
145
  @vault_cache[path] ||= begin
145
- Legion::Crypt.read(path)
146
+ log_debug("resolve_vault: calling Legion::Crypt.read(#{path.inspect})")
147
+ result = Legion::Crypt.read(path)
148
+ log_debug("resolve_vault: read returned #{result.nil? ? 'nil' : "keys=#{result.keys.inspect}"}")
149
+ result
146
150
  rescue StandardError => e
147
- log_debug("Settings resolver: vault read failed for #{path}: #{e.message}")
151
+ log_warn("Settings resolver: vault read failed for #{path}: #{e.class}=#{e.message}")
148
152
  nil
149
153
  end
150
154
 
151
155
  data = @vault_cache[path]
152
- return nil unless data.is_a?(Hash)
156
+ unless data.is_a?(Hash)
157
+ log_debug("resolve_vault: data at #{path} is #{data.class}, returning nil")
158
+ return nil
159
+ end
153
160
 
154
- data[key.to_sym] || data[key.to_s]
161
+ value = data[key.to_sym] || data[key.to_s]
162
+ log_debug("resolve_vault: #{path}##{key} = #{value.nil? ? 'nil' : '<present>'}")
163
+ value
155
164
  end
156
165
 
157
166
  def resolve_lease(name, key)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Legion
4
4
  module Settings
5
- VERSION = '1.3.19'
5
+ VERSION = '1.3.20'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legion-settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.19
4
+ version: 1.3.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity