Repository navigation
Conversation
…v2 swap Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FGWXecoauvZN2AYe1vkvgM
…equivalent options Adds pkgs/jsonx (V1 option set, Number, UseNumber) and cmd/jsonv2mod, the codemod that performs the swap mechanically. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FGWXecoauvZN2AYe1vkvgM
…and single-line imports intact Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FGWXecoauvZN2AYe1vkvgM
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…SON trailing-data check equal to Decoder.More TestCancellationInterruptsSleep dropped its only Progress signal when the run goroutine fired before the test reached the receive, then hung. ParseJSON used PeekKind()!=0, which accepts trailing garbage that v1 More() rejected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FGWXecoauvZN2AYe1vkvgM
…ent options Codemod plus hand fixes for streaming decoders, Indent/Compact and error classification. jsonx gains SyntaxError/TypeError (v2 with V1 options still returns the v1 error types) and SDKDecoder for SDK helpers taking *json.Decoder. Snapshot inventory golden updated for json.RawMessage -> jsontext.Value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FGWXecoauvZN2AYe1vkvgM
…gosec, unconvert) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FGWXecoauvZN2AYe1vkvgM
…ncoding/json/v2; add v1-import guard Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FGWXecoauvZN2AYe1vkvgM
…nt, unused nolint) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FGWXecoauvZN2AYe1vkvgM
Collaborator
Author
📊 Code Coverage Report
Tip This project maintains a minimum coverage threshold of 85%. Maintain or improve coverage on new code to ensure long-term stability. Last updated: Sun, 01 Nov 2026 23:30:56 GMT |
…CodeQL under json/v2 CodeQL sanitises v1 json.Marshal output for reflected-xss (JsonMarshalSanitizer) and does not model v2, so OCI/ssoadmin JSON writers were flagged. Write JSON via httputils.WriteJSONBytes (literal JSON Content-Type on a local writer plus nosniff). Add jsonx.Number.Int and constant int32 bounds checks where ParseInt(64) results were narrowed to int. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FGWXecoauvZN2AYe1vkvgM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FGWXecoauvZN2AYe1vkvgM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FGWXecoauvZN2AYe1vkvgM
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.
Migrates all JSON handling from
encoding/json(v1) toencoding/json/v2+encoding/json/jsontext. No GOEXPERIMENT/GODEBUG/env vars: Go 1.27 ships json/v2 by default; this changes import paths and call sites. Behaviour and wire output stay byte-identical.What changed
pkgs/jsonx— the only package that still imports v1 (it ownsjson.DefaultOptionsV1()):jsonx.V1()options passed on every Marshal/Unmarshal/stream call → identical output and v1 error text.jsonx.Number/UseNumber(),SDKDecoder(for AWS SDK helpers that need a v1*Decoder).IsSyntaxError/IsTypeError/SyntaxError/TypeError: with V1 options the v2 engine still returns the v1 error types, soerrors.Asonjsontext.SyntacticError/json.SemanticErrorsilently stops matching — these helpers accept both.NewEncoder, trailing-data checks viaInputOffset).cmd/jsonv2mod: AST codemod used for the bulk rewrite (~4,400 files across pkgs/, internal/, services/, test/, cmd/, dashboard/, demo/); unsafe sites were reported and hand-fixed.test/guards/jsonv1_import_guard_test.go: AST guard — noencoding/jsonimport outsidepkgs/jsonx(string-literal fixtures and testdata excluded).encoding/json/v2directly.Verification
ParseJSONtrailing-garbage acceptance introduced mid-migration; Glue token-lifetime panic; application auto scaling 500-vs-400 from the error-type assumption.json.RawMessage→jsontext.Value; persisted JSON unchanged.bd: gopherstack-9rpwg (closed)
🤖 Generated with Claude Code
https://claude.ai/code/session_01FGWXecoauvZN2AYe1vkvgM