fix(web): sync activity-receipt contract with live model replies
The staging quality gate scanned the old settled.spoken streaming state after the live path started rendering answer.delta as raw. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -5531,6 +5531,22 @@
|
||||
- 复发自:无
|
||||
- 修复版本:未修复
|
||||
|
||||
## BUG-378 | staging 质量门 2021/2022:activity 合同仍要求 settled.spoken
|
||||
|
||||
- 状态:resolved
|
||||
- 首次发现:2026-08-25
|
||||
- 最近更新:2026-08-25
|
||||
- 影响面:Gitea `backend-quality-gate.yml` validate `npm test --prefix frontend`、`rectification-activity-receipt.test.ts`、staging 发布
|
||||
- 用户现象:向 `staging` 推送 `2e8c748b` 后 quality gate run `2069` 失败。`validate` job `5163` 前端 2021 通过、1 失败。`publish` job `5164` 因 `needs: validate` 1 秒跳过。
|
||||
- 触发条件:完整 `xiaoxin` runner 跑前端全量测试。
|
||||
- 根因:BUG-377 把直播 `answer.delta` 改成原样显示 `raw`,聚焦套件未覆盖 `rectification-activity-receipt.test.ts`。该合同仍扫描 `state: settled.spoken ? "streaming" : "thinking"`。
|
||||
- 修复:合同改为锁定 `state: raw.trim() ? "streaming" : "thinking"` 和 `text: raw`,并禁止再出现 `settled.spoken`。流式时仍保留 `正在组织回答…`,不得把 `activeActivity` 清掉。
|
||||
- 验证:`frontend/tests/rectification-activity-receipt.test.ts`。
|
||||
- 防复发:改生时纠正直播 `answer.delta` 渲染时必须跑 `rectification-activity-receipt`,不能只跑 stream/entry 聚焦套件。
|
||||
- 相关记录:BUG-369、BUG-370、BUG-377
|
||||
- 复发自:BUG-377(直播回复改成模型正文后,activity 源码合同未同步)
|
||||
- 修复版本:待发布
|
||||
|
||||
## BUG-377 | 生时纠正直播回复必须是模型正文,不得用正则或 Case 模板顶替
|
||||
|
||||
- 状态:resolved
|
||||
|
||||
@@ -99,7 +99,9 @@ test("answer deltas preserve a still-running server activity", () => {
|
||||
chatSource.indexOf('event.type === "answer.delta"'),
|
||||
chatSource.indexOf('event.type === "run.failed"'),
|
||||
);
|
||||
assert.match(deltaBranch, /state: settled\.spoken \? "streaming" : "thinking"/);
|
||||
assert.match(deltaBranch, /state: raw\.trim\(\) \? "streaming" : "thinking"/);
|
||||
assert.match(deltaBranch, /text: raw,/);
|
||||
assert.doesNotMatch(deltaBranch, /settled\.spoken/);
|
||||
assert.match(deltaBranch, /正在组织回答/);
|
||||
assert.doesNotMatch(deltaBranch, /activeActivity:\s*undefined/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user