From 3610130d6e471fb860df96f21f49fdef059c2366 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Thu, 19 Nov 2026 00:25:47 +0800 Subject: [PATCH] Keep a policy-floor test passing after gstack's version bump to 1.101 (#4495) A policy-floor test assumed gstack's own version stays below the next minor after the newest policy key. The v1.101 release (#4493) reaches that number, so its CI fails; the test now checks a floor above both. Why: this unblocks today's stable release, which carries a security fix (#4486) and four blocker fixes. Nothing to do as a reader. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- changelog.d/test-policy-floor-next-above-version.md | 2 ++ test/policy-floor-stable.test.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelog.d/test-policy-floor-next-above-version.md diff --git a/changelog.d/test-policy-floor-next-above-version.md b/changelog.d/test-policy-floor-next-above-version.md new file mode 100644 index 000000000..f07c2cba5 --- /dev/null +++ b/changelog.d/test-policy-floor-next-above-version.md @@ -0,0 +1,2 @@ +### Tests +- A policy-floor test no longer fails once gstack's own version reaches the minor after the newest policy key; it now checks a floor above both, so the v1.101.0.0 release can pass CI. diff --git a/test/policy-floor-stable.test.ts b/test/policy-floor-stable.test.ts index fab317844..fab5f5fcb 100644 --- a/test/policy-floor-stable.test.ts +++ b/test/policy-floor-stable.test.ts @@ -200,7 +200,7 @@ describe('gstack-doctor --check floor row', () => { const lagging = floorRow(f, project(f, known)); expect(lagging.line).toBe(`PASS floor ${known} declared by ${dir}/.gstack/ship-policy.json (installed 1.0.0.0, reads policies as ${known})`); expect(validatePolicy({ min_gstack_version: known }, { gstackVersion: runningGstackVersion() })).toEqual([]); - const next = known.replace(/^(\d+)\.(\d+)\..*$/, (_, a, b) => `${a}.${Number(b) + 1}.0.0`); + const next = (newer(VERSION, known) ? VERSION : known).replace(/^(\d+)\.(\d+)\..*$/, (_, a, b) => `${a}.${Number(b) + 1}.0.0`); expect(validatePolicy({ min_gstack_version: next }).map(e => e.code)).toEqual(['POLICY_GSTACK_TOO_OLD']); expect(floorRow(f, project(f, next)).status).toBe('WARN'); });