Commit 8f74771
dispatch: propagate field-name/count mismatch as RpcError
Conform-failure was being silently swallowed for both transports after
61025e1/589a95f, which let exchange handlers run on a wrong-shape input
batch. For column-name/count mismatches the handler then either picked
up the wrong column by index or hung the client (the conformance test
TestExchangeCastCompatible::test_cast_incompatible_column_name[pipe]
deadlocked end-to-end and tripped the 90s CI step timeout).
Tighten the catch in both src/dispatch/stream.ts and
src/http/dispatch.ts: TypeError (the only failure mode for field
name/count mismatch in conformBatchToSchema) is rethrown so callers see
a structured RpcError. Other conform failures (numeric cast issues for
dynamic-input handlers) still fall through with the original batch;
handlers that genuinely bind their input shape per call should set
state.__inputSchema so the conform check is bypassed entirely.
Local: 127/127 unit + 898/898 conformance pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 594f742 commit 8f74771
2 files changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
141 | 148 | | |
142 | 149 | | |
143 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
280 | 284 | | |
281 | 285 | | |
282 | 286 | | |
| |||
0 commit comments