Skip to content

Commit 1960d38

Browse files
rosaclaude
andcommitted
Correct which characters grow when the failed execution error is escaped
The error column is serialized with Ruby's JSON, which escapes quotes but leaves <, > and & alone. Only Active Support's JSON encoder turns those into six-byte sequences. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent c202f0a commit 1960d38

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎test/models/solid_queue/failed_execution_test.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class SolidQueue::FailedExecutionTest < ActiveSupport::TestCase
5858

5959
test "account for JSON escaping when fitting the error column" do
6060
with_error_column_limit(1_000) do
61-
# Quotes take two bytes once escaped, and HTML characters up to six
61+
# Quotes take two bytes once escaped. The error column uses Ruby's JSON, which leaves <, > and & as they are
6262
execution = fail_job_with ExpectedTestError.new("\"<>&" * 200), backtrace: [ "app/models/thing.rb:1:in 'do_it'" ]
6363

6464
assert_fits_error_column execution, limit: 1_000

0 commit comments

Comments
 (0)