ask-agent 0.40.21 → 0.40.22

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: 8119f78526cac8f96b7f6506c1d40e046127dccad46015252e9ea0805e15c677
4
- data.tar.gz: be381f8d8fbb4b104ba79ab0a1cece93918c8ef028bfdb4fc24dd6ae49399726
3
+ metadata.gz: 6713f113e69946f98ab4019c6b90eb468a5eecec1eab2e5a96ba6f8e108fa2b0
4
+ data.tar.gz: 1719d26318d52e0651f5e802aa9f0bf3b7ca3c207fdb0818e46a4ede4f699886
5
5
  SHA512:
6
- metadata.gz: aee841408cd187f95b2d54f6bbb0820fac09865bf58f1af38680b1847088a8aca7c1a187008e93a98a6cf39941fd65e0690dd78a16b6d07491c6d0ec0573bcf2
7
- data.tar.gz: c6b6c736800ae14baa95355f692294da8f428af180c404852a5aa9141905d5bfb776994f59aab21e772f3263e40c3c542b32009cee779f1263ade62c8d095cb5
6
+ metadata.gz: 01fba503b839e0264ff74ef6389c2405a61fe640875e8a71f13228a18290e6d466c94b7033f731dbc212d344edf2f33cd046f20135ac78af70150e8aa0849f02
7
+ data.tar.gz: 7370acda823576994f58ca3f54f12f0fd279da4c81526751d31020e2cb1d77ba69ed9a2c942c87c493849d7d50742e1e9598cd30542502ffc3606721e9865061
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ### Fixed
4
+
5
+ - **`SessionAdapter.resume` surfaces every ask-session miss as
6
+ `SessionAdapter::Error`.** The `Host#events` lookup ran outside the
7
+ `Ask::Session::NotFoundError` rescue, so a missing record reported by the
8
+ events fetch leaked the ask-session error across the adapter boundary
9
+ instead of the documented `SessionAdapter::Error`.
10
+
3
11
 
4
12
  ## [0.40.21] — 2026-09-22
5
13
 
@@ -52,9 +52,9 @@ module Ask
52
52
 
53
53
  # Attach to an existing ask-session and restore the latest snapshot.
54
54
  #
55
- # Contract: Ask::Session::Host#session raises
56
- # Ask::Session::NotFoundError for a missing record (it never returns
57
- # nil); both missing-session and missing-snapshot failures surface as
55
+ # Contract: Ask::Session::Host raises Ask::Session::NotFoundError for
56
+ # a missing record on both #session and #events (it never returns
57
+ # nil); missing-session and missing-snapshot failures surface as
58
58
  # SessionAdapter::Error.
59
59
  #
60
60
  # @param agent [Ask::Agent::Session] the agent session (will be populated from snapshot)
@@ -65,11 +65,11 @@ module Ask
65
65
  def self.resume(agent:, host:, session_id:)
66
66
  begin
67
67
  host.session(session_id)
68
+ events = host.events(session_id)
68
69
  rescue Ask::Session::NotFoundError
69
70
  raise Error, "Session not found: #{session_id.inspect}"
70
71
  end
71
72
 
72
- events = host.events(session_id)
73
73
  snapshot_event = events.reverse_each.find { |e| e.type == SNAPSHOT_TYPE }
74
74
  raise Error, "No snapshot found for session #{session_id.inspect}" unless snapshot_event
75
75
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ask
4
4
  module Agent
5
- VERSION = "0.40.21"
5
+ VERSION = "0.40.22"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ask-agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.40.21
4
+ version: 0.40.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto