baseline.txt 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. > yaoyao@0.4.17 test
  2. > vitest run tests/client/chatCrossClientSync.test.ts
  3. RUN v3.2.7 /Users/samien/git/ordinary-chat-consistency/yaoyao
  4. ❯ tests/client/chatCrossClientSync.test.ts (16 tests | 4 failed) 4256ms
  5. ✓ cross-client chat subscriptions > subscribes a viewer before another device starts, then shows thinking, tools, text and completion 6ms
  6. ✓ cross-client chat subscriptions > restores a run opened before its first text, so tool events are not dropped 1ms
  7. ✓ cross-client chat subscriptions > restores a partial answer and appends later deltas without an extra row 1ms
  8. ✓ cross-client chat subscriptions > resubscribes an idle viewer after disconnection and discovers a remote run 1ms
  9. ✓ cross-client chat subscriptions > does not repeatedly resume a subscribed session when revisiting it 0ms
  10. × cross-client chat subscriptions > reconciles a background session after cache synchronization before reusing it 1012ms
  11. → expected [ '第一个问题', '旧的中间结果' ] to deeply equal [ '第一个问题', '后台完成的完整结果' ]
  12. × cross-client chat subscriptions > coalesces history invalidations that arrive while an older snapshot is loading 1056ms
  13. → expected [ '已过时快照' ] to deeply equal [ '较新完整历史' ]
  14. × cross-client chat subscriptions > merges synchronized history into the current route when SSE replaces its state during the read 1061ms
  15. → expected '旧正文' to be '之前的完整正文' // Object.is equality
  16. × cross-client chat subscriptions > keeps loaded older messages and follows up a synchronization received during pagination 1007ms
  17. → expected [ '旧的最新页' ] to deeply equal [ '之前加载的老消息', '补齐后的最新页' ]
  18. ✓ cross-client chat subscriptions > reconciles synchronized history before a delayed submit receipt without duplicating or demoting the user row 107ms
  19. ✓ cross-client chat subscriptions > settles a run and clears an interaction completed while the viewer was offline 2ms
  20. ✓ cross-client chat subscriptions > does not duplicate completed history from a retained inactive snapshot 0ms
  21. ✓ cross-client chat subscriptions > keeps history-only sessions unattached with owned=false 0ms
  22. ✓ cross-client chat subscriptions > keeps history-only sessions unattached with owned=undefined 0ms
  23. ✓ cross-client chat subscriptions > never creates a runtime for an unsent draft on ready 0ms
  24. ✓ cross-client chat subscriptions > retains readable history when subscribing fails and can retry on selection 0ms
  25. ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 4 ⎯⎯⎯⎯⎯⎯⎯
  26. FAIL tests/client/chatCrossClientSync.test.ts > cross-client chat subscriptions > reconciles a background session after cache synchronization before reusing it
  27. AssertionError: expected [ '第一个问题', '旧的中间结果' ] to deeply equal [ '第一个问题', '后台完成的完整结果' ]
  28. - Expected
  29. + Received
  30. [
  31. "第一个问题",
  32. - "后台完成的完整结果",
  33. + "旧的中间结果",
  34. ]
  35. ❯ tests/client/chatCrossClientSync.test.ts:136:82
  36. 134| expect(chat.messages).toEqual([])
  37. 135| await chat.selectSession(first, 'alpha')
  38. 136| await vi.waitFor(() => expect(chat.messages.map(message => message…
  39. | ^
  40. 137| expect(realtime.request.mock.calls.filter(([method]) => method ===…
  41. 138| })
  42. ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/4]⎯
  43. FAIL tests/client/chatCrossClientSync.test.ts > cross-client chat subscriptions > coalesces history invalidations that arrive while an older snapshot is loading
  44. AssertionError: expected [ '已过时快照' ] to deeply equal [ '较新完整历史' ]
  45. - Expected
  46. + Received
  47. [
  48. - "较新完整历史",
  49. + "已过时快照",
  50. ]
  51. ❯ tests/client/chatCrossClientSync.test.ts:156:82
  52. 154| emit('sessions.changed', { reason: 'cache.synced', profile: 'alpha…
  53. 155| release(page('已过时快照'))
  54. 156| await vi.waitFor(() => expect(chat.messages.map(message => message…
  55. | ^
  56. 157| expect(api.getMessages).toHaveBeenCalledTimes(3)
  57. 158| expect(chat.activeRouteState?.isLoadingHistory).toBe(false)
  58. ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/4]⎯
  59. FAIL tests/client/chatCrossClientSync.test.ts > cross-client chat subscriptions > merges synchronized history into the current route when SSE replaces its state during the read
  60. AssertionError: expected '旧正文' to be '之前的完整正文' // Object.is equality
  61. Expected: "之前的完整正文"
  62. Received: "旧正文"
  63. ❯ tests/client/chatCrossClientSync.test.ts:180:106
  64. 178| emit('message.delta', { text: '新回复正在继续' })
  65. 179| release(page('之前的完整正文'))
  66. 180| await vi.waitFor(() => expect(chat.messages.find(message => messag…
  67. | ^
  68. 181| expect(chat.messages.at(-1)?.content).toBe('新回复正在继续')
  69. 182| expect(chat.isStreaming).toBe(true)
  70. ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/4]⎯
  71. FAIL tests/client/chatCrossClientSync.test.ts > cross-client chat subscriptions > keeps loaded older messages and follows up a synchronization received during pagination
  72. AssertionError: expected [ '旧的最新页' ] to deeply equal [ '之前加载的老消息', '补齐后的最新页' ]
  73. - Expected
  74. + Received
  75. [
  76. - "之前加载的老消息",
  77. - "补齐后的最新页",
  78. + "旧的最新页",
  79. ]
  80. ❯ tests/client/chatCrossClientSync.test.ts:204:82
  81. 202| role: 'user', content: '之前加载的老消息', timestamp: 1, stage: 'settled…
  82. 203| await older
  83. 204| await vi.waitFor(() => expect(chat.messages.map(message => message…
  84. | ^
  85. 205| expect(api.getMessages).toHaveBeenCalledTimes(3)
  86. 206| expect(chat.activeRouteState?.isLoadingHistory).toBe(false)
  87. ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[4/4]⎯
  88. Test Files 1 failed (1)
  89. Tests 4 failed | 12 passed (16)
  90. Start at 07:06:49
  91. Duration 4.66s (transform 70ms, setup 10ms, collect 101ms, tests 4.26s, environment 148ms, prepare 28ms)