From 7beee7daf4164afc5fd7db47463d375f134e3261 Mon Sep 17 00:00:00 2001 From: liukx0205 Date: Sat, 14 Nov 2026 13:24:11 +0800 Subject: [PATCH] test(session): rely on the default JSONL backend --- .../headless/tests/semantic-checkpoint.expected.e2e.ts | 2 +- .../headless/tests/session-format-guard.expected.e2e.ts | 2 +- .../headless/tests/subagent-diagnostic.expected.e2e.ts | 2 +- .../headless/tests/subagent-inheritance.expected.e2e.ts | 2 +- .../headless/tests/workspace-context-resume.expected.e2e.ts | 2 +- benchmarks/agent-continuation/agent-continuation.worker.ts | 4 ++-- benchmarks/agent-continuation/child-catalog.worker.ts | 2 +- benchmarks/session-corpus/projection-list.worker.ts | 2 +- benchmarks/session-corpus/session-corpus.worker.ts | 2 +- benchmarks/session-open/session-open.bench.ts | 2 +- benchmarks/session-open/session-open.worker.ts | 2 +- .../tests/fixtures/legacy-persistence.ts | 2 +- packages/skill/skill-office/tests/docx-validation.e2e.ts | 2 +- packages/skill/skill-office/tests/fixtures/visual-intent.ts | 2 +- packages/skill/skill-office/tests/render-tools.e2e.ts | 2 +- packages/skill/skill-office/tests/xlsx-validation.e2e.ts | 2 +- packages/team/agent-team/tests/persistence.spec.ts | 1 - scripts/migrate-sessions-to-v4.spec.ts | 2 +- scripts/migrate-sessions-to-v4.ts | 2 +- 19 files changed, 19 insertions(+), 20 deletions(-) diff --git a/apps/cli/tests/profiles/headless/tests/semantic-checkpoint.expected.e2e.ts b/apps/cli/tests/profiles/headless/tests/semantic-checkpoint.expected.e2e.ts index c70d3411a8..cd90d883ae 100644 --- a/apps/cli/tests/profiles/headless/tests/semantic-checkpoint.expected.e2e.ts +++ b/apps/cli/tests/profiles/headless/tests/semantic-checkpoint.expected.e2e.ts @@ -39,7 +39,7 @@ async function expectSession(actual: string, expectedPath: string): Promise { const ctx = new Context() - await ctx.plugin(JsonlSessionPersistence, { root, storage: 'jsonl', compression: 'none' }) + await ctx.plugin(JsonlSessionPersistence, { root, compression: 'none' }) const meta: SessionHeader = { version: SESSION_FORMAT_VERSION, id: sessionId, diff --git a/apps/cli/tests/profiles/headless/tests/session-format-guard.expected.e2e.ts b/apps/cli/tests/profiles/headless/tests/session-format-guard.expected.e2e.ts index 875f127d0e..1f2616db03 100644 --- a/apps/cli/tests/profiles/headless/tests/session-format-guard.expected.e2e.ts +++ b/apps/cli/tests/profiles/headless/tests/session-format-guard.expected.e2e.ts @@ -51,7 +51,7 @@ async function seedSession(root: string, cwd: string, version: number, events: S return path } const ctx = new Context() - await ctx.plugin(JsonlSessionPersistence, { root, storage: 'jsonl', compression: 'none' }) + await ctx.plugin(JsonlSessionPersistence, { root, compression: 'none' }) const meta: SessionHeader = { version: SESSION_FORMAT_VERSION, id: sessionId, diff --git a/apps/cli/tests/profiles/headless/tests/subagent-diagnostic.expected.e2e.ts b/apps/cli/tests/profiles/headless/tests/subagent-diagnostic.expected.e2e.ts index 3e6867ec25..b25c6680fe 100644 --- a/apps/cli/tests/profiles/headless/tests/subagent-diagnostic.expected.e2e.ts +++ b/apps/cli/tests/profiles/headless/tests/subagent-diagnostic.expected.e2e.ts @@ -47,7 +47,7 @@ async function expectSession(actual: string, expectedPath: string): Promise { const ctx = new Context() - await ctx.plugin(JsonlSessionPersistence, { root, storage: 'jsonl', compression: 'none' }) + await ctx.plugin(JsonlSessionPersistence, { root, compression: 'none' }) const parentMeta: SessionHeader = { version: SESSION_FORMAT_VERSION, id: parentId, diff --git a/apps/cli/tests/profiles/headless/tests/subagent-inheritance.expected.e2e.ts b/apps/cli/tests/profiles/headless/tests/subagent-inheritance.expected.e2e.ts index 0f37c26d1e..c84e78b670 100644 --- a/apps/cli/tests/profiles/headless/tests/subagent-inheritance.expected.e2e.ts +++ b/apps/cli/tests/profiles/headless/tests/subagent-inheritance.expected.e2e.ts @@ -48,7 +48,7 @@ async function expectSession(actual: string, expectedPath: string): Promise { const ctx = new Context() - await ctx.plugin(JsonlSessionPersistence, { root, storage: 'jsonl', compression: 'none' }) + await ctx.plugin(JsonlSessionPersistence, { root, compression: 'none' }) const meta: SessionHeader = { version: SESSION_FORMAT_VERSION, id: sessionId, diff --git a/apps/cli/tests/profiles/headless/tests/workspace-context-resume.expected.e2e.ts b/apps/cli/tests/profiles/headless/tests/workspace-context-resume.expected.e2e.ts index 4a368d53b5..4c81368815 100644 --- a/apps/cli/tests/profiles/headless/tests/workspace-context-resume.expected.e2e.ts +++ b/apps/cli/tests/profiles/headless/tests/workspace-context-resume.expected.e2e.ts @@ -64,7 +64,7 @@ async function seedVisibleBaseline( options: SeedBaselineOptions = {}, ): Promise { const ctx = new Context() - await ctx.plugin(JsonlSessionPersistence, { root, storage: 'jsonl', compression: 'none' }) + await ctx.plugin(JsonlSessionPersistence, { root, compression: 'none' }) const meta: SessionHeader = { version: SESSION_FORMAT_VERSION, id: sessionId, diff --git a/benchmarks/agent-continuation/agent-continuation.worker.ts b/benchmarks/agent-continuation/agent-continuation.worker.ts index 777b07db1a..775ca0ccd3 100644 --- a/benchmarks/agent-continuation/agent-continuation.worker.ts +++ b/benchmarks/agent-continuation/agent-continuation.worker.ts @@ -56,7 +56,7 @@ async function seed(root: string): Promise { const ctx = new Context() try { await mountAgentLoopTestDependencies(ctx) - await ctx.plugin(JsonlSessionPersistence, { root, compression: 'zstd', storage: 'jsonl' }) + await ctx.plugin(JsonlSessionPersistence, { root, compression: 'zstd' }) const handle = await ctx.sessionPersistence.create({ version: SESSION_FORMAT_VERSION, id: PARENT_ID, createdAt: TIME_ZERO, cwd: '/bench', isSeeded: false, }, {}) @@ -82,7 +82,7 @@ async function measure(root: string, scenario: string): Promise ctx.llm.registerAdapter(['bench'], adapter)) ctx.effect(() => ctx.tools.register(defineContentToolFixture({ diff --git a/benchmarks/agent-continuation/child-catalog.worker.ts b/benchmarks/agent-continuation/child-catalog.worker.ts index 52356ead70..b07dad9482 100644 --- a/benchmarks/agent-continuation/child-catalog.worker.ts +++ b/benchmarks/agent-continuation/child-catalog.worker.ts @@ -74,7 +74,7 @@ async function run(root: string, mode: string): Promise { async function mountHost(root: string): Promise<{ readonly ctx: Context; readonly controller: SessionController }> { const ctx = new Context() await mountAgentLoopTestDependencies(ctx) - await ctx.plugin(JsonlSessionPersistence, { root: join(root, 'sessions'), compression: 'zstd', storage: 'jsonl' }) + await ctx.plugin(JsonlSessionPersistence, { root: join(root, 'sessions'), compression: 'zstd' }) await ctx.plugin(Storage) await ctx.plugin(StorageJson, { root: join(root, 'storages') }) await ctx.plugin(StorageDomain, { backend: 'json' }) diff --git a/benchmarks/session-open/session-open.bench.ts b/benchmarks/session-open/session-open.bench.ts index e842a9859b..b86870aa17 100644 --- a/benchmarks/session-open/session-open.bench.ts +++ b/benchmarks/session-open/session-open.bench.ts @@ -356,7 +356,7 @@ describe('Session opening benchmark prerequisites', () => { const mount = async () => { const ctx = new Context() contexts.push(ctx) - await ctx.plugin(JsonlSessionPersistence, { root, compression: 'zstd', storage: 'jsonl' }) + await ctx.plugin(JsonlSessionPersistence, { root, compression: 'zstd' }) return ctx.sessionPersistence } try { diff --git a/benchmarks/session-open/session-open.worker.ts b/benchmarks/session-open/session-open.worker.ts index 8aa337c2ad..9571711e43 100644 --- a/benchmarks/session-open/session-open.worker.ts +++ b/benchmarks/session-open/session-open.worker.ts @@ -166,7 +166,7 @@ class SessionBenchmarkHost { await ctx.plugin(SessionStore) } await installProjectionSet(ctx) - await ctx.plugin(JsonlSessionPersistence, { root, compression: 'zstd', storage: 'jsonl' }) + await ctx.plugin(JsonlSessionPersistence, { root, compression: 'zstd' }) let history: WebController | undefined if (scenario === 'first-history') { new BenchmarkSessionQuery(ctx) diff --git a/packages/session/session-persistence-jsonl/tests/fixtures/legacy-persistence.ts b/packages/session/session-persistence-jsonl/tests/fixtures/legacy-persistence.ts index 762445998f..e43007c01b 100644 --- a/packages/session/session-persistence-jsonl/tests/fixtures/legacy-persistence.ts +++ b/packages/session/session-persistence-jsonl/tests/fixtures/legacy-persistence.ts @@ -16,7 +16,7 @@ export const name = 'session-persistence-jsonl-legacy-tests' */ export async function apply(ctx: Context, config: Config): Promise { await persistence.apply(ctx, { - root: config.root, storage: 'jsonl', + root: config.root, ...config.compression === undefined ? {} : { compression: config.compression }, ...config.listConcurrency === undefined ? {} : { listConcurrency: config.listConcurrency }, }) diff --git a/packages/skill/skill-office/tests/docx-validation.e2e.ts b/packages/skill/skill-office/tests/docx-validation.e2e.ts index e238c35e26..6d2a2d8130 100644 --- a/packages/skill/skill-office/tests/docx-validation.e2e.ts +++ b/packages/skill/skill-office/tests/docx-validation.e2e.ts @@ -39,7 +39,7 @@ d.save('input.docx') { insert: [{ id: 'skill-office', name: '@deepseek-ai/dsh-skill-office', config: { assetRoot: join(repo, 'packages/skill/skill-office/assets') } }] }, { insert: [{ id: 'workspace-dependencies', name: '@deepseek-ai/dsh-tool-workspace-dependencies', config: { source: runtime! } }] }, ...officeModelPatches(), - { id: 'session-persistence-jsonl', config: { root: join(cwd, '.sessions'), storage: 'jsonl', compression: 'none' } }, + { id: 'session-persistence-jsonl', config: { root: join(cwd, '.sessions'), compression: 'none' } }, ])) }, async inspect(cwd) { diff --git a/packages/skill/skill-office/tests/fixtures/visual-intent.ts b/packages/skill/skill-office/tests/fixtures/visual-intent.ts index 1492f92fed..8754fd5013 100644 --- a/packages/skill/skill-office/tests/fixtures/visual-intent.ts +++ b/packages/skill/skill-office/tests/fixtures/visual-intent.ts @@ -93,7 +93,7 @@ export function registerVisualIntentCases(selected: readonly DocumentFormat[]): ...officeToolPatches(), { insert: [{ id: 'workspace-dependencies', name: '@deepseek-ai/dsh-tool-workspace-dependencies', config: { source: runtime! } }] }, ...officeModelPatches(), - { id: 'session-persistence-jsonl', config: { root: sessionRoot, storage: 'jsonl', compression: 'none' } }, + { id: 'session-persistence-jsonl', config: { root: sessionRoot, compression: 'none' } }, ])) }, async inspect(cwd) { diff --git a/packages/skill/skill-office/tests/render-tools.e2e.ts b/packages/skill/skill-office/tests/render-tools.e2e.ts index 7ecb7729b0..08ada06519 100644 --- a/packages/skill/skill-office/tests/render-tools.e2e.ts +++ b/packages/skill/skill-office/tests/render-tools.e2e.ts @@ -25,7 +25,7 @@ async function prepareOffice(cwd: string) { { insert: [{ id: 'skill-office', name: '@deepseek-ai/dsh-skill-office', config: { assetRoot: join(repo, 'packages/skill/skill-office/assets') } }] }, ...officeToolPatches(), { insert: [{ id: 'workspace-dependencies', name: '@deepseek-ai/dsh-tool-workspace-dependencies', config: { source: runtime! } }] }, - { id: 'session-persistence-jsonl', config: { root: join(cwd, '.sessions'), storage: 'jsonl', compression: 'none' } }, + { id: 'session-persistence-jsonl', config: { root: join(cwd, '.sessions'), compression: 'none' } }, ])) } diff --git a/packages/skill/skill-office/tests/xlsx-validation.e2e.ts b/packages/skill/skill-office/tests/xlsx-validation.e2e.ts index 74892d828a..7e147a02c4 100644 --- a/packages/skill/skill-office/tests/xlsx-validation.e2e.ts +++ b/packages/skill/skill-office/tests/xlsx-validation.e2e.ts @@ -95,7 +95,7 @@ describe.skipIf(!process.env.DEEPSEEK_API_KEY || !runtime).each(['native', 'ptc' { insert: [{ id: 'workspace-dependencies', name: '@deepseek-ai/dsh-tool-workspace-dependencies', config: { source: runtime! } }] }, ...officeModelPatches(), { id: 'attachment-local', config: { dshHome: imageRoot } }, - { id: 'session-persistence-jsonl', config: { root: sessionRoot, storage: 'jsonl', compression: 'none' } }, + { id: 'session-persistence-jsonl', config: { root: sessionRoot, compression: 'none' } }, ])) }, async inspect(cwd) { diff --git a/packages/team/agent-team/tests/persistence.spec.ts b/packages/team/agent-team/tests/persistence.spec.ts index e132dbfc35..0b5500e1ad 100644 --- a/packages/team/agent-team/tests/persistence.spec.ts +++ b/packages/team/agent-team/tests/persistence.spec.ts @@ -61,7 +61,6 @@ const backends: PersistenceMount[] = [ name: 'JSONL', mount: async (ctx, root) => await ctx.plugin(JsonlSessionPersistence, { root: join(root, 'jsonl'), - storage: 'jsonl', compression: 'none', }), }, diff --git a/scripts/migrate-sessions-to-v4.spec.ts b/scripts/migrate-sessions-to-v4.spec.ts index abaf05991d..73752e95e7 100644 --- a/scripts/migrate-sessions-to-v4.spec.ts +++ b/scripts/migrate-sessions-to-v4.spec.ts @@ -341,7 +341,7 @@ describe('one-time V4 migration command', () => { const ctx = new Context(); let prototype; try { - await ctx.plugin(Backend, { root: ${JSON.stringify(temporaryRoot())}, storage: 'jsonl' }); + await ctx.plugin(Backend, { root: ${JSON.stringify(temporaryRoot())} }); prototype = Object.getPrototypeOf(ctx.sessionPersistence); } finally { await ctx.fiber.dispose(); diff --git a/scripts/migrate-sessions-to-v4.ts b/scripts/migrate-sessions-to-v4.ts index f67957c44c..f0a8454420 100644 --- a/scripts/migrate-sessions-to-v4.ts +++ b/scripts/migrate-sessions-to-v4.ts @@ -208,7 +208,7 @@ async function migrate(root: string, jobs: number): Promise { const compression = candidates.find(candidate => candidate.source !== undefined)?.source?.compression ?? 'zstd' const ctx = new Context() try { - await ctx.plugin(JsonlSessionPersistence, { root, compression, storage: 'jsonl' }) + await ctx.plugin(JsonlSessionPersistence, { root, compression }) let completed = 0 await runMigrationJobs(candidates.length, jobs, async (index, retry) => { const candidate = candidates[index]