You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
M2: Unknown* concrete-type serialization does not reproduce the raw document (F07) #19
Source: multi-agent review of PR #16, verifier CONFIRMED · medium · public API · all seven Unknown* carriers. 2026-08-13. M-anchor: M2 opening hardening batch.
UnknownOpenCodeError.Payload is public and not ignored (src/OpenCode.Sdk/Models/UnknownOpenCodeError.cs:32). The union converter is attached to the OpenCodeError base and writes Payload.WriteTo only when dispatch goes through the base; concrete source-generated metadata treats the carrier as an ordinary record and emits {"_tag":...,"Payload":{...}} instead of the preserved original JSON. Same shape on the other six carriers. SDK's own HTTP I/O is unaffected (uses union-base metadata); consumer serialization of a concrete carrier is affected.
Fix (verifier-corrected): change UnionEmitter to attach a concrete-type converter whose write path calls Payload.WriteTo. Do not use [JsonIgnore] alone — that would keep only the marker and discard the preserved body. Keep Payload public. Add concrete-type round-trip tests across representative carriers. Regenerate committed output.
Activity
fix(generator): reproduce the raw document through concrete Unknown* …