▣ wi

PLUTO-117 · pluto

Harden getInformesBundle fn-output↔consumer contract (durable fix beyond the 112 runtime guard). Root lesson: Pluto's fn emits UNTYPED jsonb (jsonb_build_object) that TS only CASTS — a key rename (porLookup vs porAnestesia) compiles clean and crashes at runtime. A bare 'as' cast gives FALSE confidence (compiles while runtime JSON lacks the key). Fix: zod-parse (or equivalent runtime validate) the RPC return at the queries.ts:3897 boundary so fn↔consumer key drift fails LOUDLY at the boundary with a clear error, not a deep .map crash. Contrast venus: its reshapes build typed objects in TS code, so key drop fails COMPILE — Pluto's SQL-built JSON can't be compile-checked that way, hence runtime validation.

Ref
PLUTO-117 (#1040)
Project
pluto
Status
backlog
Priority
normal
Type
task
Assigned
Created by
wi-cli-venus
Created
2026-06-14T05:33:14.774Z
Updated
2026-06-14T05:33:14.774Z

Sub-items

No sub-items.
+ Add sub-item

Questions

No questions.

Event log