ソースを参照

test(desktop): fix runtime CI fixtures across platforms

07akioni 3 週間 前
親
コミット
5105c77706

+ 9 - 2
apps/cli/tests/desktop-host.e2e.ts

@@ -11,7 +11,14 @@ import { expect, it, onTestFinished } from 'vitest'
 it.each([false, true])('settles startup after parent IPC disconnect (boot failure: %s)', async (fail) => {
   const root = mkdtempSync(join(tmpdir(), 'desktop-disconnect-'))
   const modules = join(root, 'node_modules', '@deepseek-ai')
-  for (const name of ['dsh-app-boot', 'dsh']) mkdirSync(join(modules, name), { recursive: true })
+  for (const name of ['dsh-app-boot', 'dsh', 'dsh-home-paths', 'dsh-tools']) mkdirSync(join(modules, name), { recursive: true })
+  for (const [name, source] of [
+    ['dsh-home-paths', `export const resolveDshHome = () => ${JSON.stringify(root)}`],
+    ['dsh-tools', 'export const defineTool = value => value'],
+  ] as const) {
+    writeFileSync(join(modules, name, 'package.json'), '{"type":"module","exports":"./index.js"}')
+    writeFileSync(join(modules, name, 'index.js'), source)
+  }
   writeFileSync(join(root, 'package.json'), '{"type":"module"}')
   writeFileSync(join(modules, 'dsh-app-boot', 'package.json'), '{"type":"module","exports":"./index.js"}')
   writeFileSync(join(modules, 'dsh-app-boot', 'index.js'), 'export const loadProfileDirectory = () => ({}); export const loadLayeredEnv = () => ({})')
@@ -22,7 +29,7 @@ it.each([false, true])('settles startup after parent IPC disconnect (boot failur
       process.send({ type: 'booting' });
       return new Promise((resolve, reject) => process.once('disconnect', () => {
         if (${String(fail)}) { reject(new Error('fixture boot failure')); return; }
-        resolve({ ctx: { connection: { authenticatedUrl: value => value }, webServer: { port: 19387 } },
+        resolve({ ctx: { plugin: async () => {}, connection: { authenticatedUrl: value => value }, webServer: { port: 19387 } },
           shutdown: { shutdown: async () => writeFileSync(${JSON.stringify(join(root, 'stopped'))}, 'stopped') } });
       }));
     }

+ 6 - 0
snapshots/session/workspace-dependencies/cordis.snapshot.yml

@@ -50,3 +50,9 @@
       config:
         source: !!js process.cwd() + "/runtime-source"
         root: !!js process.cwd() + "/runtime-installed"
+
+- id: tool-bash
+  disabled: true
+
+- id: tool-pwsh
+  disabled: true

+ 6 - 0
snapshots/session/workspace-dependencies/cordis.yml

@@ -4,3 +4,9 @@
       config:
         source: !!js process.cwd() + '/runtime-source'
         root: !!js process.cwd() + '/runtime-installed'
+
+- id: tool-bash
+  disabled: true
+
+- id: tool-pwsh
+  disabled: true

+ 0 - 2
snapshots/session/workspace-dependencies/system-prompt.expected.md

@@ -5,8 +5,6 @@ You are a coding assistant powered by the deepseek-v4-flash model. Your working
 Verify your work by running the code or tests. Keep answers brief and factual.
 
 
-Non-zero exits are reported as `[exit code: N]` markers; investigate failures before moving on. On Windows a killed process settles as `[exit code: 1]` without a signal marker; treat a bare exit 1 after an interruption as a termination, not a command failure.
-
 Use the read tool — not shell commands like cat — to inspect text files. Results include line numbers. Use offset and limit to continue reading large files.
 
 Use the write tool to create files or completely replace file contents. Existing files are overwritten, so read an existing file first (the default fs-observation-policy requires it) and prefer edit for targeted changes.

ファイルの差分が大きいため隠しています
+ 0 - 2
snapshots/session/workspace-dependencies/tool-schemas.expected.json


この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません