Commit 6cd8ff4
committed
test(ai): expect the preserved UI message id in the createdAt round-trip
`should preserve createdAt for assistant segments and tool results` asserted an
exact `toEqual` on the model messages without an `id`, so it broke on `main`
once #1066 started stamping `uiMessage.id` onto every model message a UI message
fans out into.
The two changes landed independently: #1066 merged first, but #1069's branch
predated it and was not re-tested before merge, so the conflict only appeared
after both were on `main`.
Fix the expectation rather than the converter. Propagating the id is the
intended behaviour from #1066 -- a single UI message can fan out into several
model messages and persistence needs the shared identity -- so dropping it
would revert that feature and break its own tests.1 parent f328b82 commit 6cd8ff4
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1334 | 1334 | | |
1335 | 1335 | | |
1336 | 1336 | | |
| 1337 | + | |
1337 | 1338 | | |
1338 | 1339 | | |
1339 | 1340 | | |
| |||
1346 | 1347 | | |
1347 | 1348 | | |
1348 | 1349 | | |
| 1350 | + | |
1349 | 1351 | | |
1350 | 1352 | | |
1351 | 1353 | | |
| |||
0 commit comments