lex-agentic-defense 0.1.10 → 0.1.11
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 +7 -0
- data/lib/legion/extensions/agentic/defense/extinction/helpers/protocol_state.rb +8 -9
- data/lib/legion/extensions/agentic/defense/extinction/runners/extinction.rb +4 -4
- data/lib/legion/extensions/agentic/defense/extinction/version.rb +1 -1
- data/lib/legion/extensions/agentic/defense/version.rb +1 -1
- 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: 04de0f8db49067510bfca89be592029c22ee49b658a37594b833b8d0cf679e53
|
|
4
|
+
data.tar.gz: 8211375022a5be1d4a830faa5ca509b045ff1ac1a0b56e38fb4b6e4c19adfc87
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b02bc0f3c34e2278f72e74841db5a9bdec9e89ad67e250eafedff87347e59253ccbf963b5121d71814ef6d5100e7bc6ea28a464ee47de3c6b5a2b65f1850ec25
|
|
7
|
+
data.tar.gz: d73484ab315c373ae67a1d40460d90762b9d086a499ebef13b31bdbf0f9783ca1b3af299bb0b5f46cebe49c7e0b6ada489648ee7b2bf51e458c1a064c330cb99
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.11] - 2026-06-01
|
|
4
|
+
### Fixed
|
|
5
|
+
- Extinction sub-module `VERSION` corrected from `0.2.0` to `0.1.0` — aligns with sibling sub-modules.
|
|
6
|
+
- `ProtocolState#load_from_local` no longer uses `.max()` to reconcile in-memory vs. DB level, preventing silent reversion of de-escalation on restart.
|
|
7
|
+
- `ProtocolState#save_to_local` now uses an atomic upsert (update-then-insert-if-zero) instead of a check-then-act pattern, eliminating a race condition.
|
|
8
|
+
- `ProtocolState#parse_history` now logs errors instead of silently returning an empty array.
|
|
9
|
+
|
|
3
10
|
## [0.1.10] - 2026-05-07
|
|
4
11
|
### Fixed
|
|
5
12
|
- Extinction protocol authority checks now accept string authorities from JSON/API callers.
|
|
@@ -67,19 +67,17 @@ module Legion
|
|
|
67
67
|
def save_to_local
|
|
68
68
|
return unless local_persistence_connected?
|
|
69
69
|
|
|
70
|
-
|
|
71
|
-
id: 1,
|
|
70
|
+
payload = {
|
|
72
71
|
current_level: @current_level,
|
|
73
72
|
active: @active,
|
|
74
73
|
history: ::JSON.dump(@history.map { |h| h.merge(at: h[:at].to_s) }),
|
|
75
74
|
updated_at: Time.now.utc
|
|
76
75
|
}
|
|
77
76
|
db = local_persistence_connection
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
end
|
|
77
|
+
|
|
78
|
+
# Atomic upsert — avoids check-then-act race condition
|
|
79
|
+
existing = db[:extinction_state].where(id: 1).update(payload)
|
|
80
|
+
db[:extinction_state].insert(id: 1, **payload) if existing.zero?
|
|
83
81
|
true
|
|
84
82
|
rescue StandardError => e
|
|
85
83
|
log.error("lex-extinction: save_to_local failed: #{e.message}")
|
|
@@ -101,7 +99,7 @@ module Legion
|
|
|
101
99
|
return unless row
|
|
102
100
|
|
|
103
101
|
db_level = row[:current_level].to_i
|
|
104
|
-
@current_level =
|
|
102
|
+
@current_level = db_level
|
|
105
103
|
@active = [true, 1].include?(row[:active])
|
|
106
104
|
@history = parse_history(row[:history])
|
|
107
105
|
true
|
|
@@ -121,7 +119,8 @@ module Legion
|
|
|
121
119
|
at: Time.parse(h[:at].to_s)
|
|
122
120
|
)
|
|
123
121
|
end
|
|
124
|
-
rescue StandardError =>
|
|
122
|
+
rescue StandardError => e
|
|
123
|
+
log.error("lex-extinction: parse_history failed: #{e.message}")
|
|
125
124
|
[]
|
|
126
125
|
end
|
|
127
126
|
|
|
@@ -116,11 +116,11 @@ module Legion
|
|
|
116
116
|
return unless defined?(Legion::Extensions::Apollo::Runners::Knowledge)
|
|
117
117
|
|
|
118
118
|
begin
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
log.warn('[extinction] apollo erasure propagated')
|
|
119
|
+
eraser = Object.new.tap { |o| o.extend(Legion::Extensions::Apollo::Runners::Knowledge) }
|
|
120
|
+
eraser.handle_erasure_request(agent_id: 'system:extinction')
|
|
121
|
+
log.warn('[extinction] apollo erasure propagated via runner fallback')
|
|
122
122
|
rescue StandardError => e
|
|
123
|
-
log.error("[extinction] apollo erasure failed: #{e.message}")
|
|
123
|
+
log.error("[extinction] apollo erasure fallback failed: #{e.message}")
|
|
124
124
|
end
|
|
125
125
|
end
|
|
126
126
|
|