authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-05 00:12:30-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-05 00:12:30-07:00
log2fc630c9e85321b7b3963372fd316877a7581639
tree84cff799bce21b08d3fb2c2402964c652dc7f2a2
parentb3f8dd979af2bb089f94e6f1006ebbb2cf748db4
signature Signed by PGP key B5690EEEBB952194

test(server): remove provider equality wrapper fixture (#9979)


2 files changed, 1 insertions(+), 35 deletions(-)

apps/server/src/provider/Layers/ProviderRegistry.test.ts-34
......@@ -43,7 +43,6 @@ import * as OpenCodeRuntime from "../opencodeRuntime.ts";
4343import * as ProviderEventLoggers from "./ProviderEventLoggers.ts";
4444import { ProviderInstanceRegistryHydrationLive } from "./ProviderInstanceRegistryHydration.ts";
4545import {
46 haveProvidersChanged,
4746 mergeProviderSnapshot,
4847 upsertProviderWorkspaceSnapshot,
4948 ProviderRegistryLive,
......@@ -555,39 +554,6 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsModule.layerTest(), Te
555554 });
556555
557556 describe("ProviderRegistryLive", () => {
558 it("treats equal provider snapshots as unchanged", () => {
559 const providers = [
560 {
561 instanceId: ProviderInstanceId.make("codex"),
562 driver: ProviderDriverKind.make("codex"),
563 status: "ready",
564 enabled: true,
565 installed: true,
566 auth: { status: "authenticated" },
567 checkedAt: "2026-03-25T00:00:00.000Z",
568 version: "1.0.0",
569 models: [],
570 slashCommands: [],
571 skills: [],
572 },
573 {
574 instanceId: ProviderInstanceId.make("claudeAgent"),
575 driver: ProviderDriverKind.make("claudeAgent"),
576 status: "warning",
577 enabled: true,
578 installed: true,
579 auth: { status: "unknown" },
580 checkedAt: "2026-03-25T00:00:00.000Z",
581 version: "1.0.0",
582 models: [],
583 slashCommands: [],
584 skills: [],
585 },
586 ] as const satisfies ReadonlyArray<ServerProvider>;
587
588 assert.strictEqual(haveProvidersChanged(providers, [...providers]), false);
589 });
590
591557 it("stores workspace skills and commands without changing machine metadata", () => {
592558 const provider = {
593559 instanceId: ProviderInstanceId.make("codex"),
apps/server/src/provider/Layers/ProviderRegistry.ts+1-1
......@@ -188,7 +188,7 @@ export const mergeProviderSnapshot = (
188188 : {}),
189189 };
190190
191export const haveProvidersChanged = (
191const haveProvidersChanged = (
192192 previousProviders: ReadonlyArray<ServerProvider>,
193193 nextProviders: ReadonlyArray<ServerProvider>,
194194): boolean => !Equal.equals(previousProviders, nextProviders);