fix: use json.Marshal instead of json.MarshalIndent for multipart data_json#823
Merged
dangrondahl merged 3 commits intomainfrom Apr 23, 2026
Merged
fix: use json.Marshal instead of json.MarshalIndent for multipart data_json#823dangrondahl merged 3 commits intomainfrom
dangrondahl merged 3 commits intomainfrom
Conversation
…a_json Pretty-printing the JSON in multipart form fields inflated payloads by ~2x, causing --attestation-data and --user-data to hit the server's 1024 KB per-part limit at ~400-500 KB on disk instead of the expected ~1 MB. Compact marshalling is sufficient — the server deserializes regardless of formatting. Closes #822
Contributor
|
Claude finished @dangrondahl's task in 1m 57s —— View job PR Review: fix: use json.Marshal instead of json.MarshalIndent for multipart data_json
Static AnalysisAll three checks pass cleanly — Review SummaryThis is a clean, well-scoped fix. The root cause (pretty-printed JSON doubling multipart payload size) is correctly identified, and the one-line fix at What's good:
One minor observation (non-blocking, posted as inline comment):
No issues found with correctness, security, or performance. LGTM. |
…tion Address PR review feedback: - Pretty-print compact JSON via json.Indent at PayloadOutput so dry-run/debug output remains readable - Assert raw JSON bytes contain no newlines (catches any indentation style, not just 4-space)
Verifies that PayloadOutput pretty-prints compact JSON at the logging site, so --dry-run output remains human-readable.
jumboduck
approved these changes
Apr 23, 2026
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
json.MarshalIndentwithjson.Marshalfor multipart formdata_jsonfields--attestation-dataand--user-datato hit the server's 1024 KB per-part limit at ~400-500 KB instead of ~1 MBCloses #822
Test plan
TestMultipartFieldJSON_IsCompactverifies compact JSON in multipart fields