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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9464eb037323572427ed2bde52b57de8f9024896e512babfb4874e84c061f1a7
4
- data.tar.gz: 30343f620c001416c037c6083d52a283b821eb562c167e38e5d32662e9fcd036
3
+ metadata.gz: aab6451e969d15dec0c0611253cda68bf6395f73c94a107fb40bd6ac7906bfab
4
+ data.tar.gz: 35f5f2e847b918d8f39418ea2db34143cb7541051b39a904194c15cb5b7ea8ef
5
5
  SHA512:
6
- metadata.gz: 4771d2b480c7465685af5eae93b338423ab573a68849761f62d733d5aae564c1c30e5e0589fe637b7ece96160ff81208a10cca58b880703bae2523e48831f1c0
7
- data.tar.gz: 2d6e614af682bd2f7a887a7693204df0ce74ac4e8e32fc49338d578c77f137d50f9190665e77eafbdccfaa1526acca4ab687a029c238bb02273d2e77f73a2007
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,
@@ -4,7 +4,7 @@ module Legion
4
4
  module Extensions
5
5
  module Agentic
6
6
  module Inference
7
- VERSION = '0.1.8'
7
+ VERSION = '0.1.9'
8
8
  end
9
9
  end
10
10
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lex-agentic-inference
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity