lex-agentic-inference 0.1.8 → 0.1.9
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 +4 -0
- data/lib/legion/extensions/agentic/inference/abductive/helpers/abduction_engine.rb +1 -1
- data/lib/legion/extensions/agentic/inference/version.rb +1 -1
- data/spec/legion/extensions/agentic/inference/abductive/runners/abductive_reasoning_spec.rb +19 -0
- 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: aab6451e969d15dec0c0611253cda68bf6395f73c94a107fb40bd6ac7906bfab
|
|
4
|
+
data.tar.gz: 35f5f2e847b918d8f39418ea2db34143cb7541051b39a904194c15cb5b7ea8ef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: db120c178d16008756bb83b5c84548b27de13d60e628dcf0fbb96b3f4166ddab1e56a751241ae84876d68a6222eec2f4e863b9b51e27d09319aa1b645de4ed29
|
|
7
|
+
data.tar.gz: 41221a494ac82877d7795c4e4a609d6f52efaecb68248ade74359da358b43ac5b881cfbf6ec0d4c82e4c66ece948faf3fd36e0f0c3ff3c01505b9f7093e8a3c2
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.9] - 2026-05-07
|
|
4
|
+
### Fixed
|
|
5
|
+
- Abductive reasoning decay now handles restored hypotheses with no `last_evaluated_at` timestamp instead of crashing the update cycle.
|
|
6
|
+
|
|
3
7
|
## [0.1.8] - 2026-04-22
|
|
4
8
|
### Added
|
|
5
9
|
- 7 new maintenance actors: FreeEnergy::Update (30s), BeliefRevision::Update (120s), RealityTesting::DecayBeliefs (300s), CognitiveCoherence::Update (120s), ExpectationViolation::DecayViolations (300s), AbductiveReasoning::Update (60s), CognitiveMomentum::Update (60s)
|
|
@@ -100,7 +100,7 @@ module Legion
|
|
|
100
100
|
decayed = 0
|
|
101
101
|
@hypotheses.each_value do |hyp|
|
|
102
102
|
next if hyp.state == :refuted
|
|
103
|
-
next if hyp.last_evaluated_at >= cutoff
|
|
103
|
+
next if hyp.last_evaluated_at && hyp.last_evaluated_at >= cutoff
|
|
104
104
|
|
|
105
105
|
hyp.plausibility = (hyp.plausibility - Constants::DECAY_RATE).clamp(
|
|
106
106
|
Constants::PLAUSIBILITY_FLOOR,
|
|
@@ -298,6 +298,25 @@ RSpec.describe Legion::Extensions::Agentic::Inference::Abductive::Runners::Abduc
|
|
|
298
298
|
result = client.update_abductive_reasoning
|
|
299
299
|
expect(result[:pruned]).to eq(1)
|
|
300
300
|
end
|
|
301
|
+
|
|
302
|
+
it 'decays hypotheses that were restored without last_evaluated_at' do
|
|
303
|
+
obs_id = client.record_observation(content: 'obs', domain: :test)[:observation][:id]
|
|
304
|
+
hyp_id = client.generate_hypothesis(
|
|
305
|
+
content: 'old restored hyp',
|
|
306
|
+
observation_ids: [obs_id],
|
|
307
|
+
domain: :test,
|
|
308
|
+
simplicity: 0.5,
|
|
309
|
+
explanatory_power: 0.5
|
|
310
|
+
)[:hypothesis][:id]
|
|
311
|
+
engine = client.instance_variable_get(:@engine)
|
|
312
|
+
hypothesis = engine.find_by_domain(domain: :test).find { |hyp| hyp.id == hyp_id }
|
|
313
|
+
hypothesis.instance_variable_set(:@last_evaluated_at, nil)
|
|
314
|
+
|
|
315
|
+
result = client.update_abductive_reasoning
|
|
316
|
+
|
|
317
|
+
expect(result[:success]).to be true
|
|
318
|
+
expect(result[:decayed]).to eq(1)
|
|
319
|
+
end
|
|
301
320
|
end
|
|
302
321
|
|
|
303
322
|
describe '#abductive_reasoning_stats' do
|