lex-agentic-memory 0.1.37 → 0.1.38

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: 1d50530306440e9785fb5daf5e4b0a1b5ed7f4e8897758d63db2749b44bb3049
4
- data.tar.gz: 6a92e08a370322464f1c149e6b7e3d5c0ab076d137fb6934007d7f610ec3c792
3
+ metadata.gz: 69de94b29aa73fa12a7adb17e3c114d5d01dd6cfd89f076d77ed053ee1c0e663
4
+ data.tar.gz: dc9a817d778c429e27b1225daf790f5aaf2c87c2ad11ce3237b34c24730717ce
5
5
  SHA512:
6
- metadata.gz: 7b05da20183b1d7799fd2eafe2d7fe01cec596ccd4be2835197ba7ef44e55bf5c0ba7592616233949ad58de12a0c24cf555b9c68ec52daf97c25dddc79327202
7
- data.tar.gz: ed22f62934d8a013e870466839d7573714a064c0d56b42fbf7d00a412cf107cf69e2f33b3c5bbd18bf8c7ddb064e8bab0db9957f03dff80cc6419d30658515e0
6
+ metadata.gz: 68a898cb81e1e16dfbe001a150fd1c5254eac34dedd7477d17c13d360c19117ac4e8d82a402538b44d3d6f7f67bd67d6f87d4fc41d71005010c63d6cc7e58506
7
+ data.tar.gz: a52951edc85a09cb417eefafd057acd7be4ab723ced5b0a0fd65c0c89b8a9e6af5f1eebd9e5bdcc62b9154c421d311d3c0d1d4ec05d5934fcab5486eab21c928
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.38] - 2026-05-27
4
+ ### Fixed
5
+ - `PostgresStore#parse_json_or_raw` now requires matching start/end delimiters (`{}`/`[]`) before attempting JSON parse — eliminates 100k+/day error log spam from bracket-prefixed text content (e.g. `[trace_persistence] ...`) that triggered a self-amplifying feedback loop via RabbitMQ logging
6
+ - `PostgresStore#parse_json_array` applies same delimiter guard
7
+ - Removed error-level logging from JSON parse fallback path — non-parseable content is the expected "or_raw" code path, not an error condition
8
+
3
9
  ## [0.1.37] - 2026-05-17
4
10
  ### Added
5
11
  - `Memory::Diary` sub-module — per-agent chronological session diary with write, read, and search.
@@ -398,22 +398,26 @@ module Legion
398
398
  return raw unless raw.is_a?(String)
399
399
 
400
400
  stripped = raw.strip
401
- return raw unless stripped.start_with?('{', '[')
401
+ return raw unless (stripped.start_with?('{') && stripped.end_with?('}')) ||
402
+ (stripped.start_with?('[') && stripped.end_with?(']'))
402
403
 
403
404
  parsed = Legion::JSON.load(stripped)
404
405
  parsed.is_a?(Hash) || parsed.is_a?(Array) ? parsed : raw
405
406
  rescue StandardError => e
406
- log.error "[trace_persistence] parse_json_or_raw: #{e.message}"
407
+ log.debug "[trace_persistence] parse_json_or_raw: #{e.message}"
407
408
  raw
408
409
  end
409
410
 
410
411
  def parse_json_array(raw)
411
412
  return [] if raw.nil? || !raw.is_a?(String) || raw.strip.empty?
412
413
 
413
- result = Legion::JSON.load(raw)
414
+ stripped = raw.strip
415
+ return [] unless stripped.start_with?('[') && stripped.end_with?(']')
416
+
417
+ result = Legion::JSON.load(stripped)
414
418
  result.is_a?(Array) ? result : []
415
419
  rescue StandardError => e
416
- log.error "[trace_persistence] parse_json_array: #{e.message}"
420
+ log.debug "[trace_persistence] parse_json_array: #{e.message}"
417
421
  []
418
422
  end
419
423
 
@@ -4,7 +4,7 @@ module Legion
4
4
  module Extensions
5
5
  module Agentic
6
6
  module Memory
7
- VERSION = '0.1.37'
7
+ VERSION = '0.1.38'
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lex-agentic-memory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.37
4
+ version: 0.1.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity