From bbff52d314e26db5683e3ddba33d302a9997ff5d Mon Sep 17 00:00:00 2001 From: "Craig Macomber (Microsoft)" <42876482+CraigMacomber@users.noreply.github.com> Date: Wed, 5 Nov 2025 19:15:29 -0800 Subject: [PATCH 1/4] Better document lowestMinVersionForCollab, and set to 1.4 --- .../runtime-utils/src/compatibilityBase.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/runtime/runtime-utils/src/compatibilityBase.ts b/packages/runtime/runtime-utils/src/compatibilityBase.ts index 301f470d3764..2dd55183ed2c 100644 --- a/packages/runtime/runtime-utils/src/compatibilityBase.ts +++ b/packages/runtime/runtime-utils/src/compatibilityBase.ts @@ -34,17 +34,23 @@ export const defaultMinVersionForCollab = "2.0.0-defaults" as const satisfies MinimumVersionForCollab; /** - * We don't want allow a version before the major public release of the LTS version. - * Today we use "1.0.0", because our policy supports N/N-1 & N/N-2, which includes - * all minor versions of N. Though LTS starts at 1.4.0, we should stay consistent - * with our policy and allow all 1.x versions to be compatible with 2.x. + * The lowest supported value of {@link @fluidframework/runtime-definitions#MinimumVersionForCollab}. + * @remarks + * In each new major version, this may be bumped to indicate which version of the Fluid Framework client libraries are no longer supported for collaboration. + * @privateRemarks + * At the time this was defined (and also at the time 2.0 was released), all version of 1.x below 1.4 were no longer supported. + * Therefor it makes sense to not support any version below 1.4.0. + * Supporting 1.4 is sufficient to support all 1.x versions which are still maintained were maintained when this constant could have been first used. + * + * Future major versions will have to decide which versions of every supported major (including 1.x if still supported) they want to support: + * continuing to support what ever version of 1.x is the oldest supported one at the time of the major release, would make sense for 3.0. * * @privateRemarks * Exported for use in tests. * * @internal */ -export const lowestMinVersionForCollab = "1.0.0" as const satisfies MinimumVersionForCollab; +export const lowestMinVersionForCollab = "1.4.0" as const satisfies MinimumVersionForCollab; /** * String in a valid semver format specifying bottom of a minor version From 2df350c0695b16d29a44582391ddb45219527c1a Mon Sep 17 00:00:00 2001 From: "Craig Macomber (Microsoft)" <42876482+CraigMacomber@users.noreply.github.com> Date: Wed, 5 Nov 2025 20:11:03 -0800 Subject: [PATCH 2/4] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- packages/runtime/runtime-utils/src/compatibilityBase.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/runtime/runtime-utils/src/compatibilityBase.ts b/packages/runtime/runtime-utils/src/compatibilityBase.ts index 2dd55183ed2c..b725e1eacda8 100644 --- a/packages/runtime/runtime-utils/src/compatibilityBase.ts +++ b/packages/runtime/runtime-utils/src/compatibilityBase.ts @@ -39,11 +39,11 @@ export const defaultMinVersionForCollab = * In each new major version, this may be bumped to indicate which version of the Fluid Framework client libraries are no longer supported for collaboration. * @privateRemarks * At the time this was defined (and also at the time 2.0 was released), all version of 1.x below 1.4 were no longer supported. - * Therefor it makes sense to not support any version below 1.4.0. - * Supporting 1.4 is sufficient to support all 1.x versions which are still maintained were maintained when this constant could have been first used. + * Therefore it makes sense to not support any version below 1.4.0. + * Supporting 1.4 is sufficient to support all 1.x versions which were maintained at the time this constant was introduced. * * Future major versions will have to decide which versions of every supported major (including 1.x if still supported) they want to support: - * continuing to support what ever version of 1.x is the oldest supported one at the time of the major release, would make sense for 3.0. + * continuing to support whatever version of 1.x is the oldest supported one at the time of the major release, would make sense for 3.0. * * @privateRemarks * Exported for use in tests. From deea8fa4d7103c99517de844d347572353eb1f54 Mon Sep 17 00:00:00 2001 From: "Craig Macomber (Microsoft)" <42876482+CraigMacomber@users.noreply.github.com> Date: Fri, 7 Nov 2025 10:11:33 -0800 Subject: [PATCH 3/4] Update packages/runtime/runtime-utils/src/compatibilityBase.ts Co-authored-by: yann-achard-MS <97201204+yann-achard-MS@users.noreply.github.com> --- packages/runtime/runtime-utils/src/compatibilityBase.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/runtime/runtime-utils/src/compatibilityBase.ts b/packages/runtime/runtime-utils/src/compatibilityBase.ts index b725e1eacda8..0cdd7cca5728 100644 --- a/packages/runtime/runtime-utils/src/compatibilityBase.ts +++ b/packages/runtime/runtime-utils/src/compatibilityBase.ts @@ -42,8 +42,8 @@ export const defaultMinVersionForCollab = * Therefore it makes sense to not support any version below 1.4.0. * Supporting 1.4 is sufficient to support all 1.x versions which were maintained at the time this constant was introduced. * - * Future major versions will have to decide which versions of every supported major (including 1.x if still supported) they want to support: - * continuing to support whatever version of 1.x is the oldest supported one at the time of the major release, would make sense for 3.0. + * Future major versions will have to decide which versions of every supported major (including 1.x if still supported) they want to support. + * Continuing to support whatever version of 1.x is the oldest supported one at the time of the major release, would make sense for 3.0. * * @privateRemarks * Exported for use in tests. From eca58fcc7733a4d7afe6e37228314f4f8d09b313 Mon Sep 17 00:00:00 2001 From: "Craig Macomber (Microsoft)" <42876482+CraigMacomber@users.noreply.github.com> Date: Tue, 11 Nov 2025 12:08:20 -0800 Subject: [PATCH 4/4] fix test --- .../src/test/containerRuntime.spec.ts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/packages/runtime/container-runtime/src/test/containerRuntime.spec.ts b/packages/runtime/container-runtime/src/test/containerRuntime.spec.ts index 16dad4546815..db50547d96fc 100644 --- a/packages/runtime/container-runtime/src/test/containerRuntime.spec.ts +++ b/packages/runtime/container-runtime/src/test/containerRuntime.spec.ts @@ -5,6 +5,7 @@ import { strict as assert } from "node:assert"; +import { UsageError } from "@fluidframework/telemetry-utils/internal"; import { stringToBuffer, type ILayerCompatDetails, @@ -3872,6 +3873,25 @@ describe("Runtime", () => { it("minVersionForCollab = 1.0.0", async () => { const minVersionForCollab = "1.0.0"; const logger = new MockLogger(); + await assert.rejects( + async () => { + await ContainerRuntime.loadRuntime2({ + context: getMockContext({ logger }) as IContainerContext, + registry: new FluidDataStoreRegistry([]), + existing: false, + runtimeOptions: {}, + provideEntryPoint: mockProvideEntryPoint, + minVersionForCollab, + }); + }, + (e) => + e instanceof UsageError && e.message.match(/Invalid minVersionForCollab/) !== null, + ); + }); + + it("minVersionForCollab = 1.4.0", async () => { + const minVersionForCollab = "1.4.0"; + const logger = new MockLogger(); await ContainerRuntime.loadRuntime2({ context: getMockContext({ logger }) as IContainerContext, registry: new FluidDataStoreRegistry([]),