HEL-879 assembly: merge the HEL-897-verified voice frontend (c61d9c9, hel-878-voice-wiring) - original author's six-file visual base byte-preserved with the late-cleanup/interleaved-start fix (761a2331) already independently re-verified 88/88 by the manager; no visual rework, no backend changes on this side

This commit is contained in:
zonggong
2026-10-27 03:27:07 +08:00
37 changed files with 1828 additions and 11 deletions
+73
View File
@@ -0,0 +1,73 @@
{
"base": "bf234570c0b6595a72f8dbc79e42c63685e08e01",
"patch_sha256": "02a7b3d2c03aee79c9fc7c8a470c7053cd7b8aa410699ec51b255c333acdeda4",
"source_zip_sha256": "4596f2cc03210074be1fc9fe23dcdd607f5d240b16f142b67986c1886ce6e9be",
"files": [
{
"path": "docs/requirements/handoff-HEL-878.json",
"sha256": "258cf2935f5aafc20cd7a80a9550ae062024849ff39c078068f371692bbaa516",
"bytes": 9439
},
{
"path": "web/README.md",
"sha256": "f596492a443e7ae9972496a40db2f40c79f8667d4552628afa4718efbd29c726",
"bytes": 3113
},
{
"path": "web/VENDOR.md",
"sha256": "e11c139b5c7a6f86264439b03997bd89c79e40c994ac1db57f31717e83b660b6",
"bytes": 893
},
{
"path": "web/public/vendor/livekit-client-2.22.4.umd.min.js",
"sha256": "040db4c0db72e7f7599cd0e06b0f58f95e0082a395cdde410ca26224a79a0626",
"bytes": 598796
},
{
"path": "web/src/app/RealApp.tsx",
"sha256": "8afb63b8a6b196e29ced1a8bcef541f1f80a10811f1dc0f965631a9f0c201f5e",
"bytes": 14382
},
{
"path": "web/src/chat/ChatPanel.tsx",
"sha256": "419c2f4243d7a147ea8ebcf377d74c97dc558049a3bf76dee39bba0746d2c9e6",
"bytes": 34936
},
{
"path": "web/src/styles/components.css",
"sha256": "f93b875f6918d402aaaefeffdc52fdd908328fb8ac70766704e528c6a8bc154d",
"bytes": 89243
},
{
"path": "web/src/voice/livekit.ts",
"sha256": "c42475d37f7eef7abe0903b66656aedc5379bc9de3dcba11c1b88450a470ab04",
"bytes": 6859
},
{
"path": "web/src/voice/session.ts",
"sha256": "128123ab75e788699150321ca1341081450c34b09918b0b825c542dbc60b6e07",
"bytes": 18058
},
{
"path": "web/tests/fake-livekit.js",
"sha256": "d16e794308073e967566f3ebda16e72d0f5eb0132b657338baa6a29115b02508",
"bytes": 4177
},
{
"path": "web/tests/hel878_mock.mjs",
"sha256": "d7c9d79308979f1f3cd7172f56f52b4cfb35de1fcbae2876fa7d66ea4e2c3071",
"bytes": 8855
},
{
"path": "web/tests/hel878_shots.mjs",
"sha256": "ad664b26b66990e59ca118b0afe1e6dfea8a64351bb9bbb7a666f332b2f15760",
"bytes": 22874
},
{
"path": "web/tests/voice.test.ts",
"sha256": "f6bc899b3202465ec68b276ed21ccbbc5ba6e7edda014e2d7ea3ff63e5683a73",
"bytes": 20829
}
],
"unchanged_archive_files_match_base": true
}
+20
View File
@@ -0,0 +1,20 @@
HEL-878 源码保全与补查(总管,2026-10-27 北京时间)
原作者提交评论:01a1797c-188d-79df-9be1-df6bd47effc6。读取需求 v1.11/60项;前端基点 bf234570c0b6595a72f8dbc79e42c63685e08e01,后台契约 aba2aeb,实际总装基点 04eff611e7d85e539d43717711172441420ac853,main 3a986726d8593e0ed2274f79db6cc5d807d2ebf0。
13 个改动文件逐字节匹配作者 MANIFEST;补丁 SHA-256 匹配,git apply --reverse --check 通过;源码包其余文件与 bf234570 内容一致(仅允许未改文件 CRLF/LF 差异),包内 MANIFEST 与单独附件一致。原样提交 b95ce798b4a9455d941d247a46865b3ac202bf2c,不改作者业务代码或视觉。
补齐前端分支缺少的历史用户原话文件 comment-evidence-full-experience-20261026.json 及 source-manifest,逐字节来自总装 04eff611;无需求变更。Python 原版检查对 origin/main、origin/hel-870-assembly、origin/agent/2/6a08a4c18f23 各带/不带 handoff-HEL-878.json 共6次通过。
使用既有 node_modules(未安装下载)复跑 typecheck、lint、81项单测、build 全通过;lint 0错/1条既有警告。作者45项浏览器检查本轮未重跑,仍为作者证据。真实语音、真实麦克风、WebRTC、ASR/TTS/LLM请求均未执行;未部署、未合并、未改现有服务或绑定。
独立补查发现必须返修的问题:
1. 第一次会话正常开启;模拟掉线,服务端 DELETE s1 延迟返回。
2. 用户立即开启第二次会话,worker已加入,界面 listening,controller.active=true。
3. 放行第一次的 DELETE(含 settle 补偿请求)。旧 fail() 在 await teardown(live) 之后继续写 OFF,没有重新核对代次,覆盖新会话的界面。
4. 实测:controller.active=true,但最后 onView.phase=off。旧失败提示也会覆盖新会话,界面与麦克风会话状态不一致。
定位 web/src/voice/session.ts 的 start() 内 fail()。附件 review878_late_cleanup.test.ts 为独立负例,放到 web/tests/ 后用 ./node_modules/.bin/vitest run tests/review878_late_cleanup.test.ts 可复现;本轮实际执行失败:Expected listening / Received off,原始日志见 review878-race.log。这里只做有限复现,未代替原作者修改;交原作者修复异步清理后的状态提交边界并补有意义回归。
关联 CG-010/018、VIS-013、UX-005/006、GOV-001–006、DEL-001。原81项通过不涵盖这个负例,不能称离线验收通过。修正后交 HEL-879 统一审核;CG-011语音主动开口仍为空操作、增量字幕仍缺、远端断网清理/租约与API重启实情、真实SDK回调与播放回执、真机三轮/打断/停止/HTTPS均继续承接,不因协议现状或mock通过降低完整要求。R6/R7继续主卡HEL-797承接。
+43
View File
@@ -0,0 +1,43 @@
{
"baseline_version": "1.11",
"read_commit": "bf234570c0b6595a72f8dbc79e42c63685e08e01",
"task": "HEL-878(R5 前端接线,视觉总监本人设计并编码):在已认可的交谈界面上由用户主动开启/结束连续语音;按 HEL-877 后台契约(aba2aeb docs/runbook-hel877-voice.md §3)接 GET /api/voice/status、POST/DELETE /api/voice/session 与 cg.subtitle 字幕,复用 .12 :8090 既有 livekit-client 2.22.4 浏览器客户端;文字与语音同一位她、同一聊天记录,轮次从 /api/messages 回读不串台;所有退出路径立即停麦并清理;零真实模型/嵌入/合成/识别/采集/部署",
"requirement_ids": [
"CG-006", "CG-010", "CG-011", "CG-018", "CG-020",
"VIS-001", "VIS-002", "VIS-003", "VIS-004", "VIS-005", "VIS-006", "VIS-007", "VIS-008", "VIS-009", "VIS-010", "VIS-011", "VIS-012", "VIS-013",
"UX-001", "UX-002", "UX-005", "UX-006",
"AM-001",
"GOV-001", "GOV-002", "GOV-003", "GOV-004", "GOV-005", "GOV-006",
"DEL-001"
],
"deliverable": "自前端原稿 hel-875-proactive-wiring @ bf23457 起的补丁(仅 web/ 与本交接):1) web/src/voice/session.ts——VoiceController 生命周期(代次计数:任何迟到的 token/房间/麦克风/房间事件只清理不显示);顺序为诚实状态(只 GET status,不建房不采麦)→ 加载客户端 → 采麦(拒绝则服务端什么都不开)→ POST session(结束时已在途的请求等其返回并 DELETE,不留孤儿房)→ 加入并发布麦克风 → 等 worker 加入(20 s 未加入如实失败);状态取 worker 的 lk.agent.state,缺属性时按字幕保守推断;interim 为草稿、user_final 取消在途文字回复并触发回读、assistant_final 触发回读、error(φ) 只显示「未记入聊天」不入记录;文字盖过她的语音时静音残余音频直到她回到聆听;结束顺序为停麦→关房间与音频→DELETE;断网时本地立即停采,远端 DELETE 记入本浏览器 cg.voice.owed,恢复网络/再次进入/再次开启时补发(404 视为已清);页面卸载用 keepalive DELETE;mergeTurns/recentRows 只合并非主动留言的服务器行(主动留言仍走原 inbox 轮询),按 turn_id 与已有文字轮去重,pending 行回读至落定。2) web/src/voice/livekit.ts——同源懒加载 /vendor/livekit-client-2.22.4.umd.min.js(来源 .12:8090/static,SHA-256 见 web/VENDOR.md,未改 package.json/锁文件),回声消除采集、她的音频集中在隐藏容器(结束即暂停/清空/移除)、自动播放受阻时提供「点一下听她的声音」、加入可被结束即时中止。3) ChatPanel.tsx——真实模式麦克风按钮按状态诚实标注(不可用时淡化并说明原因),确认框说明麦克风、去向、同一份记忆、如何打断与停止、未经真机验收;沿用原演示 voice-row 位置与视觉语言做成玻璃单行(连接/等待为呼吸、聆听用你的颜色、她说话用她的光色,文字始终写明状态);文字流在无 final 时先查服务器行:被新轮取消即按已取消处理,不报连接中断、不回填草稿;离开交谈/Esc/结束交谈/导航卸载面板即结束语音;在途语音轮期间她的主动留言照原规则排队。4) RealApp.tsx——语音进行中顶栏写「语音(未经真机验收)」。5) components.css 新增 .voice-row.real 等样式(含手机)。6) 测试:web/tests/voice.test.ts 26 项;web/tests/hel878_mock.mjs(HEL-877 路由契约 mock)+ fake-livekit.js(脚本化替身,浏览器假音频设备)+ hel878_shots.mjs 浏览器检查 45 项与截图;web/VENDOR.md、README 语音段落。",
"acceptance": [
"到达交谈页只发一次 GET /api/voice/status:不建房、不申请麦克风、不加载 LiveKit 客户端;configured=false / tts_ok=false / 无路由各有诚实说明,按钮淡化且不弹确认;voice=false 不被当作已接通(浏览器 1–2、单测 honest switch)",
"用户确认后:一个会话、一个麦克风、发布到该房间;等待 worker 时显示等待而非已接通;聆听/思考/说话随 lk.agent.state 切换;字幕草稿、φ 原句(标未记入聊天且不入记录)均按契约(浏览器 4–6)",
"语音轮只从 /api/messages 进入舞台与完整记录,各一次,与文字同一段记录(浏览器 5);前端从不 POST /api/chat 或 /api/chat/received(单测)",
"双通道:文字盖过她说话时残余音频静音、回到聆听再恢复;语音打断在途文字回复时该轮按已取消处理,无“连接中断/重试”、不回填草稿,记录显示已取消(浏览器 7–8)",
"结束语音/导航离开/Esc/结束交谈/房间掉线/麦克风被撤销/服务端拒绝/重复开关后:本地麦克风 track 全部 ended、她的音频与容器移除、服务端房间删除;迟到事件不复活旧会话(浏览器 10–14,单测 lifecycle 15 项)",
"断网:本地立即停麦停音频,远端房间如实记为欠删(不冒充已删);恢复网络后补发 DELETE 并清除记录;页面卸载 keepalive DELETE 到达(浏览器 14);欠删跨页面保留、404 视为已清(单测)",
"电脑 1440×900 与手机 390×844(2x)、月光/雾光两主题截图;手机语音行不出屏(浏览器 15)",
"真实 livekit-client 2.22.4 构建中,适配器用到的全部名称存在(RoomEvent 七项、Track.Source.Microphone、ParticipantKind.AGENT、createLocalAudioTrack、Room 方法/属性);仅 API 面核对,未连接",
"演示入口零语音请求;工程:tsc 0 错,eslint 0 错(1 条既有警告),vitest 7 文件 81/81,vite build 通过"
],
"deferred": [
"真实通话全部未测(R5 真机验收交 HEL-879 统一审核):连续 3 轮、开口打断约 1 s 停声、结束停麦无残音、回声、首包延迟、移动端 Safari/Chrome 麦克风与自动播放、自签 HTTPS 信任;浏览器检查用的是脚本化 LiveKit 替身与 Chromium 假音频设备,不是 WebRTC 通话",
"lk.agent.state 属性名按 livekit-agents 1.x 惯例接入,并在缺失时用字幕推断;worker 实际是否发布该属性须真机确认",
"断网时服务端房间的即时删除在物理上做不到:依赖 worker 在浏览器参与者离开后结束任务与会话登记过期(runbook §3.4/3.5,后台行为未在本卡实测),本页恢复网络或下次进入时补发 DELETE",
"CG-011 语音内主动开口:worker._maybe_open_proactive 仍是空操作,前端未虚构;后台最小需求见 runbook §3.6(会话内取已落库 proactive 行 session.say 原文、可打断、无新回执通道),呈现节奏待总管/视觉总监另定;目前语音开启时她的主动留言仍以文字进入并在她思考/说话时排队",
"她说话时没有逐字字幕(契约只在播放完成后发 assistant_final);舞台在落库后呈现全文。若要边说边显示需后台发增量字幕,属契约变更",
"D1 音色、D3 设备信任、测试额度由总管与白栖知沟通;本卡未接触任何服务、凭据或部署",
"原版 Python 需求检查未在本运行时执行(无 Python、无 git),须总管/总工对实际目标分支与 origin/main 含/不含本交接复跑;需与 HEL-882 最新母线同步后再审",
"R6 天气/素材/备份、R7 视觉观察、CG-028/029 口型与真实视频仍由主卡 HEL-797 承接;整体沉浸体验由白栖知验收"
],
"requirement_changes": [],
"verification": [
"读取:前端 bf234570(总管输入包 frontend/,HEL-875/880 原作者原稿);后台契约 aba2aeb(输入包 voice-backend/:runbook-hel877-voice.md、voice/router.py、session.py、worker.py、handoff-HEL-877.json、requirements v1.11 含 comment-evidence-full-experience-20261026.json);已读 AGENTS.md、README/current(CG-006/010/011/018/020、UX-005/006、VIS-013)/coverage/changes、integration-plan-v1 R5 与 D1/D3、voice-r5-readiness-HEL876.md",
"web:tsc --noEmit 0;eslint src 0 错;vitest run 7 文件 81/81(原 55 + 语音 26,含变异检查:去掉迟到授权回收或代次判定各使对应用例失败);vite build 通过(node_modules 沿用 HEL-875 同一锁文件离线树,无新增依赖、无下载)",
"浏览器:node tests/hel878_mock.mjs 8878 + node tests/hel878_shots.mjs <msedge.exe> <out> 8878,45/45(无头 Edge,--use-fake-device-for-media-stream;脚本化 LiveKit 替身;本机回环);中断前一轮为 39/43,失败的 4 项(语音打断文字误报、断网远端清理、卸载检查受其连带)经本轮修复后通过",
"唯一外部读取:一次只读 GET .12:8090 页面及其 /static/livekit-client.umd.min.js 以复用既有客户端;无模型、嵌入、合成、识别请求,无真实麦克风/摄像头,无部署或服务改动",
"需求结构检查:本运行时无 Python/git,未执行原版脚本,不声称通过;仅用 HEL-875 留下的 Node 移植版辅助:以 bf23457 为基含本交接通过(60 项);以后台 aba2aeb 的需求文件为基失败「历史来源必须保留」,原因是该线已追加 comment-evidence-full-experience-20261026.json 而前端原稿尚未包含,与本补丁无关,合入母线前须先同步该需求目录"
]
}
+34
View File
@@ -0,0 +1,34 @@
{
"baseline_version": "1.11",
"read_commit": "b95ce798b4a9455d941d247a46865b3ac202bf2c",
"task": "HEL-897(HEL-878 有限返修,视觉总监本人编码):修正重开语音被旧掉线结果覆盖——旧会话 fail() 在 await teardown 之后提交 OFF,覆盖已 listening 的新会话;并检查同一失败/结束/重开路径中 await 前后的代次与所有权。不重新设计,不改视觉",
"requirement_ids": [
"CG-010", "CG-018",
"VIS-013",
"UX-005", "UX-006",
"GOV-001", "GOV-002", "GOV-003", "GOV-004", "GOV-005", "GOV-006",
"DEL-001"
],
"deliverable": "自 HEL-878 原稿(总管保全提交 b95ce798,13 文件哈希逐一核对一致)起的补丁,只动 web/src/voice/session.ts 与测试:1) start() 内 fail():代次与 live 释放后先发起 teardown(麦克风同步先停、房间关闭与 DELETE 已发出),立即在本会话仍拥有页面时提交 OFF 与失败提示,再等待清理完成;清理迟到返回只释放旧会话自己的麦克风/房间/服务端房间,之后不再写界面。2) start() 先同步取得新代次与 live,再等待被替换会话的清理(原先 await end() 之后才取代次:两次开启交错时,较早一次醒来会抢走代次、把已接通的新会话孤立在外,其麦克风与房间不再被释放);被替换后醒来即退出;settle 补发在取得代次之后。3) web/tests/voice.test.ts 新增「a late end of an older call」6 项(掉线/麦克风被撤销各一,worker 未加入超时,正常结束慢 DELETE,交错重开,迟到麦克风授权);Server 假件增加按会话挂起 DELETE。4) web/tests/review878_late_cleanup.test.ts:总管独立负例原样纳入。5) hel878_mock.mjs 增加 /__hold-delete 控制;hel878_shots.mjs 增加第 12 段后 HEL-897 浏览器复现 4 项。",
"acceptance": [
"总管负例 review878_late_cleanup.test.ts:修前失败(Expected listening / Received off,与总管日志一致),修后通过;测试未改",
"掉线与麦克风被撤销后,旧 DELETE 与 settle 补发都挂起期间重开:新会话 listening、active=true、无旧提示;放行后界面不再变化;旧麦克风已停、旧房间已关,新麦克风/房间未被停;服务端只剩新房间;再结束后全部清空(单测各 1 项)",
"worker 未加入超时失败且 DELETE 慢、正常结束 DELETE 慢后重开、两次开启交错(前一次仍在等旧房间归还)、迟到麦克风授权:只有最新会话存活,界面与 active 一致(单测 4 项;交错一项修前失败,暴露同路径的第二处代次漏洞)",
"修前对照:同一测试集在原 session.ts 上 5 项失败(总管负例 + 新增 4 项),修后 33/33",
"浏览器(无头 Edge,脚本化 LiveKit 替身与假音频设备):掉线后旧 DELETE 挂起,提示与停麦立即生效;新会话 listening;放行旧 DELETE 后新会话仍 listening、无旧提示、1 路活麦克风、她的音频在、服务端只剩新房间;结束后全部清理。修前构建 45/49(实测 phase=off 而新麦克风仍活),修后 49/49,原 45 项(结束/导航/Esc/结束交谈/断网/卸载/快速开关等退出路径)全部保持通过",
"工程:tsc 0 错;eslint 0 错(1 条既有警告);vitest 8 文件 88/88;vite build 通过"
],
"deferred": [
"CG-011 语音内主动开口、她说话时的增量字幕、断网时远端即时清理/租约与 API 重启实情、真实 SDK 回调与播放回执、真机连续三轮/打断/停麦/HTTPS/Safari 全部未测,仍交 HEL-879 统一审核;本卡单测与浏览器均为替身与假设备,不是 WebRTC 通话",
"原版 Python 需求检查未在本运行时执行(无 Python、无 git),须总管对实际目标分支复跑(含/不含 handoff-HEL-878.json 与本交接);未用 Node 移植版冒充通过",
"总管在前端分支从 04eff611 补齐的历史原话文件与 source-manifest 以总管保全分支为准;本补丁不触碰需求目录中除本交接以外的任何文件",
"D1 音色、D3 设备信任由总管与白栖知沟通;R6/R7、CG-028/029 仍由主卡 HEL-797 承接;整体沉浸体验由白栖知验收"
],
"requirement_changes": [],
"verification": [
"读取:总管 HEL-897 卡与附件(HEL-878-总管复核.md、preservation-878.json、review878-race.log、review878_late_cleanup.test.ts);本人 HEL-878 原稿树(逐文件 SHA-256 与 preservation-878.json 13 项一致后才施工,原稿另行备份);需求与 integration-plan R5/D1/D3 沿用 HEL-878 已读内容,本卡无需求变更",
"web:tsc --noEmit 0;eslint src 0 错 1 既有警告;vitest run 8 文件 88/88(原 81 + 本卡 6 + 总管负例 1);vite build 通过;node_modules 沿用 HEL-878 离线树,未下载、未安装",
"修前/修后:同一测试集与浏览器脚本分别在原 session.ts 与修正版上运行,日志随交付包",
"无模型、嵌入、合成、识别请求,无真实麦克风采集,无部署、合并、服务或绑定改动;未改后台与 HEL-896 发布包"
]
}
+13
View File
@@ -0,0 +1,13 @@
# HEL-897 MANIFEST
Base: HEL-878 author draft as preserved by the supervisor, b95ce798b4a9455d941d247a46865b3ac202bf2c (13 files verified against preservation-878.json before work). Patch is relative to that tree; full tree (no node_modules/dist) in HEL-897-source.zip. Nothing else changed; HEL-878 files and handoff-HEL-878.json untouched except the two test helpers listed below.
## Changed/added files (sha256)
- docs/requirements/handoff-HEL-897.json 56CF0E97B5035CCFAAFF3F7DD219CA30352DF600FA4C9684EB690E4E44731BC9
- web/src/voice/session.ts 4B74731B7DC34534FF8F046B9487E115B3A38CFB202B045E34A12FA27FE528FE
- web/tests/hel878_mock.mjs 1B1608D5E0858842E9A0CF51FAAF9BAECE5E52B546757464B046DF0E66A4B815
- web/tests/hel878_shots.mjs E5706C5A4459315ECDB991CBD8D3776DB3EFE035FE520930FFB09E726EB639C7
- web/tests/review878_late_cleanup.test.ts 65261CD249A36693D0C6B06CE279DE8A60AA74DD7BAAFAD6999D2FEC790F9935
- web/tests/voice.test.ts 4C120B9449CE3AF0B66B3B8A18668D5012D286D6C18C0DEE1347A880F7780471
HEL-897.patch 1D8C43B0FE9984066406E60FAC715764DCD375546713DEB6BD034160F2050070
+18
View File
@@ -0,0 +1,18 @@
HEL-897 返修保全与独立补查(总管,2026-10-27 北京时间)
原作者交付评论:01a1798b-60b0-7562-9a70-82584f52dd54;主卡 HEL-797。需求 v1.11 / 60项,无需求变更。关联 CG-010/018、VIS-013、UX-005/006、GOV-001–006、DEL-001。
本次原样保全提交:761a2331f5898bacada8d9665da517c816af2367;作者原稿基点 b95ce798b4a9455d941d247a46865b3ac202bf2c,实际追加基点 f259bd34e19959db210578b11076e6f29a6bd15e。仅作者补丁所列6文件,业务代码仅 web/src/voice/session.ts;未改视觉、后台或HEL-896。补丁哈希及6文件SHA-256与独立MANIFEST、源码包逐字节匹配,git apply反向检查通过;总管负例与上一轮文件逐字节一致。源码包其余127文件经CRLF/LF规范化匹配;源码包携带旧source-manifest,按作者交接保留实际分支从04eff611补全的版本,逐字节核对未回退。另在本记录及preservation.json保存证据,不改作者handoff中的历史未测记录。
独立实际执行:
- 使用相同的33项语音测试,仅将隔离副本session.ts替换为b95ce798原版:5失败/28通过。原负例仍为Expected listening / Received off;交错start负例有两间未释放房间。
- 修后完整8文件88/88单测通过(包含上述33项)。typecheck通过;lint 0错/1条既有警告;build通过。沿用同锁文件的本机既有node_modules复制树,没有安装或下载。
- Python原版scripts/check_requirements.py:对origin/main、实际总装origin/hel-870-assembly(04eff611)、后台origin/agent/2/6a08a4c18f23(aba2aeb)、本次实际追加目标origin/hel-878-voice-wiring(f259bd3),各不带handoff、带handoff-HEL-878、带handoff-HEL-897,共12次通过。各精确提交在preservation.json。
- 作者的无头Edge浏览器49/49及修前45/49已随卡交证据;本轮未独立复跑浏览器,不把它当真WebRTC、真实麦克风或真机证据。
代码核对:fail同步让出旧会话所有权,启动仅清旧资源的teardown后立即提交本次OFF提示,清理等待后不再提交状态;start在await前取得代次,清理旧会话后先核对是否过期。负例与新增回归覆盖迟到DELETE/settle、掉线、撤销权限、worker超时、正常结束慢DELETE、交错start和迟到麦克风授权;原旧会话资源与新会话存活断言保持。
本次有限返修可交HEL-879独立统一审核,不代表完整R5通过。完整需求原话已核对R5/D1/D3、视觉分工、动态认可、成熟复用、完整体验指令;CG-011主动开口仍为后台no-op、增量字幕仍缺,须列有限接缝修正;真实远端断线清理/租约/API重启、SDK回调和播放回执、真实三轮/打断/停麦/HTTPS/WSS/Safari全未测。R6/R7、CG-028/029继续主卡承接。
推进顺序:总工HEL-896仍在运行,不能并行修改其母线;HEL-879接到此保全候选后,待HEL-896交回且总管核对实际母线再启动统一审核,避免覆盖新预算/发布成果。真实调用、音色、设备路径、预算和部署仍按主卡最终批准,默认真实cap=0。不合并、不部署、不碰旧服务/档案/凭据/运行时绑定。
+43
View File
@@ -0,0 +1,43 @@
{
"author_comment": "01a1798b-60b0-7562-9a70-82584f52dd54",
"baseline_version": "1.11",
"author_base": "b95ce798b4a9455d941d247a46865b3ac202bf2c",
"applied_to": "f259bd34e19959db210578b11076e6f29a6bd15e",
"patch_sha256": "1d8c43b0fe9984066406e60fac715764dcd375546713deb6bd034160f2050070",
"files": [
{
"path": "docs/requirements/handoff-HEL-897.json",
"sha256": "56cf0e97b5035ccfaaff3f7dd219ca30352df600fa4c9684eb690e4e44731bc9"
},
{
"path": "web/src/voice/session.ts",
"sha256": "4b74731b7dc34534ff8f046b9487e115b3a38cfb202b045e34a12fa27fe528fe"
},
{
"path": "web/tests/hel878_mock.mjs",
"sha256": "1b1608d5e0858842e9a0cf51faaf9baece5e52b546757464b046df0e66a4b815"
},
{
"path": "web/tests/hel878_shots.mjs",
"sha256": "e5706c5a4459315ecdb991cbd8d3776db3efe035fe520930ffb09e726eb639c7"
},
{
"path": "web/tests/review878_late_cleanup.test.ts",
"sha256": "65261cd249a36693d0c6b06ce279de8a60aa74dd7baafad6999d2fec790f9935"
},
{
"path": "web/tests/voice.test.ts",
"sha256": "4c120b9449ce3af0b66b3b8a18668d5012d286d6c18c0dee1347a880f7780471"
}
],
"archive_other_files_matched_normalized_lf": 127,
"archive_extras": [],
"source_manifest": "archive retains older manifest; actual branch retains 04eff611 authoritative manifest as author instructed; bytewise verified",
"preserved_commit": "761a2331f5898bacada8d9665da517c816af2367",
"requirement_ref_commits": {
"origin/main": "3a986726d8593e0ed2274f79db6cc5d807d2ebf0",
"origin/hel-870-assembly": "04eff611e7d85e539d43717711172441420ac853",
"origin/agent/2/6a08a4c18f23": "aba2aebeb08d87854b5b037b5e69d76ddfba446e",
"origin/hel-878-voice-wiring": "f259bd34e19959db210578b11076e6f29a6bd15e"
}
}
@@ -0,0 +1,159 @@
RUN v3.1.2 /home/xiaomo/multica_workspaces/hello-af23464d222e/hel-897-cfe565d5b1bd/workdir/baseline-web
❯ tests/review878_late_cleanup.test.ts (1 test | 1 failed) 12ms
× old room disconnect cleanup cannot overwrite a newly opened call 11ms
→ expected 'off' to be 'listening' // Object.is equality
❯ tests/voice.test.ts (32 tests | 4 failed) 49ms
✓ honest switch > reads status only: no room, no microphone 4ms
✓ honest switch > configured && tts_ok never means "verified": voice:false is not read as connected 1ms
✓ honest switch > refuses honestly before touching the microphone when the server cannot speak 1ms
✓ honest switch > an insecure page is told why, without asking for the microphone 0ms
✓ lifecycle > opens, joins, publishes the microphone, follows her state; ending stops everything 1ms
✓ lifecycle > permission denied: nothing opened on the server, nothing left running 1ms
✓ lifecycle > server refusal shows its own words and releases the microphone 0ms
✓ lifecycle > a failed join releases the microphone and gives the room back 0ms
✓ lifecycle > ending while the microphone prompt is open: the late microphone is stopped, no room is asked for 2ms
✓ lifecycle > ending while the room is being opened: the late grant is given back, never joined 3ms
✓ lifecycle > ending while joining: the join is aborted, a late room is closed, the server room deleted 3ms
✓ lifecycle > rapid on/off/on: only the last call stays, every earlier microphone and room is released 3ms
✓ lifecycle > late events from an ended call never bring it back 2ms
✓ lifecycle > the room dropping on its own (network, server ended it) cleans up and says so 1ms
✓ lifecycle > microphone permission revoked mid-call ends the call 1ms
✓ lifecycle > her worker never joining is a failure, not an endless wait 2ms
✓ lifecycle > offline ends with its own words; unload releases at once and the DELETE survives the page 2ms
✓ lifecycle > a DELETE that cannot get through (offline) is owed, survives a new page, and is sent once back online 1ms
✓ lifecycle > an owed room already gone on the server (404) counts as settled 0ms
✓ lifecycle > never confirms a receipt or posts chat itself: the worker owns both 0ms
× a late end of an older call > the room dropped, its DELETE (and the settle retry) answering after a new call is up, leaves the new call alone 6ms
→ expected { phase: 'listening', heard: '', …(3) } to match object { phase: 'off' }
(4 matching properties omitted from actual)
× a late end of an older call > the microphone was taken away, its DELETE (and the settle retry) answering after a new call is up, leaves the new call alone 2ms
→ expected { phase: 'listening', heard: '', …(3) } to match object { phase: 'off' }
(4 matching properties omitted from actual)
× a late end of an older call > her worker never joined, the DELETE is slow, and a new call is started before it answers 1ms
→ expected { phase: 'joining', heard: '', …(3) } to match object { phase: 'off', …(1) }
(3 matching properties omitted from actual)
✓ a late end of an older call > a normal end whose DELETE is slow, then a new call, then the old answer arrives 2ms
× a late end of an older call > starting again while the previous start still waits for the old room to be given back: only the newest call survives 5ms
→ expected [ Room{ closed: +0, …(3) }, …(1) ] to deeply equal [ Room{ closed: +0, …(3) } ]
✓ a late end of an older call > a microphone granted late to an older start is stopped without touching the new call 3ms
✓ subtitles and the two channels > interim is a draft; user_final cancels a text reply and asks for the record; φ is heard but not recorded 0ms
✓ subtitles and the two channels > without the agent state attribute, subtitles still move the state honestly 0ms
✓ subtitles and the two channels > typing over her spoken answer silences what is left of it until she is listening again 0ms
✓ record re-read > adds voice turns once, in id order; leaves reach-outs to the inbox and text turns to the stream 0ms
✓ record re-read > a pending voice row settles in place (sent or cancelled), never duplicated 0ms
✓ record re-read > reads newest pages down to what the page holds, bounded 1ms
Test Files 2 failed (2)
Tests 5 failed | 28 passed (33)
Start at 02:51:41
Duration 268ms (transform 81ms, setup 0ms, collect 150ms, tests 61ms, environment 0ms, prepare 76ms)
⎯⎯⎯⎯⎯⎯⎯ Failed Tests 5 ⎯⎯⎯⎯⎯⎯⎯
FAIL tests/review878_late_cleanup.test.ts > old room disconnect cleanup cannot overwrite a newly opened call
AssertionError: expected 'off' to be 'listening' // Object.is equality
Expected: "listening"
Received: "off"
❯ tests/review878_late_cleanup.test.ts:39:29
37| await new Promise(resolve => setTimeout(resolve, 0));
38| expect(controller.active).toBe(true);
39| expect(view?.phase).toBe('listening');
| ^
40| } finally {
41| releaseOld();
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/5]⎯
FAIL tests/voice.test.ts > a late end of an older call > the room dropped, its DELETE (and the settle retry) answering after a new call is up, leaves the new call alone
FAIL tests/voice.test.ts > a late end of an older call > the microphone was taken away, its DELETE (and the settle retry) answering after a new call is up, leaves the new call alone
AssertionError: expected { phase: 'listening', heard: '', …(3) } to match object { phase: 'off' }
(4 matching properties omitted from actual)
- Expected
+ Received
{
- "phase": "off",
+ "phase": "listening",
}
❯ tests/voice.test.ts:274:30
272| const r = await connected(), slow = hold(r, 's1');
273| cause(r); await flush();
274| expect(r.view()).toMatchObject({ phase: 'off' });
| ^
275| expect(r.transport.mics[0].stopped).toBeGreaterThan(0); …
276| expect(r.c.active).toBe(false);
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/5]⎯
FAIL tests/voice.test.ts > a late end of an older call > her worker never joined, the DELETE is slow, and a new call is started before it answers
AssertionError: expected { phase: 'joining', heard: '', …(3) } to match object { phase: 'off', …(1) }
(3 matching properties omitted from actual)
- Expected
+ Received
{
- "notice": "她没有接上这次通话,麦克风已经关闭。文字仍可使用。",
- "phase": "off",
+ "notice": "",
+ "phase": "joining",
}
❯ tests/voice.test.ts:293:26
291| const r = rig(); await r.c.start(); const slow = hold(r, 's1');
292| await vi.advanceTimersByTimeAsync(1100);
293| expect(r.view()).toMatchObject({ phase: 'off', notice: WORDS.n…
| ^
294| await reopened(r, 1);
295| slow.open(); await vi.advanceTimersByTimeAsync(0);
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/5]⎯
FAIL tests/voice.test.ts > a late end of an older call > starting again while the previous start still waits for the old room to be given back: only the newest call survives
AssertionError: expected [ Room{ closed: +0, …(3) }, …(1) ] to deeply equal [ Room{ closed: +0, …(3) } ]
- Expected
+ Received
@@ -14,6 +14,23 @@
"ended": [Function anonymous],
"stopped": 0,
},
],
},
+ Room {
+ "closed": 0,
+ "hushed": [],
+ "on": {
+ "agentJoined": [Function agentJoined],
+ "agentState": [Function agentState],
+ "audioBlocked": [Function audioBlocked],
+ "dropped": [Function dropped],
+ "subtitle": [Function subtitle],
+ },
+ "published": [
+ Mic {
+ "ended": [Function anonymous],
+ "stopped": 0,
+ },
+ ],
+ },
]
❯ tests/voice.test.ts:316:58
314| slow.open(); await Promise.all([b, c]); await flush(); // B w…
315| const last = r.transport.rooms.length - 1;
316| expect(r.transport.rooms.filter(x => !x.closed)).toEqual([r.tr…
| ^
317| expect(r.transport.mics.filter(m => !m.stopped)).toEqual([r.tr…
318| expect(r.server.open.size).toBe(1);
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[4/5]⎯
+13
View File
@@ -0,0 +1,13 @@
> cybergril-web@0.1.0 build
> tsc --noEmit && vite build
vite v6.3.6 building for production...
transforming...
✓ 57 modules transformed.
rendering chunks...
computing gzip size...
dist/index.html 0.49 kB │ gzip: 0.35 kB
dist/assets/index-BpZaybfD.css 83.54 kB │ gzip: 17.53 kB
dist/assets/index-BzbZ2t4t.js 306.87 kB │ gzip: 102.13 kB
✓ built in 620ms
+10
View File
@@ -0,0 +1,10 @@
> cybergril-web@0.1.0 lint
> eslint src
/home/xiaomo/multica_workspaces/hello-af23464d222e/hel-897-cfe565d5b1bd/workdir/CyberGril/web/src/chat/ChatPanel.tsx
222:100 warning The ref value 'fullButton.current' will likely have changed by the time this effect cleanup function runs. If this ref points to a node rendered by React, copy 'fullButton.current' to a variable inside the effect, and use that variable in the cleanup function react-hooks/exhaustive-deps
✖ 1 problem (0 errors, 1 warning)
@@ -0,0 +1,2 @@
python3 scripts/check_requirements.py --base-ref origin/main --handoff docs/requirements/handoff-HEL-878.json
需求结构检查通过:60项;来源和覆盖完整。仍须人工核对授权语义与实际体验。
@@ -0,0 +1,2 @@
python3 scripts/check_requirements.py --base-ref origin/main --handoff docs/requirements/handoff-HEL-897.json
需求结构检查通过:60项;来源和覆盖完整。仍须人工核对授权语义与实际体验。
@@ -0,0 +1,2 @@
python3 scripts/check_requirements.py --base-ref origin/main
需求结构检查通过:60项;来源和覆盖完整。仍须人工核对授权语义与实际体验。
@@ -0,0 +1,2 @@
python3 scripts/check_requirements.py --base-ref origin/hel-870-assembly --handoff docs/requirements/handoff-HEL-878.json
需求结构检查通过:60项;来源和覆盖完整。仍须人工核对授权语义与实际体验。
@@ -0,0 +1,2 @@
python3 scripts/check_requirements.py --base-ref origin/hel-870-assembly --handoff docs/requirements/handoff-HEL-897.json
需求结构检查通过:60项;来源和覆盖完整。仍须人工核对授权语义与实际体验。
@@ -0,0 +1,2 @@
python3 scripts/check_requirements.py --base-ref origin/hel-870-assembly
需求结构检查通过:60项;来源和覆盖完整。仍须人工核对授权语义与实际体验。
@@ -0,0 +1,2 @@
python3 scripts/check_requirements.py --base-ref origin/agent/2/6a08a4c18f23 --handoff docs/requirements/handoff-HEL-878.json
需求结构检查通过:60项;来源和覆盖完整。仍须人工核对授权语义与实际体验。
@@ -0,0 +1,2 @@
python3 scripts/check_requirements.py --base-ref origin/agent/2/6a08a4c18f23 --handoff docs/requirements/handoff-HEL-897.json
需求结构检查通过:60项;来源和覆盖完整。仍须人工核对授权语义与实际体验。
@@ -0,0 +1,2 @@
python3 scripts/check_requirements.py --base-ref origin/agent/2/6a08a4c18f23
需求结构检查通过:60项;来源和覆盖完整。仍须人工核对授权语义与实际体验。
@@ -0,0 +1,2 @@
python3 scripts/check_requirements.py --base-ref origin/hel-878-voice-wiring --handoff docs/requirements/handoff-HEL-878.json
需求结构检查通过:60项;来源和覆盖完整。仍须人工核对授权语义与实际体验。
@@ -0,0 +1,2 @@
python3 scripts/check_requirements.py --base-ref origin/hel-878-voice-wiring --handoff docs/requirements/handoff-HEL-897.json
需求结构检查通过:60项;来源和覆盖完整。仍须人工核对授权语义与实际体验。
@@ -0,0 +1,2 @@
python3 scripts/check_requirements.py --base-ref origin/hel-878-voice-wiring
需求结构检查通过:60项;来源和覆盖完整。仍须人工核对授权语义与实际体验。
@@ -0,0 +1,4 @@
> cybergril-web@0.1.0 typecheck
> tsc --noEmit
@@ -0,0 +1,21 @@
> cybergril-web@0.1.0 test
> vitest run
RUN v3.1.2 /home/xiaomo/multica_workspaces/hello-af23464d222e/hel-897-cfe565d5b1bd/workdir/CyberGril/web
✓ tests/r3memory.test.ts (5 tests) 7ms
✓ tests/review878_late_cleanup.test.ts (1 test) 5ms
✓ tests/real.test.ts (3 tests) 11ms
✓ tests/domain.test.ts (12 tests) 9ms
✓ tests/inbox.test.ts (13 tests) 24ms
✓ tests/r2wiring.test.ts (11 tests) 27ms
✓ tests/reading.test.ts (11 tests) 34ms
✓ tests/voice.test.ts (32 tests) 51ms
Test Files 8 passed (8)
Tests 88 passed (88)
Start at 02:51:00
Duration 305ms (transform 533ms, setup 0ms, collect 875ms, tests 168ms, environment 1ms, prepare 331ms)