Repository navigation
Conversation
yeahjack
marked this pull request as ready for review
October 9, 2026 17:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #39.
Pass serialized JSON to
PrintInfofthrough a constant%sformat string so literal percent characters are preserved. Previously,fmt.Sprintfinterpreted the JSON as a format string, corrupting text and sometimes producing invalid JSON. For example,{"text":"50%"}became{"data":{"text":"50%!"(MISSING)}}.Add regression coverage for
jsonandjson-pretty, including nested JSON, plain-text fallback data, percent-encoded URLs, literal formatting verbs, percent characters intrace_id/message, valid JSON, and the trailing newline. All fixtures are synthetic and require no authentication or API calls.The diff is limited to the output fix and its tests.
Validation
Using Go 1.27.1 on Linux:
go test -count=1 ./internal/outputpassesgo test -race -count=1 ./internal/outputpassesgo vet ./internal/outputpassesgo build -buildvcs=falsepassesgofmtchecks for repository Go files andgit diff --checkpassgo test ./...was run on both the changed tree and a clean copy of base commit e631b35. Both runs fail the same 39 existing tests in this environment:cmd/eventandinternal/event/bus: Unix sockets are denied (socket: operation not permitted), causing bus startup tests to failinternal/core/browser: no graphical environment is availableinternal/core/thttp:TestNewClientmakes a live request tohttps://www.baidu.com/, which hits the existing 3-second timeout here; the test then dereferences a nil responseThese unrelated failures are unchanged by this PR. The output package passes in the full-suite run.