feat: adopt Go 1.27 JSON v2 semantics - #1475
Conversation
3731e3a to
a0389b2
Compare
roborev: Combined Review (
|
roborev: Combined Review (
|
Move the project to Go 1.27 so all JSON encoding and decoding uses the new standard-library semantics without legacy compatibility paths. This removes custom checkpoint machinery and makes the JSONL readers easier to audit. Use the new generic methods, inference, promoted struct-literal fields, and error helpers where they remove repeated adapter code. Pin golangci-lint v2.13.0 because earlier releases cannot analyze the Go 1.27 language level.
The usage rollup work added a benchmark seed after this branch migrated message token data to JSON v2. Use the same v2 value type so the rebased test package compiles and measures the production representation.
Use JSON v2 consistently at typed HTTP and session rewrite boundaries. This rejects duplicate object names and keeps untouched large integers exact instead of converting them through float64. Deterministic derived JSON preserves byte-level artifact identities.
The large-number regression inserted a native temporary path directly into JSON. Windows backslashes made that input malformed, so the resolver returned the original line before the test reached the behavior it was meant to cover. Encode path-bearing strings as JSON so every platform exercises the same persisted-result rewrite contract.
f3044da to
27d14b6
Compare
roborev: Combined Review (
|
Moves AgentsView to Go 1.27 and adopts native
encoding/json/v2behaviorthroughout. This is a clean migration with no JSON v1 compatibility or
checkpoint fallback paths.
Typed Huma routes now share JSON v2 request and response semantics with the
rest of the application. OpenAPI continues to describe token usage as
arbitrary JSON. JSONL rewrite paths retain untouched values as raw JSON, so
large integers stay exact, while stored map output is deterministic where bytes
define artifact identity.
The Go 1.27 audit also adopts generic methods, assignment-context inference,
promoted fields in struct literals,
errors.AsType, and relatedstandard-library simplifications. Build images, local tooling, documentation,
and reviewer guidance now require Go 1.27. golangci-lint is pinned to v2.13.0,
which can analyze the new language level.