From 1d8c4e036090ced325c1bc7539cc231e2f81ef6d Mon Sep 17 00:00:00 2001 From: James3014 <185240413+James3014@users.noreply.github.com> Date: Wed, 14 Oct 2026 08:51:21 +0800 Subject: [PATCH 1/2] test(#511): demonstrate resumed integration generation I6 rejection --- src/github-completion-host.test.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/github-completion-host.test.ts b/src/github-completion-host.test.ts index 31519e879..1d99a44be 100644 --- a/src/github-completion-host.test.ts +++ b/src/github-completion-host.test.ts @@ -82,10 +82,11 @@ describe("completion integration generation cap (#1384)", () => { } }); - it("port generation guard admits I4 and I5 and rejects I6", () => { - assert.equal(parseCompletionGeneration(4), 4); - assert.equal(parseCompletionGeneration(5), 5); - for (const value of [0, 6, null, "4"]) { + it("port generation guard accepts absolute I6 and later in a resumed five-generation run", () => { + for (const generation of [4, 5, 6, 7, 12, Number.MAX_SAFE_INTEGER]) { + assert.equal(parseCompletionGeneration(generation), generation); + } + for (const value of [0, -1, 1.5, null, "6", Number.MAX_SAFE_INTEGER + 1]) { assert.throws(() => parseCompletionGeneration(value), /generation_INVALID/); } }); From 4c4993014d0fc4dd0cd2d6817edd9f987e315192 Mon Sep 17 00:00:00 2001 From: James3014 <185240413+James3014@users.noreply.github.com> Date: Wed, 14 Oct 2026 08:54:24 +0800 Subject: [PATCH 2/2] fix(#511): bound completion runs relatively, not absolute I number --- src/github-completion-host.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/github-completion-host.ts b/src/github-completion-host.ts index f22d4a771..4f2f2920d 100644 --- a/src/github-completion-host.ts +++ b/src/github-completion-host.ts @@ -83,7 +83,7 @@ function positiveInt(value: unknown, name: string, maximum: number): number { } export function parseCompletionGeneration(value: unknown): number { - return positiveInt(value, "generation", MAX_COMPLETION_INTEGRATION_GENERATIONS); + return positiveInt(value, "generation", Number.MAX_SAFE_INTEGER); } export function isTransientRequiredChecksDecision(