test: 补第三轮 Q08 junction/Q11 recovery/Q01 health 回归与深色窄屏证据
- 154/154 tests - Q08c 真实 junction 别名同根互斥 - Q11d 补偿失败写 config-recovery.jsonl - Q01 health missing+writable=false 返回 503 - 深色 1440x900、窄屏 900x700 宿主截图
This commit is contained in:
parent
198dd25d6d
commit
88e550896a
|
|
@ -51,7 +51,7 @@
|
|||
## 验证
|
||||
|
||||
```sh
|
||||
node --test --test-isolation=none sansheng/test/*.test.js # 151 tests
|
||||
node --test --test-isolation=none sansheng/test/*.test.js # 154 tests
|
||||
node --check sansheng/client.js && node --check sansheng/index.js
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# 验收矩阵与证据状态(候选版本 v0.2.4)
|
||||
# 验收矩阵与证据状态(候选版本 v0.2.4)
|
||||
|
||||
日期:2026-11-14
|
||||
结论:**候选版本**。仓库内自动化回归 **151/151 通过**;已在隔离测试 profile(独立 DSH_HOME,宿主 0.2.2-rc.3)完成真实宿主冒烟:原生项目树、原生聊天、右栏三卡与 Bot 切换,DS-Bot 全局 shell 未接管,控制台无 DS-Bot 重挂/设置冲突警告,证据见 `03-host-smoke.md`。真实模型 E2E(E01–E04)、深色/窄屏仍缺失;用户日常 desktop profile 未修改。
|
||||
结论:**候选版本**。仓库内自动化回归 **154/154 通过**;已在隔离测试 profile(独立 DSH_HOME,宿主 0.2.2-rc.3)完成真实宿主冒烟:原生项目树、原生聊天、右栏三卡与 Bot 切换,DS-Bot 全局 shell 未接管,控制台无 DS-Bot 重挂/设置冲突警告,证据见 `03-host-smoke.md`。真实模型 E2E(E01–E04)、深色/窄屏仍缺失;用户日常 desktop profile 未修改。
|
||||
|
||||
## 1. 自动化测试入口
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ node --check sansheng/index.js
|
|||
- `api-v3.test.js`:状态投影与历史折叠
|
||||
- `gate-install.test.js`:F01、unknown 身份、治理损坏、跨项目
|
||||
- `client.test.js`:右栏/入口/项目上下文(见 UI 工作包报告)
|
||||
- 审查修复回归:Q01/Q01b/Q01c(store+apply)、Q02/Q02b(governance+gate 双故障)、Q03(unknown 工具)、Q04(governance 群/target/Main)、Q05/Q05b/Q05c(observer)、Q06/G06(draft+最终复核)、Q07(artifact/gate)、Q08/Q08b(提交租约+真实写根)、Q09(store+HTTP route)、Q10(records)、Q11/Q11b/Q11c(config 回滚+并发)、Q12/Q12b(Hook+超时)、Q13(needsKey 服务端+前端)。
|
||||
- 审查修复回归:Q01/Q01b/Q01c(store+apply)、Q02/Q02b(governance+gate 双故障)、Q03(unknown 工具)、Q04(governance 群/target/Main)、Q05/Q05b/Q05c(observer)、Q06/G06(draft+最终复核)、Q07(artifact/gate)、Q08/Q08b/Q08c(提交租约+真实写根+junction)、Q09(store+HTTP route)、Q10(records)、Q11/Q11b/Q11c/Q11d(config 回滚+并发+recovery sidecar)、Q12/Q12b(Hook+超时)、Q13(needsKey 服务端+前端)。
|
||||
|
||||
## 2. 入口与布局
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ node --check sansheng/index.js
|
|||
| U02 从项目树打开 A | 真实宿主冒烟通过(测试 profile) | 左栏保持 workspace-groups 项目树;右栏三卡与「Bot 切换」独立于左栏;workspace-groups 右键菜单组件级测试通过 |
|
||||
| U03 右栏重复点击聚焦 | 组件级通过 | `openRolesTab` 优先 better-sidebar/openTabIn;现有测试覆盖回退 |
|
||||
| U04 Better Sidebar 缺失/失败 | 真实宿主冒烟通过(回退入口) | 测试 profile 无 better-sidebar:左栏底部「三省」按钮可打开右栏「角色」页签;见 `03-host-smoke.md` |
|
||||
| U05 小窗口/宽屏/主题 | 部分验证 | 1440×900 浅色截图;深色/窄屏未测 |
|
||||
| U05 小窗口/宽屏/主题 | 真实宿主通过(浅/深/窄) | 1440×900 浅色与深色、900×700 窄屏:原生项目树/输入框/右栏可用;无页面错误;见 `host-dark.png`、`host-narrow.png` |
|
||||
| UI01 原生共存模式 | 真实宿主冒烟通过(浅色) | `__SANSENG_WORKBENCH__` 标记让 DS-Bot 走 agent surface;`dsShell=false`、原生项目树/聊天/设置入口保留;无全局主题接管 |
|
||||
| UI02 保留项目树不误重挂 | 真实宿主通过 | 控制台无 `sidebar entry missing/remounting` 警告;verifySidebar 在共存模式直接跳过 |
|
||||
| UI03 右栏不被抽屉折叠 | 真实宿主通过(未打开 Bot 详情) | 右栏决策 effect 在共存模式不安装,回调也有 guard;角色页签可打开;Bot 详情交叉打开未操作 |
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ profile `web-test` 的 bundles:`@deepseek-ai/dsh-base`、`@deepseek-ai/dsh-web
|
|||
| 模型切换 | 组件/服务端测试通过;测试 profile 没有 API Key,`/sansheng/state` 的 `models` 为空,角色卡显示「默认模型」,未能真实切换 | `client.test.js`、Q11 测试 |
|
||||
| v0.2.3 审查修复后重启 | `GET /sansheng/health` 200:store `ok`、`governance:true`、Bot 4 / 群 1;`/sansheng/state` 200,严格 schema 加载既有 v3 状态;左栏项目树/右栏三卡/Bot 切换保持可用 | `evidence/host-v023.png` |
|
||||
| v0.2.4 原生共存模式 | 浏览器 `__SANSENG_WORKBENCH__=true`;DS-Bot 不安装全局 shell(`dsShell=false`);左栏原生 DSH 项目树、主聊天/输入框/设置入口保留;控制台 0 条 DS-Bot 重挂/设置冲突警告;右栏「角色」+「Bot 切换」可打开 | `evidence/host-native-coexistence.png` |
|
||||
| 深色/窄屏 | 深色 1440×900 与窄屏 900×700 下原生项目树/聊天/输入框保持;900 宽时侧栏收成图标,底部「三省」仍可点开右栏角色页签;无页面错误 | `evidence/host-dark.png`、`evidence/host-narrow.png` |
|
||||
|
||||
HTTP 响应原文(初始空状态):
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# 发布说明(候选版本 v0.2.4 / ds-bot 0.3.2-sansheng.4)
|
||||
# 发布说明(候选版本 v0.2.4 / ds-bot 0.3.2-sansheng.4)
|
||||
|
||||
日期:2026-11-14
|
||||
状态:**候选版本**。可用于隔离测试环境;用户日常 desktop profile 未由实施者修改。
|
||||
|
|
@ -79,12 +79,12 @@ node <path-to-pnpm.cjs> pack --pack-destination ..\dist
|
|||
|
||||
- 真实模型 E2E(E01–E04)未执行;隔离测试 profile 无 API key。
|
||||
- Q04 记忆边界为源码级修复 + governance 回归;没有 ds-bot 整模块/真实宿主注入测试。
|
||||
- Q08 只覆盖当前已知写工具(write/edit/apply_patch/shell/pwsh 等);后台 job 返回后仍会释放租约,第三方工具若绕过这些入口仍可能不受根租约约束;进程崩溃后的租约只能等过期。
|
||||
- Q08 已覆盖已知写工具、同根/junction 别名、提交与写工具共用根锁;后台 job 返回后仍会释放租约,第三方工具若绕过这些入口仍可能不受根租约约束;进程崩溃后的租约只能等过期。
|
||||
- Q11 真实 `selectModel`/忙碌会话故障注入未执行;补偿失败 sidecar `config-recovery.jsonl` 在 Store 完全不可写时也可能失败。
|
||||
- Q12 的真实 React 浏览器时间线未自动化;已用提取的 poller/Hook helper + 真实宿主浅色冒烟覆盖。
|
||||
- UI01–UI03 只在隔离测试 profile 的浅色 1440×900 验证;深色、窄屏、Bot 详情/终端/文件交叉打开和 DS-Bot 先加载顺序未操作验证。
|
||||
- 真实模型 E2E(E01–E04)、深色/窄屏、长消息/连续工具流仍缺;不把 144 项单测写成真实 DSH E2E 全通过。
|
||||
- UI01–UI03 在隔离测试 profile 的浅色 1440×900、深色 1440×900、窄屏 900×700 验证;Bot 详情/终端/文件交叉打开、DS-Bot 先加载顺序仍未操作。
|
||||
- 真实模型 E2E(E01–E04)、长消息/连续工具流仍缺;不把 154 项单测写成真实 DSH E2E 全通过。
|
||||
- `workspace-groups-remote` 项目树右键菜单未在真实测试 profile 复现(DS Bot 页面占据左栏);组件级 contextMenus 测试通过。用户日常环境若项目树可见,右键「三省六部」应可用;若不可用,用左栏底部「三省」入口。
|
||||
- 深色模式、窄屏、长消息/连续工具流未截图验证。
|
||||
- 长消息/连续工具流未截图验证。
|
||||
- 项目树适配采用宿主原生 `contextMenus` + `sidebar.footer.action` + 右栏页签;不使用私有 DOM。
|
||||
- `ds-bot` 补丁需在升级上游后重放(见 `ds-bot/PATCHES.md` 升级步骤)。
|
||||
|
|
|
|||
|
|
@ -12,10 +12,8 @@
|
|||
https://git.qyhhh.top/DeepsSeekHarness/dsh-sansheng-liubu/releases/tag/v0.2.2-sansheng
|
||||
- 发布产物:`dist/dsh-sansheng-sansheng-0.2.2.tgz`、`dist/ds-bot-0.3.2-sansheng.2.tgz`
|
||||
- 审查修复 v0.2.3:本地提交(当前 HEAD)(`dsh-sansheng-sansheng@0.2.3` / `ds-bot@0.3.2-sansheng.3`),144/144 回归;按审查“不授权推送/发布”暂未推 Gitea,tarball 只在 `dist/`。
|
||||
- 第三轮审查修复 v0.2.4:`dsh-sansheng-sansheng@0.2.4` / `ds-bot@0.3.2-sansheng.4`,151/151 回归;UI01–UI03 原生共存、Q01/Q02 启动保护、Q11–Q13 补强;仍未推送/发布。
|
||||
- 第三轮审查修复 v0.2.4:`dsh-sansheng-sansheng@0.2.4` / `ds-bot@0.3.2-sansheng.4`,154/154 回归;UI01–UI03 原生共存、Q01/Q02 启动保护、Q11–Q13 补强;仍未推送/发布。
|
||||
- 当前状态:候选版本,真实模型 E2E(E01–E04)未执行;日常 desktop profile 未修改。
|
||||
|
||||
> 说明:仓库的 `master` 分支仍是旧版结构(工作台/panel 目录),与 `feat/dsbot` 不在同一历史线。
|
||||
> 本次实施以 `feat/dsbot` 为开发/集成分支,未向 `master` 强推或覆盖旧结构。
|
||||
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 67 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 51 KiB |
|
|
@ -531,3 +531,23 @@ test('Q01c:真实 apply 启动链在主状态缺失时不覆盖 registry,pro
|
|||
await env.cleanup()
|
||||
}
|
||||
})
|
||||
|
||||
test('Q11d:补偿失败写 config-recovery.jsonl,不再只返回一次文本', async () => {
|
||||
const { readFile } = await import('node:fs/promises')
|
||||
const env = await setup()
|
||||
try {
|
||||
await env.tool('sansheng_provision').execute({ project: '项目A', workDir: 'C:/work/a' }, userExec)
|
||||
await env.reload()
|
||||
const project = Object.values(env.store.peek().projects)[0]
|
||||
env.rt.updateBot = async (id, patch) => {
|
||||
if (id === project.bots.shangshu) throw new Error('尚书模型写入永久失败')
|
||||
return { id, ...patch }
|
||||
}
|
||||
const result = await env.tool('sansheng_config').execute({ project: project.id, models: { lead: 'provider/m1', shangshu: 'provider/m2' } }, userExec)
|
||||
assert.match(result, /回滚失败|config-recovery/)
|
||||
const sidecar = await readFile(join(env.dir, 'config-recovery.jsonl'), 'utf8')
|
||||
assert.match(sidecar, /config-recovery|项目|shangshu|provider\/m2/)
|
||||
} finally {
|
||||
await env.cleanup()
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -160,3 +160,17 @@ test('Q09:HTTP 核实拒绝 projectId 与派发所属项目不一致', async (
|
|||
await rm(dir, { recursive: true, force: true })
|
||||
}
|
||||
})
|
||||
|
||||
test('Q01:主状态缺失但 registry 有证据时 /sansheng/health 返回 503', async () => {
|
||||
const web = { register() { return () => {} } }
|
||||
const routes = routesOf(web)
|
||||
const store = {
|
||||
...fakeStore(),
|
||||
health: () => ({ status: 'missing', writable: false, registryStatus: 'ok', registryEntries: 4, error: '主状态缺失' }),
|
||||
}
|
||||
installRoute({ ctx: fakeCtx(web), store, dsbot: { botOf: () => undefined, roomOf: () => undefined, snapshot: () => ({ bots: {}, rooms: {} }) } })
|
||||
const res = fakeRes()
|
||||
await routes.find(item => item.path === '/sansheng/health').handler({ method: 'GET' }, res)
|
||||
assert.equal(res.statusCode, 503)
|
||||
assert.equal(JSON.parse(res.body).store.writable, false)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -236,3 +236,24 @@ test('Q08:不同项目指向同一工作根也共享独占租约', async () =>
|
|||
await rm(dir, { recursive: true, force: true })
|
||||
}
|
||||
})
|
||||
|
||||
test('Q08c:junction 别名解析到同一物理工作根', async () => {
|
||||
if (process.platform !== 'win32') return
|
||||
const { execFileSync } = await import('node:child_process')
|
||||
const { mkdir } = await import('node:fs/promises')
|
||||
const dir = await mkdtemp(join(tmpdir(), 'sansheng-alias-'))
|
||||
const real = join(dir, 'real-root')
|
||||
const alias = join(dir, 'alias-root')
|
||||
try {
|
||||
await mkdir(real)
|
||||
execFileSync('cmd', ['/c', 'mklink', '/J', alias, real], { stdio: 'ignore' })
|
||||
const store = new SanshengStore(join(dir, 'state.json'))
|
||||
await store.load()
|
||||
assert.equal((await store.acquireRootLease(real, { holder: 'a' })).ok, true)
|
||||
const second = await store.acquireRootLease(alias, { holder: 'b' })
|
||||
assert.equal(second.ok, false, 'junction 别名不能绕过根租约')
|
||||
} finally {
|
||||
try { execFileSync('cmd', ['/c', 'rmdir', alias], { stdio: 'ignore' }) } catch { /* not made */ }
|
||||
await rm(dir, { recursive: true, force: true })
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue