Commit 94809a8
authored
main is red on ui:typecheck, which blocks every open PR.
#9659/#9815 correctly tightened ChatActionDispatchResult from a loose
`{ ok: boolean; status: string; ... }` into a union discriminated on `ok`, so the
miner MCP server's refusal -> error-code mapping could finally be checked. But
this miner-UI test mocks the dispatcher with a bare object literal, whose
`ok`/`status` widen to boolean/string on inference -- and a widened literal no
longer satisfies the closed union.
Annotate the mock's return type (and import the real type) so it is validated
against the shipped contract instead of inference. That also stops the mock
drifting from the union the next time it changes -- the widened version would
have kept compiling against any shape at all.
1 parent 5cc8d1f commit 94809a8
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
288 | 289 | | |
289 | 290 | | |
290 | 291 | | |
291 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
292 | 297 | | |
293 | 298 | | |
294 | 299 | | |
| |||
0 commit comments