瀏覽代碼

Merge pull request #2634 from deepseek-harness/fix/ci-081800

fix: dep version issue from #1083
imccyu 1 月之前
父節點
當前提交
027bd013bc

+ 1 - 1
packages/code-runtime/code-runtime-python/package.json

@@ -1,7 +1,7 @@
 {
   "name": "@deepseek-ai/dsh-code-runtime-python",
   "description": "CPython subprocess implementation of the DeepSeek Harness code-execution seam",
-  "version": "0.1.0-rc.6",
+  "version": "0.1.0-rc.7",
   "publishConfig": {
     "access": "public"
   },

+ 3 - 2
packages/context/agent-instructions/tests/agent-instructions.spec.ts

@@ -1,5 +1,5 @@
 import { chmod, mkdtemp, mkdir, rm, stat, symlink, utimes, writeFile } from 'node:fs/promises'
-import { dirname, join, resolve } from 'node:path'
+import { dirname, isAbsolute, join, relative, resolve } from 'node:path'
 import { tmpdir } from 'node:os'
 import { describe, expect, it, vi } from 'vitest'
 import { Context } from '@deepseek-ai/cordis'
@@ -80,7 +80,8 @@ class RecordingFileSystem extends FileSystem {
   override fileUrl(target: FsTarget): string { return `file://${target.targetKey}` }
 
   override contains(parent: FsTarget, child: FsTarget): boolean {
-    return child.targetKey === parent.targetKey || String(child.targetKey).startsWith(`${parent.targetKey}/`)
+    const descendant = relative(String(parent.targetKey), String(child.targetKey))
+    return descendant === '' || (!descendant.startsWith('..') && !isAbsolute(descendant))
   }
 
   override async stat(target: FsTarget, signal?: AbortSignal): Promise<FsInfo | undefined> {