From 28bf05fe258e85bb306e69970743b940cd7974c0 Mon Sep 17 00:00:00 2001 From: Daniel Sutton Date: Mon, 24 Aug 2026 10:27:15 +0100 Subject: [PATCH] test(webapp): drop a stale assertion that contradicted the graced-group fix Running the Postgres suites surfaced two tests asserting opposite things about the same gesture. One was written before groups became all-or-nothing and expected the list to survive a save that omits it, which is the behaviour that made unset a silent no-op. It is replaced with the property that is actually correct: resubmitting the same list alongside another flag leaves the list and its cutover clock alone. Nothing in the implementation changed here. Only a test that encoded the old bug did. --- apps/webapp/test/runOpsMintShardSetFlip.test.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/webapp/test/runOpsMintShardSetFlip.test.ts b/apps/webapp/test/runOpsMintShardSetFlip.test.ts index 1cc3c2e00..ec354b920 100644 --- a/apps/webapp/test/runOpsMintShardSetFlip.test.ts +++ b/apps/webapp/test/runOpsMintShardSetFlip.test.ts @@ -155,16 +155,20 @@ describe("replaceGlobalFeatureFlags — the admin page cannot bypass the stamp", expect(m[FEATURE_FLAG.runOpsMintShardSetFlippedAt]).not.toBe("1999-01-01T00:00:00.000Z"); }); - postgresTest("the set trio survives a save that omits the set keys", async ({ prisma }) => { + postgresTest("a co-submitted flag does not disturb a resubmitted list", async ({ prisma }) => { await replaceGlobalFeatureFlags(prisma, { requestedFlags: { [FEATURE_FLAG.runOpsMintShardSet]: "a,b" }, catalogKeys: CATALOG_KEYS, isProtected: NEVER_PROTECTED, graceMs: 60_000, }); + const first = await readFlags(prisma, SET_KEYS); await replaceGlobalFeatureFlags(prisma, { - requestedFlags: { [FEATURE_FLAG.mollifierEnabled]: true }, + requestedFlags: { + [FEATURE_FLAG.runOpsMintShardSet]: "a,b", + [FEATURE_FLAG.mollifierEnabled]: true, + }, catalogKeys: CATALOG_KEYS, isProtected: NEVER_PROTECTED, graceMs: 60_000, @@ -172,6 +176,10 @@ describe("replaceGlobalFeatureFlags — the admin page cannot bypass the stamp", const m = await readFlags(prisma, SET_KEYS); expect(m[FEATURE_FLAG.runOpsMintShardSet]).toBe("a,b"); + // Resubmitting the same list is not a flip, so the cutover clock is not reset. + expect(m[FEATURE_FLAG.runOpsMintShardSetFlippedAt]).toBe( + first[FEATURE_FLAG.runOpsMintShardSetFlippedAt] + ); }); postgresTest(