@@ -277,6 +277,7 @@ describe("IssueService", () => {
277277 it.effect("deduplicates and pages repositories despite partial failures", () =>
278278 Effect.gen(function* () {
279279 const listed: string[] = [];
280+ let failContinuation = true;
280281 const service = yield* makeService({
281282 projects: [
282283 project({ id: "web", repository: "acme/web" }),
@@ -305,6 +306,15 @@ describe("IssueService", () => {
305306 });
306307 if (input.scope === "acme/docs")
307308 return { items: [issue("3", "2026-07-04T00:00:00Z")], nextCursor: null };
309+ if (input.cursor === "next" && failContinuation) {
310+ failContinuation = false;
311+ return yield* new IssueTrackerError({
312+ tracker: GITHUB,
313+ operation: "listIssues",
314+ reason: "failed",
315+ detail: "try again",
316+ });
317+ }
308318 if (input.cursor === "next")
309319 return { items: [issue("4", "2026-07-01T00:00:00Z")], nextCursor: null };
310320 return {
@@ -338,11 +348,16 @@ describe("IssueService", () => {
338348
339349 // A continuation only reads the scopes it names.
340350 listed.length = 0;
341- const next = yield* service.list({
351+ const failed = yield* service.list({
342352 state: "open",
343- cursors: { "github.com acme/web": "next" } ,
353+ cursors: result.nextCursors ,
344354 });
345355 expect(listed).toEqual(["acme/web"]);
356+ expect(failed.nextCursors).toEqual(result.nextCursors);
357+ expect(failed.errors).toEqual([
358+ { projectId: "web", projectTitle: "web", message: "try again" },
359+ ]);
360+ const next = yield* service.list({ state: "open", cursors: failed.nextCursors });
346361 expect(next.entries.map((entry) => [entry.projectId, entry.key])).toEqual([["web", "4"]]);
347362 expect(next.nextCursors).toEqual({});
348363 expect(next.errors).toEqual([]);
0 commit comments