session-prompt.test.ts 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608
  1. import { describe, expect } from "bun:test"
  2. import { DateTime, Effect, Fiber, Layer, Stream } from "effect"
  3. import { eq } from "drizzle-orm"
  4. import { Database } from "@opencode-ai/core/database/database"
  5. import { EventV2 } from "@opencode-ai/core/event"
  6. import { EventTable } from "@opencode-ai/core/event/sql"
  7. import { SessionEvent } from "@opencode-ai/core/session/event"
  8. import { Project } from "@opencode-ai/core/project"
  9. import { ProjectTable } from "@opencode-ai/core/project/sql"
  10. import { AbsolutePath } from "@opencode-ai/core/schema"
  11. import { SessionV2 } from "@opencode-ai/core/session"
  12. import { Prompt } from "@opencode-ai/core/session/prompt"
  13. import { SessionMessage } from "@opencode-ai/core/session/message"
  14. import { SessionProjector } from "@opencode-ai/core/session/projector"
  15. import { SessionExecution } from "@opencode-ai/core/session/execution"
  16. import { SessionInput } from "@opencode-ai/core/session/input"
  17. import { SessionInputTable, SessionMessageTable, SessionTable } from "@opencode-ai/core/session/sql"
  18. import { SessionStore } from "@opencode-ai/core/session/store"
  19. import { testEffect } from "./lib/effect"
  20. const database = Database.layerFromPath(":memory:")
  21. const events = EventV2.layer.pipe(Layer.provide(database))
  22. const projector = SessionProjector.layer.pipe(Layer.provide(events), Layer.provide(database))
  23. const store = SessionStore.layer.pipe(Layer.provide(database))
  24. const executionCalls: SessionV2.ID[] = []
  25. const interruptCalls: SessionV2.ID[] = []
  26. const interruptSeqs: Array<number | undefined> = []
  27. const wakeCalls: SessionV2.ID[] = []
  28. const wakeSeqs: Array<number | undefined> = []
  29. const execution = Layer.succeed(
  30. SessionExecution.Service,
  31. SessionExecution.Service.of({
  32. resume: (sessionID) =>
  33. Effect.sync(() => {
  34. executionCalls.push(sessionID)
  35. }),
  36. interrupt: (sessionID, seq) =>
  37. Effect.sync(() => {
  38. interruptCalls.push(sessionID)
  39. interruptSeqs.push(seq)
  40. }),
  41. wake: (sessionID, seq) =>
  42. Effect.sync(() => {
  43. wakeCalls.push(sessionID)
  44. wakeSeqs.push(seq)
  45. }),
  46. }),
  47. )
  48. const sessions = SessionV2.layer.pipe(
  49. Layer.provide(events),
  50. Layer.provide(database),
  51. Layer.provide(store),
  52. Layer.provide(Project.defaultLayer),
  53. Layer.provide(execution),
  54. )
  55. const it = testEffect(Layer.mergeAll(database, events, projector, store, execution, sessions))
  56. const sessionID = SessionV2.ID.make("ses_prompt_test")
  57. const messageID = SessionMessage.ID.create()
  58. const setup = Effect.gen(function* () {
  59. const { db } = yield* Database.Service
  60. yield* db
  61. .insert(ProjectTable)
  62. .values({ id: Project.ID.global, worktree: AbsolutePath.make("/project"), sandboxes: [] })
  63. .onConflictDoNothing()
  64. .run()
  65. .pipe(Effect.orDie)
  66. yield* db
  67. .insert(SessionTable)
  68. .values({
  69. id: sessionID,
  70. project_id: Project.ID.global,
  71. slug: "test",
  72. directory: "/project",
  73. title: "test",
  74. version: "test",
  75. })
  76. .onConflictDoNothing()
  77. .run()
  78. .pipe(Effect.orDie)
  79. })
  80. const admitted = (id: SessionMessage.ID) => Database.Service.use(({ db }) => SessionInput.find(db, id))
  81. const admittedCount = Database.Service.use(({ db }) =>
  82. db
  83. .select()
  84. .from(SessionInputTable)
  85. .all()
  86. .pipe(
  87. Effect.orDie,
  88. Effect.map((rows) => rows.length),
  89. ),
  90. )
  91. const eventCount = (type: string) =>
  92. Database.Service.use(({ db }) =>
  93. db
  94. .select()
  95. .from(EventTable)
  96. .where(eq(EventTable.type, type))
  97. .all()
  98. .pipe(
  99. Effect.orDie,
  100. Effect.map((rows) => rows.length),
  101. ),
  102. )
  103. const interruptEvent = Database.Service.use(({ db }) =>
  104. db
  105. .select()
  106. .from(EventTable)
  107. .where(eq(EventTable.type, "session.next.interrupt.requested.1"))
  108. .get()
  109. .pipe(Effect.orDie),
  110. )
  111. describe("SessionV2.prompt", () => {
  112. it.effect("delegates execution continuation through SessionExecution", () =>
  113. Effect.gen(function* () {
  114. yield* setup
  115. const session = yield* SessionV2.Service
  116. executionCalls.length = 0
  117. wakeCalls.length = 0
  118. yield* session.resume(sessionID)
  119. expect(executionCalls).toEqual([sessionID])
  120. expect(wakeCalls).toEqual([])
  121. }),
  122. )
  123. it.effect("delegates interruption through SessionExecution", () =>
  124. Effect.gen(function* () {
  125. yield* setup
  126. const session = yield* SessionV2.Service
  127. interruptCalls.length = 0
  128. interruptSeqs.length = 0
  129. yield* session.interrupt(sessionID)
  130. expect(interruptCalls).toEqual([sessionID])
  131. expect(interruptSeqs).toHaveLength(1)
  132. expect(typeof interruptSeqs[0]).toBe("number")
  133. expect(yield* eventCount("session.next.interrupt.requested.1")).toBe(1)
  134. expect(yield* interruptEvent).toMatchObject({ aggregate_id: sessionID, seq: interruptSeqs[0] })
  135. expect(yield* session.messages({ sessionID })).toEqual([])
  136. }),
  137. )
  138. it.effect("delegates interruption without requiring a recorded Session", () =>
  139. Effect.gen(function* () {
  140. const session = yield* SessionV2.Service
  141. interruptCalls.length = 0
  142. interruptSeqs.length = 0
  143. yield* session.interrupt(SessionV2.ID.make("ses_missing"))
  144. expect(interruptCalls).toEqual([SessionV2.ID.make("ses_missing")])
  145. expect(interruptSeqs).toEqual([undefined])
  146. }),
  147. )
  148. it.effect("durably admits one user message before transcript promotion", () =>
  149. Effect.gen(function* () {
  150. yield* setup
  151. const session = yield* SessionV2.Service
  152. const message = yield* session.prompt({
  153. sessionID,
  154. prompt: new Prompt({ text: "Fix the failing tests" }),
  155. resume: false,
  156. })
  157. expect(message.prompt.text).toBe("Fix the failing tests")
  158. expect(yield* session.messages({ sessionID })).toEqual([])
  159. expect(yield* admitted(message.id)).toMatchObject({
  160. id: message.id,
  161. sessionID,
  162. prompt: { text: "Fix the failing tests" },
  163. delivery: "steer",
  164. })
  165. }),
  166. )
  167. it.effect("streams durable Session events after an aggregate cursor", () =>
  168. Effect.gen(function* () {
  169. yield* setup
  170. const session = yield* SessionV2.Service
  171. const events = yield* EventV2.Service
  172. const { db } = yield* Database.Service
  173. const fiber = yield* session.events({ sessionID }).pipe(Stream.take(4), Stream.runCollect, Effect.forkScoped)
  174. yield* Effect.yieldNow
  175. yield* session.prompt({ sessionID, prompt: new Prompt({ text: "First" }), resume: false })
  176. yield* session.prompt({ sessionID, prompt: new Prompt({ text: "Second" }), resume: false })
  177. yield* SessionInput.promoteSteers(db, events, sessionID, Number.MAX_SAFE_INTEGER)
  178. const streamed = Array.from(yield* Fiber.join(fiber))
  179. expect(streamed.map((event) => [event.cursor, event.event.type])).toEqual([
  180. [EventV2.Cursor.make(0), "session.next.prompt.admitted"],
  181. [EventV2.Cursor.make(1), "session.next.prompt.admitted"],
  182. [EventV2.Cursor.make(2), "session.next.prompt.promoted"],
  183. [EventV2.Cursor.make(3), "session.next.prompt.promoted"],
  184. ])
  185. expect(
  186. Array.from(
  187. yield* session.events({ sessionID, after: streamed[0]!.cursor }).pipe(Stream.take(1), Stream.runCollect),
  188. ).map((event) => [event.cursor, event.event.type]),
  189. ).toEqual([[EventV2.Cursor.make(1), "session.next.prompt.admitted"]])
  190. }),
  191. )
  192. it.effect("resumes through a recorded message without appending another prompt", () =>
  193. Effect.gen(function* () {
  194. yield* setup
  195. const session = yield* SessionV2.Service
  196. const message = yield* session.prompt({
  197. sessionID,
  198. prompt: new Prompt({ text: "Fix the failing tests" }),
  199. resume: false,
  200. })
  201. executionCalls.length = 0
  202. wakeCalls.length = 0
  203. yield* session.resume(sessionID)
  204. expect(yield* session.messages({ sessionID })).toEqual([])
  205. expect(yield* admitted(message.id)).not.toHaveProperty("promotedSeq")
  206. expect(executionCalls).toEqual([sessionID])
  207. expect(wakeCalls).toEqual([])
  208. }),
  209. )
  210. it.effect("records distinct messages when the ID is omitted", () =>
  211. Effect.gen(function* () {
  212. yield* setup
  213. const session = yield* SessionV2.Service
  214. const input = { sessionID, prompt: new Prompt({ text: "Fix the failing tests" }), resume: false }
  215. const first = yield* session.prompt(input)
  216. const second = yield* session.prompt(input)
  217. expect(second.id).not.toBe(first.id)
  218. expect(yield* session.messages({ sessionID })).toEqual([])
  219. expect(yield* admittedCount).toBe(2)
  220. }),
  221. )
  222. it.effect("returns the original recorded message when the ID is retried", () =>
  223. Effect.gen(function* () {
  224. yield* setup
  225. const session = yield* SessionV2.Service
  226. const input = {
  227. sessionID,
  228. id: messageID,
  229. prompt: new Prompt({ text: "Fix the failing tests" }),
  230. resume: false,
  231. }
  232. const first = yield* session.prompt(input)
  233. const retried = yield* session.prompt(input)
  234. expect(retried).toEqual(first)
  235. expect(yield* session.messages({ sessionID })).toEqual([])
  236. expect(yield* admittedCount).toBe(1)
  237. }),
  238. )
  239. it.effect("wakes execution when an exact prompt retry recovers a committed message", () =>
  240. Effect.gen(function* () {
  241. yield* setup
  242. const session = yield* SessionV2.Service
  243. const input = {
  244. sessionID,
  245. id: messageID,
  246. prompt: new Prompt({ text: "Recover committed prompt" }),
  247. resume: false,
  248. }
  249. const first = yield* session.prompt(input)
  250. wakeCalls.length = 0
  251. const retried = yield* session.prompt({ ...input, resume: true })
  252. expect(retried).toEqual(first)
  253. expect(wakeCalls).toEqual([sessionID])
  254. }),
  255. )
  256. it.effect("rejects reuse of one ID with a different prompt", () =>
  257. Effect.gen(function* () {
  258. yield* setup
  259. const session = yield* SessionV2.Service
  260. yield* session.prompt({
  261. sessionID,
  262. id: messageID,
  263. prompt: new Prompt({ text: "Fix the failing tests" }),
  264. })
  265. const failure = yield* session
  266. .prompt({
  267. sessionID,
  268. id: messageID,
  269. prompt: new Prompt({ text: "Delete the failing tests" }),
  270. resume: false,
  271. })
  272. .pipe(Effect.flip)
  273. expect(failure._tag).toBe("Session.PromptConflictError")
  274. expect(yield* session.messages({ sessionID })).toHaveLength(0)
  275. expect(yield* admittedCount).toBe(1)
  276. }),
  277. )
  278. it.effect("rejects reuse of one ID with a different delivery mode", () =>
  279. Effect.gen(function* () {
  280. yield* setup
  281. const session = yield* SessionV2.Service
  282. yield* session.prompt({
  283. id: messageID,
  284. sessionID,
  285. prompt: new Prompt({ text: "Fix the failing tests" }),
  286. resume: false,
  287. })
  288. const failure = yield* session
  289. .prompt({
  290. id: messageID,
  291. sessionID,
  292. prompt: new Prompt({ text: "Fix the failing tests" }),
  293. delivery: "queue",
  294. resume: false,
  295. })
  296. .pipe(Effect.flip)
  297. expect(failure._tag).toBe("Session.PromptConflictError")
  298. }),
  299. )
  300. it.effect("returns one recorded message to concurrent exact retries", () =>
  301. Effect.gen(function* () {
  302. yield* setup
  303. const session = yield* SessionV2.Service
  304. const input = {
  305. sessionID,
  306. id: messageID,
  307. prompt: new Prompt({ text: "Fix the failing tests" }),
  308. resume: false,
  309. }
  310. const messages = yield* Effect.all([session.prompt(input), session.prompt(input)], { concurrency: "unbounded" })
  311. expect(messages[1]).toEqual(messages[0])
  312. expect(yield* session.messages({ sessionID })).toEqual([])
  313. expect(yield* admittedCount).toBe(1)
  314. expect(yield* eventCount(EventV2.versionedType(SessionEvent.PromptLifecycle.Admitted.type, 1))).toBe(1)
  315. }),
  316. )
  317. it.effect("promotes one message once under concurrent promotion attempts", () =>
  318. Effect.gen(function* () {
  319. yield* setup
  320. const { db } = yield* Database.Service
  321. const session = yield* SessionV2.Service
  322. const events = yield* EventV2.Service
  323. yield* session.prompt({ id: messageID, sessionID, prompt: new Prompt({ text: "Promote once" }), resume: false })
  324. yield* Effect.all(
  325. [
  326. SessionInput.promoteSteers(db, events, sessionID, Number.MAX_SAFE_INTEGER),
  327. SessionInput.promoteSteers(db, events, sessionID, Number.MAX_SAFE_INTEGER),
  328. ],
  329. { concurrency: "unbounded" },
  330. )
  331. expect(yield* eventCount(EventV2.versionedType(SessionEvent.PromptLifecycle.Promoted.type, 1))).toBe(1)
  332. expect(yield* admitted(messageID)).toMatchObject({ promotedSeq: 1 })
  333. expect(yield* session.messages({ sessionID })).toMatchObject([
  334. { id: messageID, type: "user", text: "Promote once" },
  335. ])
  336. }),
  337. )
  338. it.effect("promotes steers only through the captured aggregate cutoff", () =>
  339. Effect.gen(function* () {
  340. yield* setup
  341. const { db } = yield* Database.Service
  342. const session = yield* SessionV2.Service
  343. const events = yield* EventV2.Service
  344. const first = yield* session.prompt({ sessionID, prompt: new Prompt({ text: "Before cutoff" }), resume: false })
  345. const cutoff = yield* SessionInput.latestSeq(db, sessionID)
  346. const second = yield* session.prompt({ sessionID, prompt: new Prompt({ text: "After cutoff" }), resume: false })
  347. yield* SessionInput.promoteSteers(db, events, sessionID, cutoff)
  348. expect(yield* admitted(first.id)).toHaveProperty("promotedSeq")
  349. expect(yield* admitted(second.id)).not.toHaveProperty("promotedSeq")
  350. }),
  351. )
  352. it.effect("reprojects one pending lifecycle without scheduling execution", () =>
  353. Effect.gen(function* () {
  354. yield* setup
  355. const { db } = yield* Database.Service
  356. const session = yield* SessionV2.Service
  357. const events = yield* EventV2.Service
  358. wakeCalls.length = 0
  359. yield* session.prompt({ id: messageID, sessionID, prompt: new Prompt({ text: "Replay pending" }), resume: false })
  360. const recorded = yield* db
  361. .select()
  362. .from(EventTable)
  363. .where(eq(EventTable.aggregate_id, sessionID))
  364. .all()
  365. .pipe(Effect.orDie)
  366. yield* events.remove(sessionID)
  367. yield* db.delete(SessionInputTable).where(eq(SessionInputTable.session_id, sessionID)).run().pipe(Effect.orDie)
  368. yield* db
  369. .delete(SessionMessageTable)
  370. .where(eq(SessionMessageTable.session_id, sessionID))
  371. .run()
  372. .pipe(Effect.orDie)
  373. yield* events.replayAll(
  374. recorded.map((event) => ({
  375. id: event.id,
  376. aggregateID: event.aggregate_id,
  377. seq: event.seq,
  378. type: event.type,
  379. data: event.data,
  380. })),
  381. )
  382. expect(yield* admitted(messageID)).toMatchObject({ id: messageID, prompt: { text: "Replay pending" } })
  383. expect(yield* session.messages({ sessionID })).toEqual([])
  384. expect(wakeCalls).toEqual([])
  385. }),
  386. )
  387. it.effect("returns an exact retry of a legacy projected prompt", () =>
  388. Effect.gen(function* () {
  389. yield* setup
  390. const session = yield* SessionV2.Service
  391. const events = yield* EventV2.Service
  392. const prompt = new Prompt({ text: "Historical prompt" })
  393. yield* events.publish(SessionEvent.Prompted, {
  394. sessionID,
  395. messageID,
  396. timestamp: yield* DateTime.now,
  397. prompt,
  398. delivery: "steer",
  399. })
  400. const retried = yield* session.prompt({ id: messageID, sessionID, prompt, resume: false })
  401. expect(retried).toMatchObject({ id: messageID, prompt: { text: "Historical prompt" } })
  402. expect(yield* admitted(messageID)).toHaveProperty("promotedSeq")
  403. }),
  404. )
  405. it.effect("returns an exact retry of a legacy projected queued prompt", () =>
  406. Effect.gen(function* () {
  407. yield* setup
  408. const session = yield* SessionV2.Service
  409. const events = yield* EventV2.Service
  410. const prompt = new Prompt({ text: "Historical queued prompt" })
  411. yield* events.publish(SessionEvent.Prompted, {
  412. sessionID,
  413. messageID,
  414. timestamp: yield* DateTime.now,
  415. prompt,
  416. delivery: "queue",
  417. })
  418. const retried = yield* session.prompt({ id: messageID, sessionID, prompt, delivery: "queue", resume: false })
  419. expect(retried).toMatchObject({ id: messageID, prompt: { text: "Historical queued prompt" } })
  420. expect(yield* admitted(messageID)).toMatchObject({ delivery: "queue" })
  421. }),
  422. )
  423. it.effect("rejects an input ID already used by a durable non-prompt event", () =>
  424. Effect.gen(function* () {
  425. yield* setup
  426. const session = yield* SessionV2.Service
  427. const events = yield* EventV2.Service
  428. yield* events.publish(SessionEvent.Synthetic, {
  429. sessionID,
  430. messageID,
  431. timestamp: yield* DateTime.now,
  432. text: "Collision",
  433. })
  434. const failure = yield* session
  435. .prompt({ id: messageID, sessionID, prompt: new Prompt({ text: "Collision" }), resume: false })
  436. .pipe(Effect.flip)
  437. expect(failure._tag).toBe("Session.PromptConflictError")
  438. expect(yield* admitted(messageID)).toBeUndefined()
  439. }),
  440. )
  441. it.effect("rejects a durable event ID reserved by an admitted prompt without poisoning promotion", () =>
  442. Effect.gen(function* () {
  443. yield* setup
  444. const { db } = yield* Database.Service
  445. const session = yield* SessionV2.Service
  446. const events = yield* EventV2.Service
  447. const prompt = new Prompt({ text: "Reserved prompt" })
  448. yield* session.prompt({ id: messageID, sessionID, prompt, resume: false })
  449. const failure = yield* events
  450. .publish(SessionEvent.Synthetic, {
  451. sessionID,
  452. messageID,
  453. timestamp: yield* DateTime.now,
  454. text: "Conflicting synthetic",
  455. })
  456. .pipe(Effect.catchDefect(Effect.succeed))
  457. expect(String(failure)).toContain("SessionInput.LifecycleConflict")
  458. expect(yield* admitted(messageID)).not.toHaveProperty("promotedSeq")
  459. expect(yield* session.messages({ sessionID })).toEqual([])
  460. yield* SessionInput.promoteSteers(db, events, sessionID, Number.MAX_SAFE_INTEGER)
  461. expect(yield* admitted(messageID)).toMatchObject({ promotedSeq: 1 })
  462. expect(yield* session.messages({ sessionID })).toMatchObject([
  463. { id: messageID, type: "user", text: "Reserved prompt" },
  464. ])
  465. }),
  466. )
  467. it.effect("rejects reuse of one globally unique message ID across sessions", () =>
  468. Effect.gen(function* () {
  469. yield* setup
  470. const { db } = yield* Database.Service
  471. const session = yield* SessionV2.Service
  472. const other = SessionV2.ID.make("ses_prompt_other")
  473. yield* db
  474. .insert(SessionTable)
  475. .values({
  476. id: other,
  477. project_id: Project.ID.global,
  478. slug: "other",
  479. directory: "/project",
  480. title: "other",
  481. version: "test",
  482. })
  483. .onConflictDoNothing()
  484. .run()
  485. .pipe(Effect.orDie)
  486. const prompt = new Prompt({ text: "Fix the failing tests" })
  487. yield* session.prompt({ id: messageID, sessionID, prompt, resume: false })
  488. const failure = yield* session
  489. .prompt({ id: messageID, sessionID: other, prompt, resume: false })
  490. .pipe(Effect.flip)
  491. expect(failure).toMatchObject({ _tag: "Session.PromptConflictError", sessionID: other, messageID })
  492. }),
  493. )
  494. it.effect("starts execution by default after recording the prompt", () =>
  495. Effect.gen(function* () {
  496. yield* setup
  497. const session = yield* SessionV2.Service
  498. executionCalls.length = 0
  499. wakeCalls.length = 0
  500. wakeSeqs.length = 0
  501. const admitted = yield* session.prompt({ sessionID, prompt: new Prompt({ text: "Run by default" }) })
  502. expect(executionCalls).toEqual([])
  503. expect(wakeCalls).toEqual([sessionID])
  504. expect(wakeSeqs).toEqual([admitted.admittedSeq])
  505. }),
  506. )
  507. it.effect("starts execution when resume is explicitly true", () =>
  508. Effect.gen(function* () {
  509. yield* setup
  510. const session = yield* SessionV2.Service
  511. executionCalls.length = 0
  512. wakeCalls.length = 0
  513. wakeSeqs.length = 0
  514. const admitted = yield* session.prompt({
  515. sessionID,
  516. prompt: new Prompt({ text: "Run explicitly" }),
  517. resume: true,
  518. })
  519. expect(executionCalls).toEqual([])
  520. expect(wakeCalls).toEqual([sessionID])
  521. expect(wakeSeqs).toEqual([admitted.admittedSeq])
  522. }),
  523. )
  524. it.effect("only records the prompt when resume is false", () =>
  525. Effect.gen(function* () {
  526. yield* setup
  527. const session = yield* SessionV2.Service
  528. executionCalls.length = 0
  529. wakeCalls.length = 0
  530. wakeSeqs.length = 0
  531. yield* session.prompt({ sessionID, prompt: new Prompt({ text: "Do not run" }), resume: false })
  532. expect(executionCalls).toEqual([])
  533. expect(wakeCalls).toEqual([])
  534. expect(wakeSeqs).toEqual([])
  535. }),
  536. )
  537. })