▣ wi

New work item

Sub-item of #1040 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. · pluto