Repository navigation
fix(context): 在本轮内恢复引用校验失败 - #202
Merged
Merged
Conversation
将来源缺失、失效和依赖失效转换为可恢复的工具回执,抑制同批业务工具, 并让下一模型回合收到拒绝原因。保留已完成工具结果、事务原子性、取消和 存储异常边界;未增加 SDK 公共导出。 覆盖同批上下文更正、完成门、重复失败预算及修正后继续执行。 构建、静态检查和相关 verify 行为阶段通过;完整门禁仍因总行数超过 结构预算 91 行失败,未修改预算。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
执行态
context_claims引用缺失/失效的来源或失效依赖时,原先会抛出Claim refers to a missing or invalidated source,中断整个运行。本次将这类声明拒绝转换为可恢复的工具回执,让模型在同一次运行中使用当前来源修正引用。turn_decision + contextCorrections + context_claims + 业务工具:保留已提交 decision 的成功回执,阻止基于被拒绝引用继续操作。Evidence
验证提交:
7ca740d5266fe9eabf1e00364fe3e17acb1c1888;基线:859eea49c5e1ec294115d1468e29744331160b6f。本地环境:2026-12-04,macOS arm64,Nodev24.18.0。After:
scripts/verify/context-claim-recovery.mjs使用真实 SQLite、TaskIntentCoordinator 和 MossAgent 循环,覆盖以下场景并通过:已通过的验证
全部通过(含依赖
build,13.7 秒)。新增引用恢复探针已接入现有versioned-context阶段。后续 focused 验证中的static(Prettier、ESLint、TypeScript)与build也全部通过。宿主联调补充:配合 Studio
e1eb08d83907d6cb997895eaa61a1ef5b7aa389c,临时加载本分支 SDK 的错误投影/恢复测试 15/15 通过;浏览器中英文即时切换、正文及工具结果保留、刷新恢复和显式重试场景 2/2 通过;隔离 Studio 服务启动与健康检查通过。浏览器故障来自受控 SSE 注入,联调不代表现场模型重放。未通过的门禁与未覆盖范围
完整
npm run verify尚未全绿,不应将本 PR 标记为全部验收通过。structuretotalLines = 171786,预算171695,超出 91 行。未修改预算;其余结构指标未报失败。可用node scripts/structure-metrics.mjs复核。agent-loop-response.ts的 Prettier 检查失败,后续static已通过;它不是当前未解决项。load-orderstructure,被前置失败阻断。Studio 侧补充边界:
verify:quick和构建通过;全量契约测试初跑 2353/2360。目录权限和本机插件冲突项解除干扰后通过,SSO 首屏超时在未修改基线同样复现,因此也未宣称 Studio 全量契约测试全部通过。这些宿主改动不在本 PR 的 diff 中。本地原始日志未提交,以上列出了可复核的仓内命令、探针和具体失败值;GitHub CI 与 Deep 的结果需以此提交对应的实际检查为准。
Merge Danger
Door: two-way
无存储迁移或公共 API 变更,可通过回退提交撤销代码。回退代码不能撤销运行中已真实发生的业务操作。
Blast Radius: runtime
影响启用 task intent / versioned context 的 Moss Agent 运行。模型可能新增一次或多次修正回合,但仍受原有预算限制;真实存储错误、并发失效和取消不会被吞掉。
合并前需处理或明确裁决上述结构预算失败并补足相应门禁验证。本 PR 不合并代码、不发布版本;Studio 正式 Moss pin 保持不变,需上游合并后另行接入验证。