dsh-llm-verifier 0.9.3 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/package.json +10 -6
- package/src/cache.test.ts +13 -1
- package/src/topic-storage.test.ts +18 -8
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## 0.9.4 - 2026-10-10
|
|
6
|
+
|
|
7
|
+
- **[构建 / 发布] `lib/` 转为构建产物,不再入库**
|
|
8
|
+
- `lib/` 加入 `.gitignore` 并解除跟踪;发布时由 `prepublishOnly`(`verify:release`)重建,再经 `files` 字段打进 tarball
|
|
9
|
+
- `files` 新增 `CHANGELOG.md`,并固定 `publishConfig.access` 为 `public`
|
|
10
|
+
- **[自动化] 接入 GitHub Actions 自动发版工作流与发版技能**
|
|
11
|
+
- `v*` tag 触发:typecheck → build → test → 从 CHANGELOG 提取 release notes → `pnpm pack` 打包 → 发布 npm 与 GitHub Release
|
|
12
|
+
- 附带 CI 工作流,在 Ubuntu 与 Windows 双平台验证
|
|
13
|
+
- **[修复] 发版工作流的三处失败点**
|
|
14
|
+
- 锁定 pnpm 11:pnpm 9 无法解析 `pnpm-workspace.yaml` 的 `minimumReleaseAgeExclude`,会把每条命令都误报成 `packages field missing or empty`
|
|
15
|
+
- 移除会在任何测试运行前就失败的 pnpm 缓存步骤
|
|
16
|
+
- `pnpm pack` 的完整清单曾被整体写入 `$GITHUB_OUTPUT`,导致 Release 收到多行 blob;现只取 `.tgz` 那一行,并在 `NPM_TOKEN` 缺失时直接给出补救提示,而非只抛裸 `ENEEDAUTH`
|
|
17
|
+
- **[测试] 两处断言改为平台无关表达**:缓存路径断言与 topic-storage fixture 改用平台辅助函数构造,不再依赖 POSIX 形式路径
|
|
18
|
+
- **[杂项] 清理失效的 `.claude/skills` 指针与临时截图**,`AGENTS.md` 硬性规矩 1 同步更正为「`lib/` 不入库」
|
|
19
|
+
|
|
20
|
+
## 0.9.3 - 2026-10-05
|
|
21
|
+
|
|
22
|
+
- **[UI / Client] 新增 LLM Verifier Web 界面组件与源码映射**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-llm-verifier",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "Configurable DSH-native LLM verifier with a Web settings page",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -105,15 +105,19 @@
|
|
|
105
105
|
"src",
|
|
106
106
|
"scripts",
|
|
107
107
|
"cordis.patch.yml",
|
|
108
|
-
"README.md"
|
|
108
|
+
"README.md",
|
|
109
|
+
"CHANGELOG.md"
|
|
109
110
|
],
|
|
111
|
+
"license": "MIT",
|
|
112
|
+
"publishConfig": {
|
|
113
|
+
"access": "public"
|
|
114
|
+
},
|
|
110
115
|
"scripts": {
|
|
111
116
|
"build": "node -e \"require('node:fs').rmSync('lib',{recursive:true,force:true})\" && tsc -p tsconfig.build.json && tsdown && node scripts/sync-installed-profiles.mjs",
|
|
112
117
|
"typecheck": "tsc --noEmit -p tsconfig.build.json",
|
|
113
118
|
"typecheck:local": "node scripts/check-harness-types.mjs && tsc --noEmit -p tsconfig.local.json",
|
|
114
119
|
"test": "vitest run",
|
|
115
120
|
"verify:release": "pnpm run typecheck && pnpm test && pnpm run build",
|
|
116
|
-
"
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
}
|
|
121
|
+
"release": "node .dsh/skills/release-plugin/scripts/release.mjs"
|
|
122
|
+
}
|
|
123
|
+
}
|
package/src/cache.test.ts
CHANGED
|
@@ -144,7 +144,19 @@ describe('ScoreCache', () => {
|
|
|
144
144
|
})
|
|
145
145
|
|
|
146
146
|
it('resolves cache file path correctly', () => {
|
|
147
|
-
|
|
147
|
+
// Build the input with the host separator and assert with host
|
|
148
|
+
// functions. A literal 'C:\\foo\\bar' made this test pass on Windows
|
|
149
|
+
// only by coincidence: on POSIX, isAbsolute and join both use '/', so
|
|
150
|
+
// the Windows path was treated as RELATIVE and resolved against cwd,
|
|
151
|
+
// yielding cwd + 'C:\\foo\\bar/scores-v1.json'. The assertion then
|
|
152
|
+
// failed on ubuntu while the code under test was correct. The point of
|
|
153
|
+
// the test is the join and the relative/absolute branch, both of which
|
|
154
|
+
// are platform-independent when expressed in platform terms.
|
|
155
|
+
const base = join(tmpdir(), 'cache-root')
|
|
156
|
+
expect(resolveCacheFile(base)).toBe(join(base, 'scores-v1.json'))
|
|
157
|
+
|
|
158
|
+
// A relative dir resolves against cwd rather than being taken as-is.
|
|
159
|
+
expect(resolveCacheFile('relative-dir')).toBe(join(process.cwd(), 'relative-dir', 'scores-v1.json'))
|
|
148
160
|
})
|
|
149
161
|
|
|
150
162
|
it('computes stableHash deterministically', () => {
|
|
@@ -1,21 +1,31 @@
|
|
|
1
|
-
import { dirname, join } from 'node:path'
|
|
1
|
+
import { dirname, join, resolve } from 'node:path'
|
|
2
2
|
import { describe, expect, it } from 'vitest'
|
|
3
3
|
import type { SessionHeader } from '@deepseek-ai/dsh-session'
|
|
4
4
|
import { resolveTopicDataDir } from './topic-storage.ts'
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// Fixture roots are built with resolve() so they are ABSOLUTE on every
|
|
7
|
+
// platform. A literal 'C:\\Users\\...' is relative on POSIX, where dirname
|
|
8
|
+
// then operates on cwd + that string and the assertion against the
|
|
9
|
+
// implementation fails while the implementation is correct.
|
|
10
|
+
const header = { id: 'session-test', cwd: resolve('workspace'), createdAt: 1 } as unknown as SessionHeader
|
|
11
|
+
const SESSIONS_ROOT = resolve('sessions-root')
|
|
12
|
+
const DATA_ROOT = resolve('data-root')
|
|
7
13
|
|
|
8
14
|
describe('resolveTopicDataDir', () => {
|
|
9
15
|
it('places verifier files beside the session artifact', () => {
|
|
10
|
-
const artifact = join(
|
|
16
|
+
const artifact = join(SESSIONS_ROOT, 'project', 'session-test', 'session.jsonl.zstd')
|
|
11
17
|
const result = resolveTopicDataDir({ locate: () => ({ path: artifact }) }, header, 'verifier')
|
|
12
18
|
expect(result).toBe(join(dirname(artifact), 'verifier'))
|
|
13
19
|
})
|
|
14
20
|
|
|
15
21
|
it('rejects paths that escape the topic directory', () => {
|
|
16
|
-
const locator = { locate: () => ({ path: join(
|
|
17
|
-
|
|
18
|
-
|
|
22
|
+
const locator = { locate: () => ({ path: join(DATA_ROOT, 'session-test', 'session.jsonl') }) }
|
|
23
|
+
// Build the escaping path with join() so it is '../shared' on POSIX and
|
|
24
|
+
// '..\shared' on Windows. A literal '..\shared' is one ordinary segment
|
|
25
|
+
// on POSIX (backslash is not a separator), so it never escapes and the
|
|
26
|
+
// assertion failed there while the implementation was correct.
|
|
27
|
+
expect(() => resolveTopicDataDir(locator, header, join('..', 'shared'))).toThrow(/inside the topic directory/u)
|
|
28
|
+
expect(() => resolveTopicDataDir(locator, header, SESSIONS_ROOT)).toThrow(/relative/u)
|
|
19
29
|
})
|
|
20
30
|
|
|
21
31
|
it('fails closed when the backend cannot locate a topic artifact', () => {
|
|
@@ -24,8 +34,8 @@ describe('resolveTopicDataDir', () => {
|
|
|
24
34
|
})
|
|
25
35
|
|
|
26
36
|
it('falls back to root-based path when locate is missing', () => {
|
|
27
|
-
const result = resolveTopicDataDir({ root:
|
|
28
|
-
expect(result).toBe(join(
|
|
37
|
+
const result = resolveTopicDataDir({ root: DATA_ROOT }, header, 'verifier')
|
|
38
|
+
expect(result).toBe(join(DATA_ROOT, 'session-test', 'verifier'))
|
|
29
39
|
})
|
|
30
40
|
})
|
|
31
41
|
|