Files
Genarrative/apps
lhk229 65c3d172b2
Project CI / Repository checks (pull_request) Failing after 15s
Project CI / Backend tests (pull_request) Failing after 16s
Project CI / Frontend tests (pull_request) Successful in 4m2s
Project CI / Native shell tests (pull_request) Successful in 18m9s
澄清转述那一轮的 context bundle 不再被判身份不匹配
走过一轮澄清的立项策划必挂:策划子 Agent 完成、父 run 醒来认领委派回执时,整轮报
「恢复 Agent Runtime context bundle 失败:身份与当前任务不匹配」,用户答案已落盘却
无法继续。

bundle.task 存的是写出这份 bundle 的那一轮的任务,跟 run 的持久 task 是两个独立参数
(build_game_creator_agent_runtime_context_bundle 的 task 形参)。用户答完澄清后整条
run 改跑在转述任务上(run_recovered_game_creator_context_on_fresh_task 传的就是
pending.task),那一轮写出的 bundle 因此带着转述文本,而 task record 与 current_task
始终是用户原始请求。实测项目里两侧身份字段全等,只有 task 一项分叉。

validate_agent_runtime_pending_context 早就为 pending 入口豁免过同一条文本相等断言,
并留了注释说明转述是唯一一处 task 不等于本 run 任务的场景;bundle 这个入口漏了。这里
补上同一个豁免,只放开文本相等一条——project/agent/task_id/session/run/source/profile/
绑定指纹与 verification_gate 三项照旧全等,转述文本也只能由 Runtime 在本 run 内生成,
不放开任何跨 run 或跨身份的重放面。

新增用例同时断言两侧:转述 bundle 必须能读回,其它文本分叉照旧 fail closed。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-22 07:32:25 +00:00
..
2026-07-17 16:56:46 +08:00