Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(threads): stop missing-thread subscription retries #12711

ClosedQuicksaver(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/12711/headopened View on GitHub

Showing 19 changed files with 193 additions and 3 deletions (loading 17).

x
0 of 19 viewed, 19 left
180 additions and 0 deletionsapps/server/src/server.test.tsModified
View file
@@ -22,6 +22,7 @@
OrchestrationShellSnapshot,
type OrchestrationShellStreamItem,
OrchestrationThreadDetailSnapshot,
+ ORCHESTRATION_THREAD_NOT_FOUND_ERROR_CAPABILITY,
type OrchestrationThreadStreamItem,
type OrchestrationThreadActivity,
type OrchestrationThreadShell,
@@ -9952,6 +9953,185 @@
}).pipe(Effect.scoped, Effect.provide(NodeHttpServer.layerTest)),
+ it.effect("subscribeThread identifies a missing large-gap fallback for capable clients", () =>
+ Effect.gen(function* () {
+ yield* buildAppUnderTest({
+ layers: {
+ orchestrationEngine: {
+ latestSequence: Effect.succeed(100_000),
+ getThreadReplayStats: () =>
+ Effect.succeed({ eventCount: 100_000, payloadBytes: 0, hasCreateEvent: false }),
+ },
+ projectionSnapshotQuery: {
+ getThreadDetailSnapshot: () => Effect.succeed(Option.none()),
+ },
+ },
+ });
+​
+ const wsUrl = yield* getWsServerUrl("/ws");
+ const result = yield* Effect.scoped(