@@ -12,7 +12,6 @@ import {
1212import { tmpdir } from "node:os" ;
1313import { join } from "node:path" ;
1414import { describe , expect , it } from "vitest" ;
15- import { DiscordChannelConfigSchema } from "../../extensions/discord/channel-config-api.js" ;
1615import {
1716 CONFIG_COMMAND_MAX_BUFFER_BYTES ,
1817 CONFIG_COMMAND_TIMEOUT_MS ,
@@ -24,7 +23,6 @@ import {
2423 runUpgradeSurvivorOpenClawStep ,
2524} from "../../scripts/e2e/lib/upgrade-survivor/config-recipe.mts" ;
2625import { AgentsSchema } from "../../src/config/zod-schema.agents.js" ;
27- import { validateJsonSchemaValue } from "../../src/plugins/schema-validator.js" ;
2826
2927const RECIPE_PATH = "scripts/e2e/lib/upgrade-survivor/config-recipe.mts" ;
3028const RUN_PATH = "scripts/e2e/lib/upgrade-survivor/run.sh" ;
@@ -201,40 +199,6 @@ describe("upgrade survivor config recipe command resolution", () => {
201199 } ,
202200 ) ;
203201
204- it . each ( [
205- [ "2026.3.13" , true ] ,
206- [ "2026.7.1-2" , true ] ,
207- [ "2026.7.2-beta.3" , true ] ,
208- [ "2026.7.2-beta.4" , false ] ,
209- [ "2026.8.1-beta.1" , false ] ,
210- [ "2026.8.1-beta.2" , false ] ,
211- [ "2026.8.1" , false ] ,
212- [ null , false ] ,
213- ] as const ) ( "preserves supported Discord DM input for baseline %s" , ( version , legacy ) => {
214- const step = resolveUpgradeSurvivorConfigStepsForBaseline ( "base" , version ) . find (
215- ( entry ) => entry . id === "channels-discord" ,
216- ) ;
217- const discord = JSON . parse ( step ?. argv [ 3 ] ?? "{}" ) ;
218- if ( legacy ) {
219- expect ( discord . dm ) . toEqual ( { policy : "allowlist" , allowFrom : [ "111111111111111111" ] } ) ;
220- expect ( discord . dmPolicy ) . toBeUndefined ( ) ;
221- expect ( discord . allowFrom ) . toBeUndefined ( ) ;
222- } else {
223- expect ( discord . dm ) . toBeUndefined ( ) ;
224- expect ( discord . dmPolicy ) . toBe ( "allowlist" ) ;
225- expect ( discord . allowFrom ) . toEqual ( [ "111111111111111111" ] ) ;
226- }
227- // The public schema is the config-set boundary; runtime Zod preprocessing
228- // would silently normalize the legacy specimen and miss a bad baseline cutoff.
229- expect (
230- validateJsonSchemaValue ( {
231- schema : DiscordChannelConfigSchema . schema ,
232- cacheKey : "upgrade-survivor-discord-config" ,
233- value : discord ,
234- } ) . ok ,
235- ) . toBe ( ! legacy ) ;
236- } ) ;
237-
238202 it . each ( [ "2026.3.13" , "2026.4.1" , "2026.8.1-beta.1" ] ) (
239203 "preserves the legacy agent contract for baseline %s" ,
240204 ( version ) => {
0 commit comments