deployangel 0.1.32 → 0.1.33

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: dc0a725bbc0873d53b333299c0c32268c446967c0b6a96ae75ccd1f2776e212b
4
- data.tar.gz: 50b6bac465113797a4071eaae246a654e10d58e2d635cd0ad65b7c23ad1aafb3
3
+ metadata.gz: eb68d7ed3170cb16932b6ab0de9304c4388e9df001067cf6c0b6678e92fae0d1
4
+ data.tar.gz: dc867b57741dc75e868284fd8a1f30450d756306fcb891f66331538dacf3486f
5
5
  SHA512:
6
- metadata.gz: 9f5fa19a8047154de5c567a974c2066209c00946b9bc070a400903f33c8c69f182242bdc8f226ddcf140ab07e5a96c7a947346c65d3d2e047986225bdc3ab857
7
- data.tar.gz: 17b73eb7db55b615df009cd4632bbf2f7833f5713096896d4a15505837acd3038ede32297eb5f8da40b1a72e6f140d38850db32bdece8d9d87d94ef6aa55c679
6
+ metadata.gz: 8427f099ce309a80180e0dbb3033e465e4d82c8ad6f0f72c803623594feb6b9a831a16e7ec25c21e866c792d0acfa50d39f453eb17b2d282f32bd765f8133be4
7
+ data.tar.gz: 4c19dc7ec0a6730724a466dc51b91f99bddf073b9dc3af480a584ee62417a7637543f64f8f9d4784be176416067162ad79200031e22ed180eb30c70da7ec7072
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.33 (2026-10-28)
4
+
5
+ - An exception whose message has bytes that aren't valid UTF-8, as a
6
+ message can when it quotes a malformed request, is now recorded. The bad
7
+ bytes become U+FFFD. Before, the agent dropped the exception with a
8
+ warning (`Encoding::CompatibilityError`), though the request's 500 still
9
+ counted.
10
+
3
11
  ## 0.1.32 (2026-10-21)
4
12
 
5
13
  - `deployangel mcp` starts without an API token. Each tool then answers with
@@ -55,7 +55,7 @@ module DeployAngel
55
55
  # Only quoted values, numbers, emails, UUIDs, and long hex are replaced;
56
56
  # unquoted words, such as a name in a message the app builds, are kept.
57
57
  def normalize_message(message, redactions = [])
58
- text = message.to_s.lines.first.to_s.strip
58
+ text = utf8(message.to_s).lines.first.to_s.strip
59
59
  redactions.each do |value, placeholder|
60
60
  text = text.gsub(/(?<![[:alnum:]])#{Regexp.escape(value)}(?![[:alnum:]])/i, placeholder)
61
61
  end
@@ -63,6 +63,15 @@ module DeployAngel
63
63
  text[0, MAX_MESSAGE]
64
64
  end
65
65
 
66
+ # A message can carry bytes from a request (a header, a path, a body)
67
+ # that aren't valid UTF-8, which matching and the JSON payload both
68
+ # reject, and the exception would go unrecorded. Bad bytes become U+FFFD.
69
+ def utf8(text)
70
+ text = text.dup.force_encoding(Encoding::UTF_8) if text.encoding == Encoding::BINARY
71
+ text = text.encode(Encoding::UTF_8, invalid: :replace, undef: :replace) unless text.encoding == Encoding::UTF_8
72
+ text.scrub
73
+ end
74
+
66
75
  def app_frame?(frame)
67
76
  frame.start_with?("app/", "lib/", "config/")
68
77
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeployAngel
4
- VERSION = "0.1.32"
4
+ VERSION = "0.1.33"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deployangel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.32
4
+ version: 0.1.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordan Owens