ez_logs_agent 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 +4 -4
- data/CHANGELOG.md +16 -0
- data/lib/ez_logs_agent/sanitizer.rb +16 -0
- data/lib/ez_logs_agent/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 45c8553757f1910ef31222e012e48b699b7ab5c4345d631c3bbcce370fc27363
|
|
4
|
+
data.tar.gz: 2f966ab6c6886970603e637b11015c1201b032b44c2f7d9996513a88de7d01eb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '08d182e4ac18aee7b2104b7c52c0b6e240de2b613c0815851663a5933f2bb62f2f7ce9a43c1d6be370078820121b5498ad3d95ff2e68da8f8faee2f6bc062449'
|
|
7
|
+
data.tar.gz: fb8b9a2cbc66f62bb8e0a054cc11e1fb0b25d741d910f25136e12700571197ac8371669a080259d2631b32d61e3dbbdfbc359134e173c6d95ce70fa3fc753af7
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.1.9] — 2026-06-05
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- `Sanitizer` no longer collapses ActiveJob record references
|
|
9
|
+
(`{"_aj_globalid" => "gid://app/Model/id"}`) to `"[Object]"` at the
|
|
10
|
+
depth-3 cap. These one-key wrapper hashes pass through verbatim so
|
|
11
|
+
the server can display *which* record a job ran on
|
|
12
|
+
(e.g. ActionMailer's `Record 1` field now reads `User #42` instead
|
|
13
|
+
of `[Object]`).
|
|
14
|
+
|
|
15
|
+
The carve-out is narrow: only the exact `{"_aj_globalid" => "gid://..."}`
|
|
16
|
+
shape is exempt. Multi-key hashes, non-GID values, and any other
|
|
17
|
+
nested structure still hit the existing graph-protection rules
|
|
18
|
+
(depth cap, array truncation, non-primitive collapse) unchanged. No
|
|
19
|
+
wire-format change.
|
|
20
|
+
|
|
5
21
|
## [0.1.8] — 2026-05-29
|
|
6
22
|
|
|
7
23
|
### Changed
|
|
@@ -96,6 +96,12 @@ module EzLogsAgent
|
|
|
96
96
|
private
|
|
97
97
|
|
|
98
98
|
def sanitize_nested_object(hash, depth)
|
|
99
|
+
# ActiveJob serializes record refs as `{"_aj_globalid" => "gid://..."}`.
|
|
100
|
+
# Preserve these even past the depth limit so a record reference
|
|
101
|
+
# survives the [Object] collapse and the server can display WHICH
|
|
102
|
+
# record the job ran on. Display formatting (gid → "User #42") is
|
|
103
|
+
# the server's job; the agent's job is to keep the data on the wire.
|
|
104
|
+
return hash if global_id_hash?(hash)
|
|
99
105
|
return "[Object]" if depth >= MAX_NESTING_DEPTH
|
|
100
106
|
return {} if hash.empty?
|
|
101
107
|
|
|
@@ -145,6 +151,16 @@ module EzLogsAgent
|
|
|
145
151
|
value.is_a?(TrueClass) ||
|
|
146
152
|
value.is_a?(FalseClass)
|
|
147
153
|
end
|
|
154
|
+
|
|
155
|
+
# True iff `hash` is the exact one-key shape ActiveJob uses to serialize
|
|
156
|
+
# an ActiveRecord (or any GlobalID::Identification) argument:
|
|
157
|
+
# `{"_aj_globalid" => "gid://..."}`. Used to exempt these hashes from
|
|
158
|
+
# the depth-limit collapse so the wire still carries the record ref.
|
|
159
|
+
def global_id_hash?(hash)
|
|
160
|
+
return false unless hash.is_a?(Hash) && hash.size == 1
|
|
161
|
+
gid = hash["_aj_globalid"] || hash[:_aj_globalid]
|
|
162
|
+
gid.is_a?(String) && gid.start_with?("gid://")
|
|
163
|
+
end
|
|
148
164
|
end
|
|
149
165
|
end
|
|
150
166
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ez_logs_agent
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- dezsirazvan
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-05
|
|
10
|
+
date: 2026-06-05 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: request_store
|