@devries-cameron20 / t3code Mirror · read-only / commits / 4d01315273
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 23, 09:15 UTC

test(server): decouple compatibility fixtures from release version (#20068)

Julius Marminge committed Oct 15, 2026 at 16:35 UTC 4d01315273cbd4e8b71e80890932afdf50666f35
1 file changed +17 -5
apps/server/src/provider/providerCompatibility.test.ts
+17 -5
@@ -25,7 +25,7 @@ import {
25 const driver = ProviderDriverKind.make("codex");
26 const policy: ProviderCompatibilityPolicy = {
27 driver,
28 - t3CodeRange: ">=0.0.42 <0.1.0",
28 + t3CodeRange: ">=0.0.0",
29 recommendedVersion: "2.0.0",
30 recommendedRange: ">=2.0.0 <3.0.0",
31 ranges: [
@@ -222,7 +222,19 @@ describe("provider compatibility", () => {
222 ] as const) {
223 assert.strictEqual(resolveProviderCompatibility([policy], driver, version)?.status, expected);
224 }
225 - assert.isUndefined(resolveProviderCompatibility([policy], driver, "0.9.0", "0.1.0"));
225 + });
226 +
227 + it("applies policies only within their T3 Code version range", () => {
228 + const scopedPolicy = { ...policy, t3CodeRange: ">=0.0.42 <0.1.0" };
229 + for (const version of ["0.0.42", "0.0.45"]) {
230 + assert.strictEqual(
231 + resolveProviderCompatibility([scopedPolicy], driver, "0.9.0", version)?.status,
232 + "broken",
233 + );
234 + }
235 + for (const version of ["0.0.41", "0.1.0"]) {
236 + assert.isUndefined(resolveProviderCompatibility([scopedPolicy], driver, "0.9.0", version));
237 + }
238 });
239
240 it("supports every driver without inventing policies for uncovered adapters", () => {
@@ -253,7 +265,7 @@ describe("provider compatibility", () => {
265 assert.strictEqual(supported.status, "error");
266 assert.strictEqual(supported.message, "Authentication failed");
267 assert.strictEqual(
256 - applyProviderCompatibility(supported, [{ ...policy, t3CodeRange: ">=9.0.0" }], [policy])
268 + applyProviderCompatibility(supported, [{ ...policy, t3CodeRange: "<0.0.0" }], [policy])
269 .compatibilityAdvisory?.status,
270 "broken",
271 );
@@ -280,11 +292,11 @@ describe("provider compatibility", () => {
292 ranges: [{ range: ">=v2.0 <v3", status: "supported" }],
293 });
294 assert.strictEqual(
283 - resolveProviderCompatibility([prefixed], driver, "2.0.0")?.status,
295 + resolveProviderCompatibility([prefixed], driver, "2.0.0", "0.0.45")?.status,
296 "supported",
297 );
298 assert.strictEqual(
287 - resolveProviderCompatibility([prefixed], driver, "3.0.0")?.status,
299 + resolveProviderCompatibility([prefixed], driver, "3.0.0", "0.0.45")?.status,
300 "unknown",
301 );
302 for (const invalid of [