From 73b5f3231991db041851f24d34ea47071220c39b Mon Sep 17 00:00:00 2001 From: "Molecule AI Dev Engineer B (MiniMax)" Date: Sun, 14 Jun 2026 01:05:33 +0000 Subject: [PATCH] test(canvas): remove retired ConfigTab it.skip placeholders (#2794) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two Vitest files in canvas/src/components/tabs/__tests__/ contained only documentation + an intentionally empty `it.skip()` placeholder for the retired internal#718 P4 LLM_PROVIDER/provider→ llm_billing_mode linkage: - ConfigTab.billingMode.test.tsx (retired — 255 lines of doc + 1 skip) - ConfigTab.provider.test.tsx (retired — 574 lines of doc + 1 skip) Both flows are permanently retired (server endpoints return 410 Gone PROVIDER_ENDPOINT_RETIRED; LLM_PROVIDER workspace_secret was dropped in 20260528000000). Replacement coverage is active elsewhere (workspace-server: TestPutProvider_410Gone + TestGetProvider_410Gone; registry: TestDeriveProvider_RealManifest; workspace-server: TestWorkspaceCreate_FirstDeploy_OnlyPersistsMODEL; TestResolveLLMBillingModeDerived (P2-B #1972)). The empty `it.skip()`s carried stale skip-rate metrics on every Canvas test run, which inflated CI noise and signaled a regression class that no longer exists. Also removed the now-stale example reference in canvas/vitest.config.ts that cited ConfigTab.provider.test.tsx as a heavyweight file (it's no longer in the directory). Refs internal#718 P4 closure + P2-B #1972. Co-Authored-By: Claude --- .../__tests__/ConfigTab.billingMode.test.tsx | 35 --------------- .../__tests__/ConfigTab.provider.test.tsx | 45 ------------------- canvas/vitest.config.ts | 3 +- 3 files changed, 1 insertion(+), 82 deletions(-) delete mode 100644 canvas/src/components/tabs/__tests__/ConfigTab.billingMode.test.tsx delete mode 100644 canvas/src/components/tabs/__tests__/ConfigTab.provider.test.tsx diff --git a/canvas/src/components/tabs/__tests__/ConfigTab.billingMode.test.tsx b/canvas/src/components/tabs/__tests__/ConfigTab.billingMode.test.tsx deleted file mode 100644 index 0669e3048..000000000 --- a/canvas/src/components/tabs/__tests__/ConfigTab.billingMode.test.tsx +++ /dev/null @@ -1,35 +0,0 @@ -// @vitest-environment jsdom -// -// internal#718 P4 closure — ConfigTab.billingMode.test.tsx is retired. -// -// This suite (255 lines, 8 tests) pinned the canvas-side provider → -// llm_billing_mode linkage from internal#703 Gap 2: when the operator -// changed the PROVIDER in the Config tab, ConfigTab.handleSave would -// PUT /admin/workspaces/:id/llm-billing-mode so the platform-vs-byok -// decision tracked the dropdown. -// -// That linkage is retired together with the LLM_PROVIDER override flow -// (see ConfigTab.provider.test.tsx retirement note). P2-B (#1972) -// moved the platform-vs-byok decision to -// `ResolveLLMBillingModeDerived(runtime, model, authEnv)` in -// workspace-server — the canvas can no longer override it via the -// provider dropdown, by design. The runtime+model selection IS the -// billing-mode selection now. -// -// The `/admin/workspaces/:id/llm-billing-mode` endpoint still exists -// as the operator override surface (`workspaces.llm_billing_mode` -// column); it is no longer driven by the provider dropdown. -// Coverage for the derived billing flow lives in -// workspace-server/internal/handlers/llm_billing_mode_derived_test.go. -// -// Restore from git history if the canvas-side provider→billing linkage -// needs to be revisited (it should not — the derived resolver is the -// single decision point). - -import { describe, it } from "vitest"; - -describe("ConfigTab — provider → llm_billing_mode linkage (retired internal#718 P4)", () => { - it.skip("LLM_PROVIDER → billing_mode wiring is retired; see file header for the replacement coverage", () => { - // intentionally empty - }); -}); diff --git a/canvas/src/components/tabs/__tests__/ConfigTab.provider.test.tsx b/canvas/src/components/tabs/__tests__/ConfigTab.provider.test.tsx deleted file mode 100644 index 198dcbcb0..000000000 --- a/canvas/src/components/tabs/__tests__/ConfigTab.provider.test.tsx +++ /dev/null @@ -1,45 +0,0 @@ -// @vitest-environment jsdom -// -// internal#718 P4 closure — ConfigTab.provider.test.tsx is retired. -// -// This 574-line suite exercised the canvas-side LLM provider override -// flow: load the existing override from GET /workspaces/:id/provider, -// edit the dropdown, Save → PUT /workspaces/:id/provider, and the -// provider→billing_mode linkage on Save. All three server endpoints -// behind those flows are retired in internal#718 P4 closure: -// -// - workspace-server SetProvider / GetProvider (PUT/GET -// /workspaces/:id/provider) → both return 410 Gone with a -// PROVIDER_ENDPOINT_RETIRED structured body. -// - workspace-server setProviderSecret (the writer into -// workspace_secrets.LLM_PROVIDER) — removed; row never written. -// - The LLM_PROVIDER workspace_secret itself — migrated away in -// 20260528000000_drop_llm_provider_workspace_secret.up.sql. -// -// ConfigTab still renders the provider dropdown for display (the user -// can preview the derived provider locally), but Save no longer -// round-trips the value. The replacement contract is that the provider -// is DERIVED at every decision point from (runtime, model) via the -// registry — see internal/providers/derive_provider.go. -// -// The original suite's coverage is replaced by: -// -// - workspace-server: TestPutProvider_410Gone + -// TestGetProvider_410Gone + TestProviderEndpointGone_BodyShape in -// internal/handlers/llm_provider_removal_p4_test.go. -// - workspace-server: TestWorkspaceCreate_FirstDeploy_OnlyPersistsMODEL -// in internal/handlers/workspace_provision_shared_test.go. -// - registry: TestDeriveProvider_RealManifest in -// internal/providers/derive_provider_test.go. -// -// Restore from git history if any aspect of the legacy LLM_PROVIDER -// flow needs to be revisited (it should not — the retirement is -// permanent). - -import { describe, it } from "vitest"; - -describe("ConfigTab provider override — retired (internal#718 P4)", () => { - it.skip("LLM_PROVIDER override flow is retired; see file header for the replacement coverage", () => { - // intentionally empty - }); -}); diff --git a/canvas/vitest.config.ts b/canvas/vitest.config.ts index ab402cff2..7102ad66d 100644 --- a/canvas/vitest.config.ts +++ b/canvas/vitest.config.ts @@ -32,8 +32,7 @@ export default defineConfig({ // graph import for @/components/* and @/lib/* + first React // render) consistently consumes 5-7 seconds for the first // synchronous test in heavyweight component files - // (ActivityTab.test.tsx, CreateWorkspaceDialog.test.tsx, - // ConfigTab.provider.test.tsx) — even though every subsequent + // (ActivityTab.test.tsx, CreateWorkspaceDialog.test.tsx) — even though every subsequent // test in the same file completes in 100-1500ms. // // Empirically the worst observed first-test was 6453ms in a -- 2.52.0