opencode-agent[bot] 3 месяцев назад
Родитель
Сommit
f7b5576bcc

+ 4 - 14
packages/opencode/test/server/httpapi-event-diagnostics.test.ts

@@ -207,11 +207,7 @@ describe("/event SSE delivery diagnostics", () => {
           .pipe(Effect.provideService(InstanceRef, ctx)),
       )
 
-      const collected = await collectUntil(
-        reader,
-        (event) => event.type === MessageV2.Event.PartUpdated.type,
-        4_000,
-      )
+      const collected = await collectUntil(reader, (event) => event.type === MessageV2.Event.PartUpdated.type, 4_000)
       const updated = collected.find((event) => event.type === MessageV2.Event.PartUpdated.type)
       expect(updated).toBeDefined()
       expect((updated as any).properties.part.id).toBe(partID)
@@ -325,8 +321,7 @@ describe("/event SSE delivery diagnostics", () => {
       ])
 
       const sseSaw =
-        Array.isArray(sseCollected) &&
-        sseCollected.some((event) => event.type === MessageV2.Event.PartUpdated.type)
+        Array.isArray(sseCollected) && sseCollected.some((event) => event.type === MessageV2.Event.PartUpdated.type)
       const callbackSaw = callbackResult !== "timeout"
 
       // Both should see it. The reason we use a single assert with the boolean
@@ -371,11 +366,7 @@ describe("/event SSE delivery diagnostics", () => {
           .pipe(Effect.provideService(InstanceRef, ctx)),
       )
 
-      const collected = await collectUntil(
-        reader,
-        (event) => event.type === MessageV2.Event.PartUpdated.type,
-        4_000,
-      )
+      const collected = await collectUntil(reader, (event) => event.type === MessageV2.Event.PartUpdated.type, 4_000)
       const updated = collected.find((event) => event.type === MessageV2.Event.PartUpdated.type)
       expect(updated).toBeDefined()
     } finally {
@@ -439,8 +430,7 @@ describe("/event SSE delivery diagnostics", () => {
         ])
 
         const sseSaw =
-          Array.isArray(sseCollected) &&
-          sseCollected.some((event) => event.type === MessageV2.Event.PartUpdated.type)
+          Array.isArray(sseCollected) && sseCollected.some((event) => event.type === MessageV2.Event.PartUpdated.type)
         const callbackSaw = callbackResult !== "timeout"
         expect({ sseSaw, callbackSaw }).toEqual({ sseSaw: true, callbackSaw: true })
       } finally {

+ 5 - 5
packages/opencode/test/server/httpapi-sdk.test.ts

@@ -672,11 +672,11 @@ describe("HttpApi SDK", () => {
   )
 
   // Regression: SyncEvent must publish on the same ProjectBus the /event handler
-// subscribes to, AND the /event stream must forward handler ALS/context into the
-// body-pump fiber. Drives the full SDK → /event → Session.updatePart → sync.run →
-// bus.publish → SDK subscriber path. Goes red if either the publisher uses a
-// different bus instance (Bug 2 / pre-#27825) or the stream loses context (Bug 1 /
-// pre-#27425).
+  // subscribes to, AND the /event stream must forward handler ALS/context into the
+  // body-pump fiber. Drives the full SDK → /event → Session.updatePart → sync.run →
+  // bus.publish → SDK subscriber path. Goes red if either the publisher uses a
+  // different bus instance (Bug 2 / pre-#27825) or the stream loses context (Bug 1 /
+  // pre-#27425).
   serverPathParity("streams sync-backed part updates to /event subscribers", (serverPath) =>
     withStandardProject(serverPath, ({ sdk, directory }) =>
       Effect.gen(function* () {