test: seal real delivery R evidence and reading reliability review

This commit is contained in:
Agent Workbench Dev
2026-11-04 00:17:51 +08:00
parent ea82bde3bc
commit fbedb7381b
194 changed files with 1622582 additions and 8 deletions
+6
View File
@@ -220,3 +220,9 @@ docs/network-q-release-identity.json -text
docs/network-q-index-first-diff.txt binary
docs/live-delivery-r-contract/** -text -whitespace
docs/live-delivery-r-evidence/** -text -whitespace
docs/live-delivery-r-evidence/**/*.log binary
docs/live-delivery-r-evidence/**/*.txt binary
docs/live-delivery-r-offline.txt binary
docs/live-delivery-r-git-index.txt binary
+2
View File
@@ -41,3 +41,5 @@
!/docs/live-delivery-p-evidence/**/*.log
!/docs/network-q-evidence/**/*.log
!/docs/live-delivery-r-evidence/**/*.log
+4 -2
View File
@@ -1,5 +1,7 @@
# Agent Workbench项目执行规范
R已完成Q后的新有界真实样本:唯一所属诊断DNS/auto/IPv4/IPv6 TLS通过(1579ms,0HTTP/模型/凭据);新预检1请求/4492报告tokens/0工具/strict matched。新Node6请求/72571报告tokens/0未知、全JSON matched,12工具/1原检查审批,原9测试0通过9失败/基线build通过,0提案/修改/交付;第7次本地输入12352可容纳,但预留29623>剩余17429而token_limit暂停,非新context_limit/网络失败,不续跑。原61项目77导出/3610工件/209尝试和原行(项目位置自有前插2逆算)保持,当前63项目79会话6262记录13279事件及outbox/3660工件,新增7尝试全自有。预算/高性能池恢复,目标5→6→7/凭据1、全局/legacy65→69,9229关闭,正式仍1.24.6/source54dbe3d6/原PID36552/Provider。61自有工件记录全取回,178份/75944723字节证据离线通过,见docs/QA-LIVE-DELIVERY-R.md。下一优先docs/READING-RELIABILITY-S-PLAN.md:离线复现文件续读定位、约400字符分页吞吐及预留暂停解释;不移除预算保护或篡改上游27164输入报告。先修复/独立验收,再另立新Node;React/Python/Purge收益和1.25仍按前置计划。不委派、不提取/复制/重存Key、不重启原Provider、不推送。
Q已本地交付:1.24.6/source54dbe3d6/候选20261103151145294,所属DNS/TCP/TLS有界诊断,0凭据读取/HTTP/模型调用。69相关、11宿主、14安装旧版升级、4补强热升级、新UI源码/便携/实际安装各9组、五类历史26组、560输入独立重建22/22、三归档/便携、12实际安装和16+9文件流程通过;其中555跟踪输入及5例示dist均独立核对。正式保留原PID36552/Provider/61项目77会话/6167记录/13115事件及outbox,全部原表行/导出/工件和公开模型中心在网页/原生回看后再次精确保持,9229关闭。438份/89228582字节证据封存离线通过,见docs/QA-NETWORK-DIAGNOSTICS-Q.md及docs/network-q-release-identity.json。实际更新677755ms重复核验单列性能。下一新有界预检/Node,不重放旧失败;React/Python/Purge收益和1.25仍按计划。不委派、不提取/复制/重存Key、不推送。
P已完成新的jojocode5b4/Chat JSON独立实测:预检1请求/112报告tokens/0工具/strict matched;新Node首请求UND_ERR_CONNECT_TIMEOUT,0工具/修改/检查/交付,1未知预留10141,未重试切池或续跑旧Task。两轮12次无HTTP TLS握手11成功/1固定IPv6超时,仅证明观察波动,不是唯一根因或API稳定性证明。正式仍1.24.5/source676103c4/PID36552/原Provider,未改产品或重打包。原59公开项目75导出/3605工件/207原尝试及原行、预算/高性能池按声明核对保持;当前61项目77会话/6167记录/13115事件/outbox/3610工件,新增均归属P。目标连接3→4→5/凭据1,原缺省身份三字段显式恢复record/[]/空串规范化单列;全局/legacy展示修订61→65,9229关闭。75份/55891232字节证据离线通过,见docs/QA-LIVE-DELIVERY-P.md及回顾。下一先所属连接DNS/TCP/TLS诊断开发和独立验证,再新有界Node;不能为通过强制IPv4/关闭证书/扩大预算。真实Node、React/Python、原版Purge收益仍未验收,1.25和更新性能保持计划。不委派子代理、不重启正式进程、不提取/复制/重存Key,不推送。
@@ -62,7 +64,7 @@ D固定可信来源生产策略已完成:实现9106655/最终验收d05a741,6
## 范围与目标
当前接续优先级:O已交付1.24.5上下文修复,预检通过,但新Node第二请求上游502,真实交付仍未通过。下一固定可用连接,按J计划另开独立预检/有界Node,再React/Python及原版PurgeAB/BA;不续跑旧失败、不自动扩大16K或原预算。N已确认的GPT分组误配置不再归因于Claude线路故障。docs/PLAN-1.25.md及新iPhone/其它供应商方案保留;O更新677958ms的重复目录核验单独研究,保留防篡改和故障回退门槛。
当前接续优先级:R新预检通过,Node六次有原响应但在修改前token_limit暂停,真实交付仍未通过。下一先按docs/READING-RELIABILITY-S-PLAN.md修复文件续读定位/分页吞吐及预算暂停解释,离线复现和独立发行验收后再另立新有界Node。之后才React/Python与原版PurgeAB/BA;不续跑旧失败或扩大16K/原预算。N确认的GPT分组误配置不再归因于Claude线路故障。docs/PLAN-1.25.md及新iPhone/其它供应商方案保留;O/Q约678秒更新中的重复目录核验单独研究,保留完整性/防篡改与故障回退门槛。
本仓库专注AI编程与能力研究工作台。其他项目不纳入本项目计划或代码。用户确定的研究对象为Codex、Claude Code、Cursor、DeepSeek Harness、WorkBuddy及DSH-purge;目标是将有证据的机制独立开发成自有Harness内置能力。
@@ -120,7 +122,7 @@ D固定可信来源生产策略已完成:实现9106655/最终验收d05a741,6
## 当前本地服务与Windows
- 正式服务入口http://127.0.0.1:4318,当前1.24.4,沿用原PID36552与Provider;不可变程序身份以docs/anthropic-messages-release-identity.json为准,N后的当前连接配置见docs/ROUTING-AUDIT-N.md。M已核对原全表/会话/工件保留,N只核对其声明的配置范围,不冒充重新整库验收;普通源码/规划/Git工作不重启服务、不读取或复制Key。正式原生窗口按M实际回看记录,旧F的Escape失败作为历史保留。
- 正式服务入口http://127.0.0.1:4318,当前1.24.6,沿用原PID36552与Provider;不可变程序身份以docs/network-q-release-identity.json为准,R后配置/数据与实测见docs/QA-LIVE-DELIVERY-R.md。R已按声明核对原全表/导出/工件保留及原预算/池恢复;普通源码/规划/Git工作不重启服务、不读取或复制Key。正式原生窗口按Q实际回看记录,R没有新增原生/UI验收结论,旧F的Escape失败作为历史保留。
- 浏览器/fixture验证使用独立端口与数据目录;用户项目与研究对象的登录/会话配置不用于测试凭据。
- Windows执行环境以实测shell为准。现有工具使用PowerShell 5.1和UTF-8;不用&&/||拼接命令,使用换行和$LASTEXITCODE核对结果。
- 桌面与移动共用执行宿主。手机127.0.0.1指手机,远程接入通过未来经验证的配对网关。
+5 -1
View File
@@ -1,4 +1,8 @@
# 新真实样本计划(O已交付上下文修复,新的Node仍待闭环)
# 新真实样本计划(R实测已封存,先改进读取可靠性)
R当前结论:Q诊断交付后的唯一所属诊断通过,新单次预检1请求/4492报告tokens/strict matched;新Node6请求/72571报告tokens/0未知、原JSON身份均匹配,原九测试全部失败/基线build通过,0提案/修改/交付。第7次预留29623超过剩余17429而token_limit暂停,本地输入12352仍符合上下文预算,不是新的context_limit。原状态和预算/池恢复通过,178份证据离线核对通过,见[本轮结果](QA-LIVE-DELIVERY-R.md)。
下一优先[读取可靠性S计划](READING-RELIABILITY-S-PLAN.md):离线复现和修复文件分页续读定位、有效吞吐及预留暂停解释,保留已知用量保护和原失败。独立产品验收后另建新的有界Node,不续跑R/P/O;Node→React/Python→原版Purge的前置关系保持。下方P/O/N/J/M按当时历史计划理解,不能覆盖R/S当前顺序。
P补充:另一既有jojocode连接的新预检通过,新Node首连接超时,真实闭环仍未通过。两次尝试共112报告tokens/1未知预留10141,原状态按声明恢复,75份证据离线通过;独立TLS有波动但不证明原超时唯一根因。下一先落实[所属连接诊断切片](RETROSPECTIVE-LIVE-DELIVERY-P.md),之后另开有界样本,不续跑旧任务、不扩大本例预算,见[本轮结果](QA-LIVE-DELIVERY-P.md)。本计划的Node→React/Python→原版Purge前置关系保持。
+4
View File
@@ -1,5 +1,9 @@
# 后续执行计划
R当前:Q已交付1.24.6的所属连接诊断;后续唯一诊断DNS/auto/IPv4/IPv6 TLS通过,新单次GPT预检1请求/4492报告tokens通过。新Node6请求/72571报告tokens/0未知,全原JSON matched,原9测试0通过9失败、基线build通过,尚无修改/交付。第7次本地输入可容纳,因保守预留29623>剩余17429发送前token_limit暂停。原61项目77导出/3610工件/209尝试和原行、预算/用户高性能池保持,178份证据与Git原字节索引核对通过。见[结果](QA-LIVE-DELIVERY-R.md)及[回顾](RETROSPECTIVE-LIVE-DELIVERY-R.md)。
下一先按[读取可靠性S计划](READING-RELIABILITY-S-PLAN.md)离线复现并改善文件续读定位、实际分页吞吐和预算暂停解释,独立产品验收后另开新有界Node。保持原16K/2048/8请求/90000tokens及安全预留/上游原报告,不续跑旧Task;Node通过再React/Python和原版PurgeAB/BA。1.25其余能力和更新重复目录核验性能保持独立排期。下方P/O/J等“最新”段落只代表当时历史时点。
P最新:jojocode新单次预检1请求/112报告tokens/0工具通过,新Node首连接UND_ERR_CONNECT_TIMEOUT,1未知预留10141、0修改/检查/交付;未重试或切池。12次独立TLS握手11通过/1固定IPv6超时,不能认定唯一根因。原59项目75会话/3605工件/207尝试及默认预算/池按声明恢复,正式仍1.24.5,无产品改动。75份/55891232字节证据离线通过。下一先做可取消、无Key/无HTTP的所属连接诊断与实际入口验收,再新有界Node;React/Python/Purge和更新性能分别按前置条件推进。见[结果](QA-LIVE-DELIVERY-P.md)及[具体下一切片](RETROSPECTIVE-LIVE-DELIVERY-P.md)。下方O等保持历史时点。
O最新:1.24.5上下文去重已完成独立发行及保留原PID/Provider升级;源码/便携/安装16K回放、105相关/25升级安装、552输入重建22/22、12实际安装及正式网页/原生通过。新同预算Node样本第二请求上游502,未交付;本轮合计5请求/16227报告tokens/1未知,315份证据离线通过。下一先固定可用连接,独立预检和新Node闭环,再React/Python及原版PurgeAB/BA;旧失败不续跑。更新677958ms的重复核验单独优化,1.25仍计划,具体完成标准见[本阶段回顾](RETROSPECTIVE-LIVE-CONTEXT-O.md)。下方“最新”均按其历史时点理解。
+47
View File
@@ -0,0 +1,47 @@
# R:诊断后的真实模型预检与 Node 交付实测
所属网络诊断和新的单次身份预检通过;新 Node 工程在第七次发送前因剩余额度不足以承担保守预留而暂停,尚未交付。原测试失败、模型原响应和全部用量保留。本轮产品仍为 1.24.6/source54dbe3d6,继续使用原 PID36552/Provider。
## 固定条件与实际结果
调用前本地提交 ea82bde3 冻结了计划和11份驱动,基线为8cf152e3。固定已启用 jojocode/5b4daed9,gpt-6.1-sol、Chat非流式JSON、https://jojocode.com/v1、16K/2048,连接修订5/凭据1。高性能默认池和旧09b停用状态保留。
| 阶段 | 原限制 | 实际结果 |
| --- | --- | --- |
| 所属DNS/TCP/TLS诊断 | 1个job、12秒、0HTTP/模型/凭据访问 | 1579ms,DNS及auto/IPv4/IPv6 TLS均通过,证书校验开启 |
| 新单次身份预检 | 1请求/1尝试、256输出、16000总tokens、0工具/重试/切池 | 1请求/4492上游报告tokens,原JSON报告gpt-6.1-sol、nonce正确、strict matched |
| 新Node工程 | 最多8请求/90000tokens/600000ms,16K/2048、原九测试/三源码/审查/Git | 122秒、6请求/72571报告tokens/0未知;12工具、1次检查审批,9测试全部失败、基线build通过,0提案/修改/交付 |
预检会话为927220f9-449f-476f-b847-0bd58916f204;Node会话为966d83cb-d1d7-44b7-be53-9d850270e34e,Task为e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4。每次请求均固定该连接、ordinal=1、poolId=null,七份原JSON响应身份完整matched。请求/响应的型号标记不认证底层权重。
网络job为bfa3c359-5235-4f1e-979b-9540828238ae,仅覆盖诊断时的连接修订5;直连检查不验证模型API路线。运输未配置代理、NO_PROXY或自定义fetch,且未强制地址族、改变系统代理或关闭证书检查。只有这一条诊断历史,没有为取得好结果重复诊断。
## 停止原因与读取问题
Node完成六次模型请求后报告72571tokens,剩余17429。第七次准备的本地输入12352符合上下文输入预算12352;根据本Task已观察的上游最大用量比率2.2324,完整发送需保守预留29623,大于剩余额度,因此在发送前以token_limit暂停。第七次没有请求或消费记录。这不是新的context_limit,也不是网络失败。
第4次原响应报告27164输入、303输出及24192缓存输入tokens,原请求35303字节、本地输入估算12168。该报告和后续保守预留都保持;供应商内部模板、缓存口径或计费原因未知,不能用本地字节估算替换实际报告。
逐原工件回查发现:
- 测试文件共2584字符,实际read_file只返回0→473→875→1271,三页分别473/402/396字符,仍有1313字符未读。多工具批次及后续单读的readMessageBudget都落到1024字节底限,后两页扣元数据后为949字节。新页连续推进,符合现有防空转语义。
- 模型另一轮read_artifact读取的是原第一页的891字符工具结果包装,只取其前495字符。该包装包含已返回的片段,不包含未读测试后文。请求历史索引的file依据只给result_artifact_id,缺少明确文件续读位置;恢复已读内容和继续读原文件需要分别说明。
- 当前暂停文字把“观察用量预留大于剩余”笼统归为目标/必需输入开销过大,容易误判为目标或上下文问题。预算保护本身应保留,诊断说明需要准确。
监督只批准模型计划的原npm run test/build,未提供实现、修改测试、增加预算、发送追加提示、自动续接或切池。原九测试0通过/9失败、build通过属于未修复源码的真实基线,不能算作成功交付。完整提案审查和Git门禁本次未触发。
## 恢复与证据
原61个公开项目、77份会话导出、3610份工件字节、209条完整尝试,以及原会话/记录/事件/outbox每行保持。两自有项目前插使原项目位置顺移2,逆算后逐原行SHA一致,原公开项目字段和顺序保持。
新增2项目/2会话、95记录、164事件及outbox、7尝试和50工件文件均归属本轮;当前63项目/79会话/6262记录/13279事件及outbox/3660工件。61份自有工件记录全部通过API逐SHA/bytes取回并封存,包含原检查日志、各页结果、历史/工作依据、请求与响应。新增记录工件可复用原已存在的相同字节,所以记录数与新文件数分别核对。
原预算、默认高性能池/成员及目标外连接恢复;目标连接5→6→7、凭据仍1,身份record/[]/空串原语义精确恢复,原字段已显式存在,本轮未新增缺省规范化。全局及legacy展示修订65→69保持单调;运行身份和原Provider保持,9229关闭。读取证据和离线核验均不再调用模型。
[清单](live-delivery-r-evidence/manifest.json)封存178份文件、75944723字节,SHA-256为4d8dcc2199da2b61c512d45e8c27a62e53f499f239dbb35df4eae264ecf570df。冻结契约、全部自有工件、原失败/账本/基线/恢复、逐行归属证明和八份绑定正式source54dbe3d6的分析输入均保留;驱动按不可执行文本封存。
[离线核验器](../scripts/verify-live-delivery-r.mjs)已通过,见[收据](live-delivery-r-offline.txt)。它核对原文件清单、调用前Git冻结、实际请求/原JSON/报告用量、全部自有工件、九测试基线、分页范围、发送前预留、原数据归属和声明恢复,执行时不联网或接触凭据。运行命令为node scripts/verify-live-delivery-r.mjs,提交前加--index核对Git暂存原字节。
[Git索引收据](live-delivery-r-git-index.txt)通过:含清单179份/75980516字节逐原SHA一致,日志精确例外与原字节属性已限定到本轮证据目录。源码与配置恢复核对、封存及本地范围提交共同构成本轮收尾,不推送。
本轮没有产品源码变更,沿用Q的既有发行身份,没有重复打包、安装或原生窗口验收结论。React/Python与原版Purge收益尚未开展;下一按[读取可靠性S计划](READING-RELIABILITY-S-PLAN.md)先离线复现、修复和独立验收,再另立新真实样本。[阶段回顾](RETROSPECTIVE-LIVE-DELIVERY-R.md)记录采用理由和验收边界。
+20
View File
@@ -0,0 +1,20 @@
# S:文件续读、有效读取吞吐与暂停解释
R 的真实样本已结束并保留失败。新预检成功,Node 六请求、72571上游报告tokens,实际基线九测试失败、build通过,尚未修改或交付。继续遵守 Node→React/Python→原版Purge 的前置关系。S先完成可复现的可靠性修复与验收,再另立一次新的有界模型实验;不续跑R/P/O旧Task。
## 已有具体依据
1. 文件总2584字符,三次实际分页只覆盖0–1271,分别473/402/396字符。readMessageBudget在原多工具批次及后续单读均返回1024字节底限,后两页扣元数据后为949字节。不是相同区间重复读取,也没有达到no_progress暂停条件。
2. 历史索引对read_file只展示result_artifact_id。该工件仅保存已返回的一页,不能取得尚未读取的原文件后文;模型随后读了891字符包装中的前495字符,消耗一轮而没有新增文件覆盖。系统中“截取后读取原结果工件”的指导应区分恢复已读页与继续读原文件。
3. R第七次本地输入12352符合上下文预算,但观察用量保守预留29623超过剩余17429。当前文字把两类不足笼统归为目标/必需输入开销过大,影响定位。第4次上游报告27164输入tokens及24192缓存tokens须保持,内部模板/计费原因未知;不回滚已知用量预留或伪造节省。
## 实现顺序及验收
1. **冻结离线复现。** 用R原三段文件页、工具调用组、ContextPlan和原目标/约束构造隔离宿主重放,原件只读。固定16K/2048/1600安全预留及完整工具契约,核对现有消息和页归属/范围,不使用正式Key或用户项目。
2. **明确续读入口。** 文件工作依据保留path、原行范围、SHA、offset/next_offset、total_characters及截取原因;区分“已返回但当前历史未携带”与“从未读取”。后者明确使用同一文件范围和next_offset;result_artifact_id只用于恢复原页,不冒充完整文件。文件变更、不同SHA、不同范围、跨Run/Task和陈旧结果必须继续核对,不能跳过工具执行账本。
3. **改善分页容量。** 测量固定系统文字、工具定义、最近反馈、保留源码和实际批次消息的占用;依据完整下一请求的实际容量分配必要读取,检查小源码与较大文件并存时的有效空间。保持安全预留、原目标/所有追加约束、消息配对、最新结果和可核对来源。用多种文件/长行/中英文/emoji/CRLF验证,不能为这个九测试特判、删字段或单纯提高底限让请求越界。
4. **准确说明暂停。** 区分本地上下文容纳不足、Run/Task剩余额度不足、观察用量造成的下一请求预留不足。保留原budgetPause细节和上游原文,展示所需/剩余、已报告/未知用量及所属Task,不把预算暂停写成供应商超时;不自动重试/扩预算或替用户切池。
5. **相关验证与独立发行。** 覆盖Chat/Responses/Messages的上下文封存、分页/Unicode、完整约束保留、最新工具组、小源码保留、历史归属、当前检查和预算恢复;实际编译请求核对原文件覆盖和逐消息预算。UI有变更时按产品UI工作流回看源码/桌面/窄屏入口。产品变更通过独立源码、不可变归档/便携/隔离安装和保留原PID/Provider正式升级后才算上线;原用户数据/配置和历史失败继续保留。
6. **再做真实交付。** 修复交付后新建明确预算样本:同原九测试/三源码、16K/2048、最多8请求/90000tokens,监督只审查/审批/确认Git,不提供实现。若失败,封存与复盘;成功后再扩React/Python和单列Purge AB/BA。离线读取改善不能代替真实成功率或收益结论。
每个切片完成后更新task_plan/findings/progress及本地Git;不委派、不提取/复制/重存Key、不重启原正式Provider、不推送。1.25其余能力和完整目录重复核验性能仍独立排期,先解决真实工程任务最先暴露的问题。
+13
View File
@@ -0,0 +1,13 @@
# R 回顾:链路已响应,工程仍停在读取阶段
R完成了Q之后的第一轮新真实样本。DNS/TCP/TLS和单次身份预检通过,Node六次请求也取得完整匹配的JSON响应,原基线测试确实运行。仍未产生修改或交付,不能把连接成功或build通过写成自主工程已达标。
这轮的主要问题有了具体输入依据:2584字符的原测试仍被切为约400字符的小页;历史索引给出的文件结果工件只含已读片段,模型又花一轮恢复包装;读取仍未完成时,观察到的上游用量抬高下一发送预留,使29623大于剩余17429而暂停。当前暂停文字没有清楚表达这项原因。
需要保留的实现包括:严格身份与原HTTP响应/用量记录、完整上下文硬限制、已知用量保守预留、审批与文件/Git边界。七次真实调用全有原响应,0未知,没有依据把失败重新归因为P的连接超时、O的上下文问题或历史误配置Claude。上游第4次报告27164输入tokens的内部原因仍未知,报告原件不能替换成本地估计。
本轮质量核对也更完整:实际发生工具操作后,补充取得全部61个自有工件记录,而非仅保留最后30个展示条目;95条新记录与164条事件/outbox均有归属证明,原项目位置顺移单列逆算。原61项目/77导出/3610工件/209尝试与原行保持,预算和用户当前号池恢复、原PID/Provider和凭据不动。178份证据离线核对通过,旧失败继续独立保存。
下一S围绕这次最先暴露的读取链路实施:明确未读文件的续读位置,离线衡量实际完整下一请求中的分页容量,区分上下文不足与已知用量预留不足。用多种文件、Unicode/CRLF、混合工具批次和三协议验证,保持原约束/源码/工具依据和安全预留;具体门槛见[执行计划](READING-RELIABILITY-S-PLAN.md)。
产品修复通过独立源码/发行/安装及原状态核对后,再另建同预算真实Node。Node闭环通过才扩React/Python及原版Purge AB/BA;读取吞吐改善不直接等于真实成功率或Purge收益。1.25其余能力和升级重复目录核验性能继续独立排期。每个切片完成后更新回顾、本地Git和下一计划,不通过反复开样本或增加额度追求表面通过。
+4
View File
@@ -1,5 +1,9 @@
# Agent Workbench 验收记录
R真实实测与回顾已封存:唯一所属DNS/auto/IPv4/IPv6 TLS诊断通过,0HTTP/模型/凭据;新预检1请求/4492报告tokens/0工具/strict matched。新Node6请求/72571报告tokens/0未知、全JSON matched,12工具/1原检查审批,原九测试全部失败/基线build通过,0提案/修改/交付;第7次预留29623>剩余17429在发送前token_limit暂停,本地输入12352仍符合原上下文预算。原61项目77导出/3610工件/209尝试与原行(原项目位置按2个自有前插逆算)保持,预算/高性能池恢复,目标5→6→7/凭据1、全局65→69,9229关闭,当前63项目79会话6262记录13279事件及outbox/3660工件。178份/75944723字节证据及含清单179份/75980516字节Git索引核对通过;[本轮结果](QA-LIVE-DELIVERY-R.md)、[回顾](RETROSPECTIVE-LIVE-DELIVERY-R.md)与[下一S计划](READING-RELIABILITY-S-PLAN.md)已记录。正式仍1.24.6/source54dbe3d6/原PID36552/Provider,本轮没有产品改动、新发行或UI回看结论,React/Python/Purge未测。
Q既有发行记录:1.24.6/source54dbe3d6/候选20261103151145294已本地交付所属连接诊断。69相关/11宿主/14安装旧版升级与4补强热升级通过,560源码输入独立重建22/22、新UI源码/便携/安装各9组及五类历史26组、三归档/便携/12实际安装及16+9文件流程通过,原状态与正式网页/原生回看后再次保持。438份证据离线通过,真实模型0调用,完整验收见[Q报告](QA-NETWORK-DIAGNOSTICS-Q.md)及[发行身份](network-q-release-identity.json)。这是Q的历史验收,本轮R未重复执行这些检查;Q更新677755ms的重复核验性能继续单列。
1.24.5已本地交付:定向去掉重复目标和计划诊断回声,保留完整合同/要求/原工件。105相关与25升级安装、552源码ZIP输入独立重建22/22、三归档/便携、三载荷16K原双回复回放、源码25历史UI、12实际安装及安装副本16+9文件流程通过。正式原PID36552/Provider、58项目74会话及全部原数据精确保持,网页/原生及再次核对通过。新真实Node样本2请求/4838报告tokens、1次未知预留11095,第二请求实际上游502,0改动/检查/交付;原74导出/3596工件/205尝试及声明原状态保持,当前59项目75会话。315份/140408882字节证据离线通过;见[QA报告](QA-LIVE-CONTEXT-O.md)、[回顾](RETROSPECTIVE-LIVE-CONTEXT-O.md)和[发行身份](live-context-o-release-identity.json)。本轮合计5请求/16227报告tokens/1未知,Purge收益未测试,下方按历史时点理解。
N补充:用户确认GPT分组误填Claude。34组实际旧/新模块GPT请求字节与预算对照、24组型号对照、13文件144/144相关回归及Chat/Responses两个实际localhost重定向场景通过;220份src仍与M冻结相同。apikey按GPT/Responses校正,保留并发期间外部设置的停用状态,凭据修订2及其它连接/池/原M导出内容等声明范围保持。程序仍1.24.4,本轮真实模型请求0,不宣称重新整库/全工件或真实工程/Purge通过;52份/650216字节N证据及原M绑定离线核对通过,见[复查报告](ROUTING-AUDIT-N.md)。M的协议交付仍有效,但旧型号差异不能继续当作Claude供应商故障。
@@ -0,0 +1,62 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { createHash } from 'node:crypto';
import { DatabaseSync } from 'node:sqlite';
import { snapshotPersistentData } from '../src/core/desktop/install-manager.mjs';
export const hash = bytes => createHash('sha256').update(bytes).digest('hex');
export const canonical = value => Array.isArray(value) ? value.map(canonical) : value && typeof value === 'object' ? Object.fromEntries(Object.keys(value).sort().map(key => [key, canonical(value[key])])) : value;
export const digest = value => hash(JSON.stringify(canonical(value)));
export function databaseSnapshot(dataRoot) {
const database = new DatabaseSync(path.join(dataRoot, 'workbench.sqlite'), { readOnly: true }); database.exec('BEGIN');
try {
assert.equal(database.prepare('PRAGMA quick_check').get().quick_check, 'ok');
const tables = {};
for (const { name, sql } of database.prepare("SELECT name,sql FROM sqlite_schema WHERE type='table' ORDER BY name").all()) {
assert.match(name, /^[a-z_]+$/);
const rows = database.prepare('SELECT * FROM "' + name + '" ORDER BY rowid').all().filter(row => !(name === 'metadata' && row.key === 'runtimeOwner'));
tables[name] = { count: rows.length, schemaSha256: hash(sql), sha256: digest(rows), rows: rows.map((row, index) => ({ id: row.id ?? row.key ?? row.seq ?? index, ...(row.kind ? { kind: row.kind } : {}), sha256: digest(row) })) };
}
const sessionIds = database.prepare('SELECT id FROM sessions ORDER BY id').all().map(row => row.id);
const owner = database.prepare("SELECT value FROM metadata WHERE key='runtimeOwner'").get();
return { tables, sessionIds, ownerSha256: owner ? digest(owner) : null, scope: 'Every original table schema and row field hashed, excluding only runtimeOwner lifecycle metadata. No row payload or credential is returned.' };
} finally { database.exec('ROLLBACK'); database.close(); }
}
export async function publicSnapshot(url, dataRoot) {
const healthResponse = await fetch(url + '/api/health', { headers: { Connection: 'close' }, signal: AbortSignal.timeout(20000) }); assert.equal(healthResponse.status, 200);
const health = await healthResponse.json(), bootResponse = await fetch(url + '/api/bootstrap', { headers: { Connection: 'close' }, signal: AbortSignal.timeout(20000) }); assert.equal(bootResponse.status, 200);
const bootstrap = await bootResponse.json(); const token = bootstrap.token;
const api = async route => { const response = await fetch(url + '/api' + route, { headers: { 'X-Workbench-Token': token, Connection: 'close' }, signal: AbortSignal.timeout(20000) }); assert.ok(response.ok, route + ': HTTP ' + response.status); return response.json(); };
const database = databaseSnapshot(dataRoot), exports = [];
for (const id of database.sessionIds) {
const report = await api('/sessions/' + id + '/export');
exports.push({ id, project: digest(report.project), session: digest(report.session), execution: digest(report.execution) });
}
const center = await api('/model-center');
// This is the documented public model-center view; Provider's private map and
// API key are never accessed. Only this public object is retained for schema-aware comparison.
const modelCenter = structuredClone(center);
return { observedAt: new Date().toISOString(), version: health.version, pid: health.pid, runtimeRoot: bootstrap.runtimeRoot,
configSha256: digest(bootstrap.config), projectsSha256: digest(bootstrap.projects), sessionsSha256: digest(bootstrap.sessions), modelCenterSha256: digest(modelCenter), modelCenter,
projects: bootstrap.projects.length, visibleSessions: bootstrap.sessions.length, hasKey: !!bootstrap.config.hasKey,
active: bootstrap.sessions.filter(value => ['running', 'awaiting_approval', 'stopping'].includes(value.status)).map(value => ({ id: value.id, status: value.status })),
storage: bootstrap.storage, eventCursor: bootstrap.eventCursor, database, exports, persistent: snapshotPersistentData(dataRoot),
scope: 'Read-only public state, every original session export digest, original table/row/schema hashes and every original artifact byte hash. No credential extraction, model probe, execution or mutation.' };
}
export function compareOriginalState(before, after, { modelCenterSchemaChange = false } = {}) {
for (const field of ['pid', 'hasKey', 'configSha256', 'projectsSha256', 'sessionsSha256', 'eventCursor']) assert.deepEqual(after[field], before[field], field);
assert.deepEqual(canonical(after.database.tables), canonical(before.database.tables), 'All original table schemas and every persistent row');
assert.deepEqual(after.database.sessionIds, before.database.sessionIds); assert.deepEqual(after.exports, before.exports);
assert.deepEqual(after.persistent, before.persistent, 'Every original artifact byte, persistent row and public disk config');
if (modelCenterSchemaChange) {
const original = structuredClone(before.modelCenter), next = structuredClone(after.modelCenter);
// 1.15 changes only the public explanatory text about optional DPAPI storage.
// Existing IDs, routes, revisions, credentials-present bits and all original attempts remain exact.
assert.match(next.storage.restart, /临时凭据.*已明确本机加密保存/);
next.storage.restart = original.storage.restart;
assert.deepEqual(next, original, 'Original public model center, except versioned storage explanation');
return { modelCenterChange: { path: '/storage/restart', original: before.modelCenter.storage.restart, actual: after.modelCenter.storage.restart }, originalRows: 'exact', originalExports: 'exact', originalArtifactBytes: 'exact' };
}
assert.equal(after.modelCenterSha256, before.modelCenterSha256);
return { originalRows: 'exact', originalExports: 'exact', originalArtifactBytes: 'exact', originalModelCenter: 'exact' };
}
@@ -0,0 +1,41 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { createHash } from 'node:crypto';
import { execFileSync } from 'node:child_process';
const target = path.resolve('docs/live-delivery-r-contract'); assert.equal(fs.existsSync(target), false);
const sha = bytes => createHash('sha256').update(bytes).digest('hex');
const sourceFiles = ['prepare-live-delivery-r.mjs', 'freeze-live-delivery-r.mjs', 'live-delivery-r-initial.mjs', 'live-delivery-r-common.mjs',
'live-delivery-r-payload.mjs', 'live-delivery-r-inspector.mjs', 'live-delivery-r-preflight.mjs', 'live-delivery-r-preflight-audit.mjs',
'live-delivery-r-node.mjs', 'live-delivery-r-network.mjs', 'desktop-f-state.mjs'];
const files = [];
for (const name of sourceFiles) {
const bytes = fs.readFileSync(path.join('.qa', name)), relative = 'drivers/' + name + '.txt';
fs.mkdirSync(path.join(target, 'drivers'), { recursive: true });
fs.writeFileSync(path.join(target, relative), bytes, { flag: 'wx' });
files.push({ path: relative, bytes: bytes.length, sha256: sha(bytes) });
}
const initialBytes = fs.readFileSync('.qa/live-delivery-r/current.json');
const initial = JSON.parse(initialBytes);
const modelAttempts = initial.baseline.database.tables.metadata.rows.find(row => row.id === 'modelAttempts');
const release = JSON.parse(fs.readFileSync('docs/network-q-release-identity.json'));
const manifest = { schemaVersion: 1, kind: 'bounded-live-delivery-r-contract', frozenAt: new Date().toISOString(),
sourceBaseCommit: initial.sourceCommit, branch: execFileSync('git', ['branch', '--show-current'], { encoding: 'utf8' }).trim(),
planSha256: sha(fs.readFileSync('docs/LIVE-DELIVERY-R-PLAN.md')), originalBaselineSha256: sha(initialBytes),
releaseVersion: release.version, releaseSourceCommit: release.sourceCommit,
releaseIdentitySha256: sha(fs.readFileSync('docs/network-q-release-identity.json')),
host: { pid: initial.host.identity.pid, runtimeRoot: initial.host.identity.runtimeRoot, runtimeIdentity: initial.host.identity.runtimeIdentity },
originalProjects: initial.baseline.projects, originalSessions: initial.baseline.exports.length,
originalArtifacts: initial.baseline.persistent.artifacts.length, originalAttemptsRow: modelAttempts,
dependencySources: ['src/core/git-process.mjs', 'src/core/desktop/install-manager.mjs', 'benchmarks/live-delivery-v1/node/src/amount.mjs',
'benchmarks/live-delivery-v1/node/src/summary.mjs', 'benchmarks/live-delivery-v1/node/src/report.mjs', 'benchmarks/live-delivery-v1/node/test/expense.test.mjs',
'benchmarks/live-delivery-v1/node/package.json', 'benchmarks/live-delivery-v1/node/scripts/build.mjs']
.map(name => ({ path: name, sha256: sha(fs.readFileSync(name)) })),
previousDriverHashes: ['initial', 'common', 'payload', 'inspector', 'preflight', 'preflight-audit', 'node']
.map(name => ({ path: '.qa/live-delivery-p-' + name + '.mjs', sha256: sha(fs.readFileSync('.qa/live-delivery-p-' + name + '.mjs')) })),
maxNetworkJobs: 1, maxPreflightRequests: 1, maxNodeRequests: 8, maxNodeTokens: 90000,
contextLimit: 16000, maxOutputTokens: 2048, modelRequestsAtFreeze: 0, noKeyValuesReadOrSaved: true,
files: files.sort((a,b) => a.path.localeCompare(b.path)) };
fs.writeFileSync(path.join(target, 'manifest.json'), JSON.stringify(manifest, null, 2) + '\n', { flag: 'wx' });
console.log(JSON.stringify({ frozen: true, drivers: files.length, projects: manifest.originalProjects, sessions: manifest.originalSessions,
artifacts: manifest.originalArtifacts, manifestSha256: sha(fs.readFileSync(path.join(target, 'manifest.json'))), modelRequests: 0 }));
@@ -0,0 +1,53 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { createHash } from 'node:crypto';
import { DatabaseSync } from 'node:sqlite';
import { Agent, fetch } from 'undici';
export const root = path.resolve('.qa/live-delivery-r');
export const original = JSON.parse(fs.readFileSync(path.join(root, 'current.json')));
export const origin = 'http://127.0.0.1:4318';
export const dataRoot = original.host.identity.dataRoot;
export const connectionId = '5b4daed9-b2f7-4de0-b949-573eba70c7b3';
export const sha = value => createHash('sha256').update(value).digest('hex');
export const save = (relative, value) => {
const file = path.join(root, relative); fs.mkdirSync(path.dirname(file), { recursive: true });
fs.writeFileSync(file, typeof value === 'string' || Buffer.isBuffer(value) ? value : JSON.stringify(value, null, 2) + '\n', { flag: 'wx' });
};
export function meta(name) {
assert.ok(['config', 'modelRegistry', 'modelAttempts', 'modelNetworkDiagnostics'].includes(name));
const db = new DatabaseSync(path.join(dataRoot, 'workbench.sqlite'), { readOnly: true });
try { return JSON.parse(db.prepare('SELECT value FROM metadata WHERE key=?').get(name).value); }
finally { db.close(); }
}
export async function client() {
const dispatcher = new Agent({ connect: { autoSelectFamily: true, timeout: 5000 } });
let token;
const api = async (route, input, timeout = 30000) => {
const response = await fetch(origin + '/api' + route, { dispatcher,
method: input === undefined ? 'GET' : 'POST', redirect: 'error', signal: AbortSignal.timeout(timeout),
headers: { ...(token ? { 'X-Workbench-Token': token } : {}), 'Content-Type': 'application/json', Connection: 'close' },
...(input === undefined ? {} : { body: JSON.stringify(input) }) });
const value = await response.json();
if (!response.ok) throw Object.assign(new Error(route + ': ' + (value.error ?? response.status)), { status: response.status });
return value;
};
const boot = await api('/bootstrap'); token = boot.token;
return { api, boot, close: () => dispatcher.close() };
}
export async function captureAttempts(api, attempts, relative) {
const captures = [];
for (const attempt of attempts) for (const kind of ['request', 'response']) {
const id = attempt[kind + 'ArtifactId']; if (!id) continue;
let content = '', offset = 0, page;
do {
page = await api('/artifacts/' + id + '?session=' + attempt.sessionId + '&offset=' + offset + '&limit=16000');
assert.ok(page.content.length || !page.truncated); content += page.content; offset += page.content.length;
} while (page.truncated);
assert.equal(sha(content), page.sha256);
assert.equal(page.sha256, attempt[kind + 'Sha256']);
const name = `${relative}/${attempt.id}-${kind}.${kind === 'request' ? 'json' : attempt.streaming ? 'sse' : 'txt'}`;
save(name, content); captures.push({ attemptId: attempt.id, kind, artifactId: id, path: name, sha256: sha(content), bytes: Buffer.byteLength(content) });
}
return captures;
}
@@ -0,0 +1,21 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { execFileSync } from 'node:child_process';
import { publicSnapshot } from './desktop-f-state.mjs';
const root = path.resolve('.qa/live-delivery-r'); assert.equal(fs.existsSync(root), false);
const origin = 'http://127.0.0.1:4318', boot = await (await fetch(origin + '/api/bootstrap', { headers: { Connection: 'close' } })).json();
const api = async route => (await fetch(origin + '/api' + route, { headers: { 'X-Workbench-Token': boot.token, Connection: 'close' } })).json();
const host = await api('/host/status'), center = await api('/model-center'), connection = center.connections.find(c => c.id === '5b4daed9-b2f7-4de0-b949-573eba70c7b3');
assert.equal(boot.version, '1.24.6'); assert.equal(host.identity.pid, 36552); assert.equal(host.activity.active, false);
assert.equal(connection.enabled, true); assert.equal(connection.hasKey, true); assert.equal(connection.credentialRevision, 1); assert.equal(connection.revision, 5);
assert.equal(connection.model, 'gpt-6.1-sol'); assert.equal(connection.protocol, 'chat-completions'); assert.equal(connection.streaming, false);
assert.equal(connection.contextLimit, 16000); assert.equal(connection.maxOutputTokens, 2048);
assert.equal(center.connections.find(c => c.id === '09b0293b-faad-45c3-832d-7c8b615813aa').enabled, false);
const baseline = await publicSnapshot(origin, host.identity.dataRoot); assert.deepEqual(baseline.active, []);
assert.deepEqual(center.selected, { type: 'pool', id: '68e30376-b799-445b-a858-db2dba9920a0' });
fs.mkdirSync(root);
fs.writeFileSync(path.join(root, 'current.json'), JSON.stringify({ host, config: boot.config, projects: boot.projects, center, baseline,
sourceCommit: execFileSync('git', ['rev-parse', 'HEAD'], { encoding: 'utf8' }).trim(), observedAt: new Date().toISOString() }, null, 2), { flag: 'wx' });
console.log(JSON.stringify({ success: true, version: boot.version, pid: host.identity.pid, projects: baseline.projects, sessions: baseline.exports.length,
connectionId: connection.id, contextLimit: connection.contextLimit, modelRequests: 0 }));
@@ -0,0 +1,58 @@
import assert from 'node:assert/strict';
import net from 'node:net';
import { setTimeout as delay } from 'node:timers/promises';
import { boundedGptPreflight } from './live-delivery-r-payload.mjs';
export async function inspectorClosed() {
return new Promise((resolve, reject) => {
const socket = net.createConnection({ host: '127.0.0.1', port: 9229 }); socket.setTimeout(1500);
socket.once('connect', () => { socket.destroy(); reject(Error('Inspector already open.')); });
socket.once('error', e => { socket.destroy(); e.code === 'ECONNREFUSED' ? resolve(true) : reject(e); });
socket.once('timeout', () => { socket.destroy(); reject(Error('Inspector state unknown.')); });
});
}
class Protocol {
constructor(socket) {
this.socket = socket; this.nextId = 1; this.pending = new Map();
socket.addEventListener('message', event => {
const m = JSON.parse(String(event.data)); if (!m.id) return;
const p = this.pending.get(m.id); if (!p) return; this.pending.delete(m.id); clearTimeout(p.timer);
m.error ? p.reject(Error(m.error.message)) : p.resolve(m.result);
});
socket.addEventListener('close', () => { for (const p of this.pending.values()) { clearTimeout(p.timer); p.reject(Error('Inspector closed; outcome unknown.')); } this.pending.clear(); });
}
send(method, params, timeout = 10000) {
return new Promise((resolve, reject) => {
const id = this.nextId++, timer = setTimeout(() => { this.pending.delete(id); reject(Error('Inspector timeout; do not replay.')); }, timeout);
this.pending.set(id, { resolve, reject, timer }); this.socket.send(JSON.stringify({ id, method, params }));
});
}
}
export async function invokeGptProbe(input) {
await inspectorClosed(); let socket, protocol, enabled = false;
try {
process._debugProcess(input.pid); enabled = true;
let targets;
for (let i = 0; i < 40 && !targets; i++) {
await delay(100);
try { targets = await (await fetch('http://127.0.0.1:9229/json/list', { signal: AbortSignal.timeout(700) })).json(); } catch {}
}
assert.equal(targets?.length, 1);
assert.ok(targets[0].webSocketDebuggerUrl.startsWith('ws://127.0.0.1:9229/'));
socket = new WebSocket(targets[0].webSocketDebuggerUrl);
await new Promise((resolve, reject) => { socket.addEventListener('open', resolve, { once: true }); socket.addEventListener('error', reject, { once: true }); });
protocol = new Protocol(socket);
const identity = await protocol.send('Runtime.evaluate', { expression: 'process.pid', returnByValue: true });
assert.equal(identity.result.value, input.pid);
const expression = '(' + boundedGptPreflight.toString() + ')(' + JSON.stringify(input) + ')';
const result = await protocol.send('Runtime.evaluate', { expression, awaitPromise: true, returnByValue: true }, 345000);
if (result.exceptionDetails) throw Error(result.exceptionDetails.exception?.description ?? result.exceptionDetails.text);
return { result: result.result.value, expression };
} finally {
if (protocol && enabled) {
await protocol.send('Runtime.evaluate', { expression: "setTimeout(() => process.getBuiltinModule('inspector').close(), 25); 'closing'", returnByValue: true });
await delay(200);
}
socket?.close();
await inspectorClosed();
}
}
@@ -0,0 +1,63 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { setTimeout as delay } from 'node:timers/promises';
import { publicSnapshot, canonical } from './desktop-f-state.mjs';
import { root, origin, dataRoot, original, connectionId, save, meta, client } from './live-delivery-r-common.mjs';
assert.equal(fs.existsSync(path.join(root, 'network')), false, 'One diagnostic only; never overwrite or replay.');
const { api, boot, close } = await client();
let jobId;
try {
const host = await api('/host/status');
assert.equal(host.identity.pid, 36552); assert.equal(boot.version, '1.24.6'); assert.equal(host.activity.active, false);
const before = await publicSnapshot(origin, dataRoot); save('network/before.json', before);
assert.deepEqual(canonical(before.database.tables), canonical(original.baseline.database.tables));
assert.deepEqual(before.exports, original.baseline.exports); assert.deepEqual(before.persistent, original.baseline.persistent);
const history = await api('/model-center/network-diagnostics'); save('network/history-before.json', history);
assert.equal(history.active, 0); assert.equal(history.jobs.length, 0);
const connection = before.modelCenter.connections.find(row => row.id === connectionId);
assert.equal(connection.revision, 5); assert.equal(connection.credentialRevision, 1);
save('network/contract.json', { connectionId, revision: connection.revision, target: connection.baseUrl,
maxJobs: 1, budgetMs: 12000, credentialAccess: false, httpRequests: 0, modelRequests: 0,
directEndpointOnly: true, modelApiRouteVerified: false, defaultOrTransportChanges: false });
const started = await api('/model-center/network-diagnostics', { id: connectionId, revision: connection.revision });
save('network/start.json', started); jobId = started.job.id;
const deadline = Date.now() + 20000;
let current;
do {
current = await api('/model-center/network-diagnostics');
if (!current.active) break;
assert.ok(Date.now() < deadline, 'Diagnostic exceeded its bounded deadline.'); await delay(200);
} while (true);
const job = current.jobs.find(row => row.id === jobId);
assert.equal(current.jobs.length, 1); assert.equal(current.active, 0); assert.ok(job.finishedAt);
assert.equal(job.connectionId, connectionId); assert.equal(job.connectionRevision, 5);
assert.equal(job.httpRequests, 0); assert.equal(job.modelRequests, 0); assert.equal(job.credentialAccess, false);
assert.equal(job.route.kind, 'direct-endpoint-only'); assert.equal(job.route.modelApiRouteVerified, false);
save('network/history-after.json', current); save('network/job.json', job);
const after = await publicSnapshot(origin, dataRoot); save('network/after.json', after);
for (const field of ['pid', 'version', 'hasKey', 'configSha256', 'projectsSha256', 'sessionsSha256', 'eventCursor', 'modelCenterSha256']) assert.deepEqual(after[field], before[field], field);
assert.deepEqual(after.exports, before.exports); assert.deepEqual(after.persistent.artifacts, before.persistent.artifacts);
assert.deepEqual(after.persistent.files, before.persistent.files);
for (const table of Object.keys(before.database.tables)) {
assert.equal(after.database.tables[table].schemaSha256, before.database.tables[table].schemaSha256);
const nextRows = after.database.tables[table].rows.filter(row => table !== 'metadata' || row.id !== 'modelNetworkDiagnostics');
const previousRows = before.database.tables[table].rows.filter(row => table !== 'metadata' || row.id !== 'modelNetworkDiagnostics');
assert.deepEqual(nextRows, previousRows, table + ': only diagnostic history may change');
}
assert.equal(after.database.tables.metadata.count - before.database.tables.metadata.count, 1);
assert.deepEqual(meta('modelNetworkDiagnostics').map(row => row.id), [jobId]);
const result = { passed: true, jobId, diagnosticStatus: job.status, elapsedMs: job.elapsedMs,
dns: job.stages.dns, trials: job.trials.map(row => ({ mode: row.mode, family: row.family, status: row.status, code: row.code })),
route: job.route, originalStateExactExceptNewDiagnosticHistory: true, credentialAccess: false, httpRequests: 0, modelRequests: 0 };
save('network/restoration.json', result); console.log(JSON.stringify(result));
} catch (error) {
save('network/driver-error.json', { name: error.name, message: error.message, stack: error.stack, jobId, automaticReplay: false });
throw error;
} finally {
if (jobId) {
const state = await api('/model-center/network-diagnostics');
if (state.active && ['pending', 'running'].includes(state.jobs.find(row => row.id === jobId)?.status)) save('network/stop.json', await api('/model-center/network-diagnostics/' + jobId + '/stop', {}));
}
await close();
}
@@ -0,0 +1,236 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { execFileSync } from 'node:child_process';
import { setTimeout as delay } from 'node:timers/promises';
import { gitEnvironment } from '../src/core/git-process.mjs';
import { publicSnapshot, canonical } from './desktop-f-state.mjs';
import { root, origin, dataRoot, connectionId, save, meta, client, sha, captureAttempts } from './live-delivery-r-common.mjs';
assert.equal(JSON.parse(fs.readFileSync(path.join(root, 'preflight/result.json'))).passed, true);
assert.equal(fs.existsSync(path.join(root, 'node')), false, 'Never replay or overwrite a live sample.');
const { api, boot, close } = await client();
const allowed = ['src/amount.mjs', 'src/summary.mjs', 'src/report.mjs'];
const budgetFields = ['contextLimit', 'maxSteps', 'maxOutputTokens', 'maxRunTokens', 'maxTaskTokens', 'maxRunDurationMs'];
const connectionFields = ['id', 'name', 'brand', 'model', 'baseUrl', 'enabled', 'requiresKey', 'streaming', 'protocol',
'capabilityDeclarations', 'contextLimit', 'maxOutputTokens', 'concurrency', 'nativeParameters', 'outputTokenField',
'modelIdentityPolicy', 'modelIdentityAliases', 'modelIdentityAliasSource'];
const connectionInput = value => Object.fromEntries(connectionFields.filter(key => Object.hasOwn(value, key)).map(key => [key, value[key]]));
const originalIdentity = value => ({ modelIdentityPolicy: value.modelIdentityPolicy ?? 'record',
modelIdentityAliases: value.modelIdentityAliases ?? [], modelIdentityAliasSource: value.modelIdentityAliasSource ?? '' });
let before, centerBefore, publicMetadata, originalAttempts, connection, configured, project, session, state, taskId, route, budgetWritten = false, selectionWritten = false;
let result, delivery, succeeded = false, failure;
const approvals = [], applications = [], continuations = [], observations = [], start = Date.now();
const sourceRoot = path.join(root, 'node/expense-project');
const git = args => execFileSync('git', ['--no-pager', '--no-optional-locks', '-C', sourceRoot, ...args], { encoding: 'utf8', windowsHide: true, env: gitEnvironment() });
let protectedBytes, stagedBefore;
const protect = () => {
for (const [name, bytes] of Object.entries(protectedBytes)) assert.deepEqual(fs.readFileSync(path.join(sourceRoot, name)), bytes, name);
assert.equal(git(['show', ':owner-staged.txt']), stagedBefore, 'Preserve original index and working-copy states.');
};
const waitFor = async (predicate, timeout = 30000) => {
const deadline = Date.now() + timeout;
while (!await predicate()) { assert.ok(Date.now() < deadline, 'Local operation deadline exceeded; verify outcome, never replay.'); await delay(350); }
};
const review = async (kind, value) => {
const relative = `node/reviews/${kind}-${applications.length + 1}`;
const fingerprint = value.fingerprint ?? sha(JSON.stringify(value));
save(relative + '/input.json', { ...value, fingerprint });
console.log(JSON.stringify({ reviewRequired: true, kind, path: relative + '/input.json', fingerprint }));
const decisionPath = path.join(root, relative, 'decision.json');
await waitFor(async () => fs.existsSync(decisionPath), Math.max(1, 600000 - (Date.now() - start)));
const decision = JSON.parse(fs.readFileSync(decisionPath));
assert.equal(decision.approve, true, 'Supervisor declined the original model proposal.');
assert.ok(typeof decision.reason === 'string' && decision.reason.length > 20, 'Record substantive review.');
assert.equal(decision.fingerprint, fingerprint);
return decision;
};
const remainingRun = async () => {
const requests = state?.execution.task.usage.requests ?? 0;
assert.ok(requests < 8, 'The sealed eight-request budget is exhausted.');
const budgets = { contextLimit: 16000, maxOutputTokens: 2048, maxSteps: 8 - requests,
maxRunTokens: 90000, maxTaskTokens: 90000, maxRunDurationMs: 600000 };
await api('/model-center/runtime-budgets', budgets); budgetWritten = true;
continuations.push({ beforeRequests: requests, remainingSteps: budgets.maxSteps, at: new Date().toISOString() });
};
try {
assert.equal(boot.version, '1.24.6');
const host = await api('/host/status'); assert.equal(host.identity.pid, 36552); assert.equal(host.activity.active, false);
before = await publicSnapshot(origin, dataRoot); save('node/before.json', before);
centerBefore = await api('/model-center'); connection = centerBefore.connections.find(value => value.id === connectionId);
assert.equal(connection.enabled, true); assert.equal(connection.hasKey, true); assert.equal(connection.revision, 5);
assert.equal(connection.model, 'gpt-6.1-sol'); assert.equal(connection.protocol, 'chat-completions'); assert.equal(connection.contextLimit, 16000);
assert.deepEqual(originalIdentity(connection), { modelIdentityPolicy: 'record', modelIdentityAliases: [], modelIdentityAliasSource: '' });
publicMetadata = { config: meta('config'), registry: meta('modelRegistry') };
save('node/original-public-metadata.json', publicMetadata);
originalAttempts = meta('modelAttempts'); save('node/original-attempts.json', originalAttempts);
save('node/contract.json', { kind: 'new-real-Node-engineering', version: boot.version, connectionId, connection,
maxRequests: 8, maxTokens: 90000, contextLimit: 16000, maxOutputTokens: 2048, maxDurationMs: 600000,
allowed, checks: ['test', 'build'], expectedTests: 9, commands: 'Only model-planned npm test/build, no arbitrary run_command',
review: 'Model seals all three files, supervisor reviews and applies; model plans Git, supervisor confirms.',
continuation: 'Only review-action continuation of the same task with remaining steps, no extra implementation prompts.',
originalImplementationSupplied: false, automaticRetry: false, poolSwitching: false,
originalSelected: centerBefore.selected, originalBudgets: Object.fromEntries(budgetFields.map(key => [key, boot.config[key]])),
restore: 'Original budget values and selection restored. Original absent identity fields become explicit record/[]/empty-string defaults; raw pre-state retained and only this declared normalization accepted. Revision counters remain monotonic.' });
fs.cpSync('benchmarks/live-delivery-v1/node', sourceRoot, { recursive: true, errorOnExist: true });
fs.writeFileSync(path.join(sourceRoot, 'README.md'), '# Expense report acceptance\nRepair the three source modules using the immutable original nine tests; do not edit checks or owner files.\n', { flag: 'wx' });
fs.writeFileSync(path.join(sourceRoot, '.gitignore'), 'dist/\n.awb-*\nnode_modules/\n', { flag: 'wx' });
for (const name of ['owner-staged.txt', 'owner-unstaged.txt']) fs.writeFileSync(path.join(sourceRoot, name), 'Owner original baseline\n', { flag: 'wx' });
git(['init', '--initial-branch=main']); git(['config', 'core.autocrlf', 'false']);
git(['config', 'user.name', 'Workbench QA']); git(['config', 'user.email', 'qa@workbench.invalid']);
git(['add', '--', '.']); git(['commit', '--no-gpg-sign', '-m', 'Seal expense engineering baseline and original checks']);
fs.writeFileSync(path.join(sourceRoot, 'owner-staged.txt'), 'Owner staged change\n'); git(['add', '--', 'owner-staged.txt']);
stagedBefore = git(['show', ':owner-staged.txt']);
fs.writeFileSync(path.join(sourceRoot, 'owner-staged.txt'), 'Owner working copy differs from staging\n');
fs.writeFileSync(path.join(sourceRoot, 'owner-unstaged.txt'), 'Owner unstaged change\n');
fs.writeFileSync(path.join(sourceRoot, 'owner-untracked.txt'), 'Owner untracked change\n', { flag: 'wx' });
const protectedNames = ['README.md', '.gitignore', 'package.json', 'test/expense.test.mjs', 'scripts/build.mjs', 'owner-staged.txt', 'owner-unstaged.txt', 'owner-untracked.txt'];
protectedBytes = Object.fromEntries(protectedNames.map(name => [name, fs.readFileSync(path.join(sourceRoot, name))]));
const sourceFiles = [...protectedNames, ...allowed];
for (const name of sourceFiles) save('node/source-before/' + name, fs.readFileSync(path.join(sourceRoot, name)));
save('node/source-identity.json', { head: git(['rev-parse', 'HEAD']).trim(), status: git(['status', '--porcelain=v1']), stagedBefore,
files: Object.fromEntries(sourceFiles.map(name => [name, sha(fs.readFileSync(path.join(sourceRoot, name)))])) });
project = await api('/projects', { root: sourceRoot }); session = await api('/sessions', { projectId: project.id }); route = '/sessions/' + session.id;
save('node/owned.json', { project, session });
configured = await api('/model-center/connections', { ...connectionInput(connection), revision: connection.revision,
modelIdentityPolicy: 'require-match', modelIdentityAliases: [], modelIdentityAliasSource: '' });
assert.equal(configured.credentialRevision, connection.credentialRevision); assert.equal(configured.hasKey, true);
save('node/connection-frozen.json', configured);
await remainingRun(); await api('/model-center/select', { type: 'connection', id: connectionId }); selectionWritten = true;
const goal = '修复这个Node费用报表工程的amount、summary、report三个模块。金额用精确分单位处理,接受测试约定的十进制字符串/有限数字、退款、0及空白;拒绝格式错误、超精度和不安全金额。按独立币种规范化/排序汇总并保留原数组,计数准确、安全求和,报表两位小数含负分金额。以原九项测试为完整契约。'
+ '先inspect_project,再plan_checks选择["test","build"]并run_checks保留真实基线失败,读取原测试和相关源码。只允许修改src/amount.mjs、src/summary.mjs、src/report.mjs;不改测试、配置、README、构建脚本、owner文件或原暂存,不使用run_command,不直接提交Git。'
+ 'propose_file/propose_patch准备完整三个模块后,用prepare_change_set一次封存全部三文件,等待审查应用。应用后继续同一个Task,重新plan_checks/run_checks,通过原9项测试和build后,用plan_delivery为三个文件准备本地Git预览并等待确认。模型必须自己实现,禁止用口头完成替代检查。预算最多8次模型请求、90000tokens,输出2048,上下文16K,请合并独立工具调用并避免重复观察。';
save('node/goal.txt', goal); protect();
await api(route + '/messages', { content: goal });
while (Date.now() - start < 600000) {
state = await api(route); taskId ??= state.execution.task.id; assert.equal(state.execution.task.id, taskId); protect();
const usage = state.execution.task.usage; assert.ok(usage.requests <= 8); assert.ok(usage.totalTokens <= 90000);
const progress = { status: state.status, requests: usage.requests, tokens: usage.totalTokens, lastTool: state.events.filter(event => event.kind === 'tool').at(-1)?.tool,
checks: state.execution.checks.map(job => job.status), elapsedSeconds: Math.round((Date.now() - start) / 1000) };
if (JSON.stringify({ ...progress, elapsedSeconds: 0 }) !== JSON.stringify({ ...observations.at(-1), elapsedSeconds: 0 })) { observations.push(progress); console.log(JSON.stringify(progress)); }
for (const change of state.changes.filter(change => ['pending', 'conflict'].includes(change.status))) assert.ok(allowed.includes(change.path), 'Out-of-scope proposal: ' + change.path);
for (const approval of state.approvals.filter(item => item.status === 'pending')) {
const plan = state.execution.plans.find(value => value.id === approval.checkPlanId);
const allow = !!plan && plan.taskId === taskId && plan.checks.length === 2 && plan.checks.every(check => ['test', 'build'].includes(check.name) && !check.lifecycle?.length)
&& approval.cwd === sourceRoot && approval.command === plan.checks.map(check => check.command).join('\n');
approvals.push({ approvalId: approval.id, planId: plan?.id, command: approval.command, allow });
await api(route + '/approvals/' + approval.id, { allow }); assert.equal(allow, true, 'Only the sealed original checks are authorized.');
}
if (['running', 'awaiting_approval', 'stopping'].includes(state.status)) { await delay(650); continue; }
if (state.status === 'failed') throw new Error(state.failure?.message ?? 'Actual-model task failed');
const plan = state.execution.deliveryPlans?.findLast(value => value.status === 'planned' && value.taskId === taskId);
if (plan) {
assert.deepEqual(plan.paths.slice().sort(), allowed.slice().sort()); const requests = usage.requests;
assert.ok(state.events.some(event => event.tool === 'plan_delivery' && event.phase === 'completed'));
const passing = state.execution.checks.filter(job => job.status === 'passed').at(-1);
assert.equal(passing?.results.find(value => value.name === 'test')?.tests?.passed, 9);
await review('git', { plan, fingerprint: plan.fingerprint, checks: state.execution.checks, source: state.changes,
status: git(['status', '--porcelain=v1']), stagedBefore, stagedAfter: git(['show', ':owner-staged.txt']) });
await api(route + '/delivery-jobs', { planId: plan.id });
await waitFor(async () => { state = await api(route); delivery = state.execution.deliveries.at(-1); return !!delivery?.reportArtifactId; });
assert.equal(delivery.status, 'completed'); assert.equal(state.execution.task.usage.requests, requests); break;
}
const pending = state.changes.filter(change => change.status === 'pending');
const batch = state.execution.changeSets?.findLast(value => value.taskId === taskId && value.status === 'prepared');
if (pending.length) {
assert.ok(state.execution.checks.some(job => job.status === 'failed' && job.results.some(value => value.tests?.failed > 0)), 'Model must preserve the original failing tests.');
assert.equal(batch?.source, 'agent', 'Model must seal its own complete change set.');
assert.deepEqual(batch.files.map(file => file.changeId).sort(), pending.map(change => change.id).sort());
if (!applications.length) assert.deepEqual(batch.files.map(file => file.path).sort(), allowed.slice().sort());
assert.ok(applications.length < 3);
await review('changes', { fingerprint: batch.fingerprint, batch, changes: pending, checks: state.execution.checks });
await api(route + '/change-sets/' + batch.id + '/apply', { fingerprint: batch.fingerprint });
await waitFor(async () => (await api(route + '/change-sets/' + batch.id)).status === 'completed');
for (const change of pending) assert.equal(sha(fs.readFileSync(path.join(sourceRoot, change.path))), change.sha256);
applications.push({ id: batch.id, fingerprint: batch.fingerprint, paths: batch.files.map(file => file.path), source: batch.source }); protect();
await remainingRun(); await api(route + '/continue-reviewed', {}); continue;
}
throw new Error('Model stopped before verified Git delivery: ' + state.status + '/' + state.execution.run.stopReason);
}
assert.ok(delivery, 'The sealed engineering deadline ended without complete delivery.');
const passing = state.execution.checks.filter(job => job.status === 'passed').at(-1); assert.ok(passing);
const tests = passing.results.find(value => value.name === 'test')?.tests; assert.equal(tests?.total, 9); assert.equal(tests.passed, 9); assert.equal(tests.failed, 0);
assert.deepEqual(git(['diff-tree', '--no-commit-id', '--name-only', '-r', 'HEAD']).trim().split(/\r?\n/).sort(), allowed.slice().sort()); protect();
succeeded = true;
result = { success: true, commit: delivery.commit, tests, delivery, checkJobId: passing.id };
} catch (error) {
failure = { name: error.name, message: error.message, stack: error.stack, at: new Date().toISOString(), automaticReplay: false };
result = { success: false, failure }; process.exitCode = 1;
} finally {
if (route) {
state = await api(route);
if (['running', 'stopping', 'awaiting_approval'].includes(state.status)) { await api(route + '/stop', {}); state = await api(route); }
taskId ??= state.execution.task?.id;
save('node/session.json', state); save('node/export.json', await api(route + '/export'));
const attempts = meta('modelAttempts').filter(value => value.sessionId === session.id); save('node/attempts.json', attempts);
const captures = await captureAttempts(api, attempts, 'node/captures');
const identitiesValid = attempts.every(value => value.connectionId === connectionId && value.poolId === null && value.ordinal === 1
&& value.status === 'completed' && value.modelIdentity?.status === 'matched' && value.modelIdentity.complete === true && value.modelIdentity.policy === 'require-match');
result = { ...result, version: boot.version, sessionId: session.id, projectId: project.id, taskId, sourceRoot,
connectionId, requestedModel: 'gpt-6.1-sol', usage: state.execution.task?.usage, state: state.status, stopReason: state.execution.run?.stopReason,
attempts: attempts.length, identitiesValid, captures, approvals, applications, continuations, observations,
modelImplementationSuppliedBySupervisor: false, modelWeightsAuthenticated: false, originalPurgeBenefitTested: false,
elapsedSeconds: Math.round((Date.now() - start) / 1000) };
if (succeeded) assert.equal(identitiesValid, true);
save('node/model-outcome.json', result);
for (const name of allowed) save('node/source-after/' + name, fs.readFileSync(path.join(sourceRoot, name)));
save('node/git-final.json', { head: git(['rev-parse', 'HEAD']).trim(), status: git(['status', '--porcelain=v1']), stagedBefore, stagedAfter: git(['show', ':owner-staged.txt']), diff: git(['diff', 'HEAD', '--', ...allowed]) });
}
const host = await api('/host/status'); assert.equal(host.activity.active, false, 'Do not overwrite another active task.');
if (configured) {
const center = await api('/model-center'), current = center.connections.find(value => value.id === connectionId);
assert.equal(current.revision, configured.revision, 'Do not overwrite an external connection edit.');
const restored = await api('/model-center/connections', { ...connectionInput(connection), ...originalIdentity(connection), revision: current.revision });
assert.equal(restored.credentialRevision, connection.credentialRevision); save('node/connection-restored.json', restored);
assert.deepEqual(originalIdentity(restored), originalIdentity(connection));
}
if (budgetWritten) await api('/model-center/runtime-budgets', Object.fromEntries(budgetFields.map(key => [key, boot.config[key]])));
if (selectionWritten) await api('/model-center/select', centerBefore.selected);
const after = await publicSnapshot(origin, dataRoot); save('node/after.json', after);
if (before) {
for (const item of before.exports) assert.deepEqual(after.exports.find(value => value.id === item.id), item, 'Original export: ' + item.id);
for (const table of ['sessions', 'records', 'events', 'outbox']) {
const rows = new Map(after.database.tables[table].rows.map(row => [row.id, row]));
for (const row of before.database.tables[table].rows) assert.deepEqual(rows.get(row.id), row, 'Original ' + table + '/' + row.id);
}
const artifactMap = new Map(after.persistent.artifacts.map(value => [value.path, value]));
for (const item of before.persistent.artifacts) assert.deepEqual(artifactMap.get(item.path), item, 'Original artifact: ' + item.path);
const finalBoot = await api('/bootstrap'), normalized = { ...finalBoot.config, configRevision: boot.config.configRevision };
assert.deepEqual(canonical(normalized), canonical(boot.config));
assert.deepEqual(finalBoot.projects.filter(value => value.id !== project?.id), boot.projects, 'Every original public project, excluding only the new owned sample.');
assert.deepEqual(after.modelCenter.selected, centerBefore.selected); assert.deepEqual(after.modelCenter.pools, centerBefore.pools);
for (const item of centerBefore.connections.filter(value => ![connectionId, 'legacy-default'].includes(value.id))) assert.deepEqual(after.modelCenter.connections.find(value => value.id === item.id), item);
const finalMetadata = { config: meta('config'), registry: meta('modelRegistry') };
save('node/final-public-metadata.json', finalMetadata);
const configNormalized = { ...finalMetadata.config, configRevision: publicMetadata.config.configRevision };
assert.deepEqual(canonical(configNormalized), canonical(publicMetadata.config), 'Raw public disk config except its monotonic revision.');
const registryNormalized = structuredClone(finalMetadata.registry);
assert.ok(registryNormalized.revision > publicMetadata.registry.revision);
registryNormalized.revision = publicMetadata.registry.revision;
const originalConnection = publicMetadata.registry.connections.find(value => value.id === connectionId);
const finalConnection = registryNormalized.connections.find(value => value.id === connectionId);
assert.equal(finalConnection.revision, originalConnection.revision + 2);
finalConnection.revision = originalConnection.revision; finalConnection.updatedAt = originalConnection.updatedAt;
const registryBefore = structuredClone(publicMetadata.registry);
const normalizedBeforeConnection = registryBefore.connections.find(value => value.id === connectionId);
const normalization = Object.fromEntries(Object.entries(originalIdentity(normalizedBeforeConnection)).filter(([key]) => !Object.hasOwn(normalizedBeforeConnection, key)));
Object.assign(normalizedBeforeConnection, normalization);
save('node/declared-identity-default-normalization.json', { connectionId, added: normalization,
originalRawStatePreserved: true, originalSemanticsRestored: true, reason: 'The public partial-update API retains missing fields; restore explicit original default semantics rather than silently retaining require-match.' });
for (const value of [registryBefore, registryNormalized]) value.connections.sort((a, b) => a.id.localeCompare(b.id));
assert.deepEqual(canonical(registryNormalized), canonical(registryBefore), 'Registry except declared revision/timestamp/order and explicit original identity defaults.');
const finalAttempts = meta('modelAttempts');
for (const item of originalAttempts) assert.deepEqual(finalAttempts.find(value => value.id === item.id), item, 'Original complete model attempt: ' + item.id);
const metadataRows = new Map(after.database.tables.metadata.rows.map(row => [row.id, row]));
for (const row of before.database.tables.metadata.rows.filter(row => !['config', 'modelRegistry', 'modelAttempts'].includes(row.id))) assert.deepEqual(metadataRows.get(row.id), row);
save('node/restoration.json', { passed: true, originalExports: before.exports.length, originalArtifactFiles: before.persistent.artifacts.length,
originalRowsExact: ['sessions', 'records', 'events', 'outbox'], budgetsAndSelectionRestored: true, poolsUnchanged: true,
originalPublicProjectsExact: true, originalAttemptsExact: originalAttempts.length, rawConfigExceptRevisionExact: true,
registryExceptDeclaredRevisionTimestampOrderAndIdentityDefaultsExact: true, identityDefaultNormalization: normalization, otherMetadataRowsExact: true,
originalCredentialRevision: connection?.credentialRevision, finalCredentialRevision: after.modelCenter.connections.find(value => value.id === connectionId)?.credentialRevision,
changedOnlyMonotonicRevisionsObservedHealthAndDeclaredIdentityDefaults: true, pid: after.pid, version: after.version, noKeyExtractedOrResaved: true });
}
save('node/result.json', result ?? { success: false, failure, noModelDispatch: true }); await close();
}
console.log(JSON.stringify({ success: result.success, attempts: result.attempts, usage: result.usage, state: result.state,
stopReason: result.stopReason, commit: result.commit, tests: result.tests, error: result.failure?.message }));
@@ -0,0 +1,85 @@
// One-shot QA adapter. Runs inside the existing host; never reads a credential.
export async function boundedGptPreflight(input) {
const ensure = (value, message) => { if (!value) throw new Error(message); };
ensure(process.pid === input.pid, 'Unexpected host PID.');
const servers = process._getActiveHandles().filter(h => h?.listening && h.address?.()?.address === '127.0.0.1' && h.address?.()?.port === input.port);
ensure(servers.length === 1, 'Expected one owned loopback server.');
const context = servers[0].workbenchHostAuthority?.context;
ensure(context?.provider && context?.store && context?.runtime, 'Original context missing.');
const { store, provider, runtime } = context;
ensure(runtime.appDirectory === input.runtimeRoot, 'Loaded runtime changed.');
ensure(![...store.sessions.values()].some(s => ['running', 'stopping', 'awaiting_approval'].includes(s.status)), 'Host is busy.');
const session = store.session(input.sessionId), project = store.project(session.projectId);
ensure(session.projectId === input.projectId && session.messages.length === 0 && !session.runId, 'Probe session must be new and owned.');
const hub = provider.modelHub(store);
const connection = hub.view().connections.find(c => c.id === input.connectionId);
ensure(connection?.hasKey && connection.credentialRevision === input.credentialRevision, 'Original saved credential revision changed.');
ensure(connection.enabled && connection.protocol === 'chat-completions' && (connection.modelIdentityPolicy ?? 'record') === 'record', 'Probe protocol/auth/identity mismatch.');
ensure(connection.baseUrl === input.baseUrl && connection.model === input.model && connection.revision === input.connectionRevision, 'Connection changed.');
const config = hub.prepare({ ...store.config, mode: 'compatible', maxSteps: 1, maxOutputTokens: 256,
contextLimit: 16000, maxRunTokens: 16000, maxTaskTokens: 16000, maxRunDurationMs: 320000,
modelResponseTimeoutMs: 300000, modelStreamIdleTimeoutMs: 120000 }, { type: 'connection', id: input.connectionId });
config.modelRouting.members = config.modelRouting.members.map(member => ({ ...member, modelIdentityPolicy: 'require-match', modelIdentityAliases: [], modelIdentityAliasSource: '' }));
ensure(config.modelRouting.members.length === 1 && config.modelRouting.maxAttempts === 1 && config.maxOutputTokens === 256, 'One-request hard limits missing.');
globalThis.__gptRProbeOnce ??= new Set();
ensure(!globalThis.__gptRProbeOnce.has(input.sessionId), 'This sample cannot be replayed.');
globalThis.__gptRProbeOnce.add(input.sessionId);
session.title = input.title;
const run = store.beginRun(session, input.prompt, false, config, { forceNewTask: true });
store.message(session, 'user', input.prompt);
session.providerMessages.push({ role: 'user', content: input.prompt });
const step = store.beginStep(session, run), planner = runtime.requestPlanner();
let plan, response, diagnostic = null, requestEvent, receipts = 0, wireStarts = 0;
const wireIds = new Set();
const signal = AbortSignal.timeout(320000);
let stopReason = 'identity_probe_complete';
try {
plan = planner.prepare(session, run, config, { system: 'This is a connection identity preflight. Reply to the user exactly. No tools are available. Do not perform any project work.', tools: [], stepId: step.id });
const variants = plan.body.kind === 'model-route-plan' ? plan.body.variants.map(v => v.body) : [plan.body];
ensure(variants.length === 1 && variants.every(b => !(b.tools?.length) && b.max_tokens === 256 && b.model === input.model), 'Wire request violates no-tool contract.');
ensure(plan.record.tokenReservation.reservedTokens <= 16000, 'Reservation exceeds sealed budget.');
const progress = event => {
if (event.consumption) {
receipts += Number(store.recordConsumption(session, run, { ...event.consumption, requestId: plan.record.id }, plan.record.tokenReservation.reservedTokens));
return;
}
if (event.phase === 'running' && event.wireAttemptId) { wireIds.add(event.wireAttemptId); wireStarts = wireIds.size; ensure(wireStarts === 1, 'No retries permitted.'); }
requestEvent ??= store.event(session, { kind: 'model', source: 'model_connection', label: 'R · GPT单次身份预检(无工具)', phase: 'running', runId: run.id, contextPlanId: plan.record.id, startedAt: new Date().toISOString() });
if (event.modelAttemptId) requestEvent.modelAttemptId = event.modelAttemptId;
if (event.connectionId) requestEvent.connectionId = event.connectionId;
if (event.model) requestEvent.actualModel = event.model;
if (event.modelIdentity) requestEvent.modelIdentity = event.modelIdentity;
if (event.requestUrl) requestEvent.requestUrl = event.requestUrl;
if (event.diagnostic) requestEvent.diagnostic = event.diagnostic;
if (event.stream) requestEvent.stream = event.stream;
if (event.phase) requestEvent.phase = event.phase;
plan.record.requestAttempts = wireStarts; step.modelAttempts = wireStarts;
store.save(session);
};
response = await provider.complete(config, plan.messages, project, signal, progress, plan.record, [], { attempts: 1, maxBudgetAttempts: 1 });
ensure(!response.message.tool_calls?.length, 'Unsolicited tools are never executed.');
ensure(receipts === 1, 'Expected one original consumption receipt.');
planner.finish(session, plan.record, { response, attempts: wireStarts });
session.providerMessages.push(response.message); store.message(session, 'assistant', response.message.content);
const total = (run.usage?.reportedTokens ?? run.usage?.totalTokens ?? 0);
session.status = total > 16000 ? 'paused' : 'completed';
if (total > 16000) stopReason = 'task_token_limit';
} catch (cause) {
diagnostic = cause.diagnostic ?? { source: 'workbench', origin: 'local', stage: 'identity_preflight', kind: signal.aborted ? 'cancelled' : 'runtime', title: '身份预检需要核对', message: provider.redact(cause.message), occurredAt: new Date().toISOString() };
session.status = diagnostic.kind === 'model_identity' || signal.aborted ? 'paused' : 'failed';
stopReason = diagnostic.kind;
session.lastFailure = { ...diagnostic, runId: run.id };
const message = store.message(session, 'system', diagnostic.message);
session.failure = { ...session.lastFailure, messageId: message.id };
if (plan) planner.finish(session, plan.record, { error: new Error(diagnostic.message), attempts: wireStarts });
} finally {
if (requestEvent) { requestEvent.phase = diagnostic ? 'failed' : 'completed'; requestEvent.finishedAt = new Date().toISOString(); if (diagnostic) requestEvent.diagnostic = diagnostic; }
store.finishStep(session, step, diagnostic ? 'failed' : 'completed');
store.finishRun(session, run, stopReason);
}
const attempts = hub.attempts.filter(a => a.sessionId === session.id);
ensure(attempts.length <= 1 && wireStarts <= 1, 'Single-request limit exceeded.');
return { sessionId: session.id, projectId: project.id, taskId: run.taskId, runId: run.id, status: session.status,
stopReason, attempts: attempts.length, receipts, wireStarts, actualTools: run.toolCalls, usage: run.usage,
contextPlanId: plan?.record.id ?? null, diagnostic, message: response?.message ?? null };
}
@@ -0,0 +1,40 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { root, save, original, client, meta, connectionId } from './live-delivery-r-common.mjs';
import { inspectorClosed } from './live-delivery-r-inspector.mjs';
const read = name => JSON.parse(fs.readFileSync(path.join(root, name)));
const before = read('preflight/before.json'), after = read('preflight/after.json');
const owned = read('preflight/owned.json'), outcome = read('preflight/result.json');
assert.equal(outcome.passed, true);
assert.equal(after.pid, before.pid); assert.equal(after.pid, 36552); assert.equal(after.version, '1.24.6');
assert.equal(after.configSha256, before.configSha256); assert.deepEqual(after.active, []);
for (const item of before.exports) assert.deepEqual(after.exports.find(value => value.id === item.id), item);
const tables = ['sessions', 'records', 'events', 'outbox'];
for (const table of tables) {
assert.equal(after.database.tables[table].schemaSha256, before.database.tables[table].schemaSha256);
const rows = new Map(after.database.tables[table].rows.map(row => [row.id, row]));
for (const row of before.database.tables[table].rows) assert.deepEqual(rows.get(row.id), row, table + '/' + row.id);
}
const rows = new Map(after.database.tables.metadata.rows.map(row => [row.id, row]));
for (const row of before.database.tables.metadata.rows.filter(row => row.id !== 'modelAttempts')) assert.deepEqual(rows.get(row.id), row, row.id);
const artifacts = new Map(after.persistent.artifacts.map(row => [row.path, row]));
for (const row of before.persistent.artifacts) assert.deepEqual(artifacts.get(row.path), row);
assert.deepEqual(after.modelCenter.selected, before.modelCenter.selected); assert.deepEqual(after.modelCenter.pools, before.modelCenter.pools);
for (const item of before.modelCenter.connections) {
const next = after.modelCenter.connections.find(row => row.id === item.id);
if (item.id === connectionId) { const health = next.health; assert.ok(health); assert.deepEqual({ ...next, health: item.health }, item); }
else assert.deepEqual(next, item);
}
for (const item of read('preflight/original-attempts.json')) assert.deepEqual(meta('modelAttempts').find(row => row.id === item.id), item);
const { boot, close } = await client();
try {
assert.deepEqual(boot.config, original.config);
assert.deepEqual(boot.projects.filter(row => row.id !== owned.project.id), original.projects);
const closed = await inspectorClosed();
const result = { passed: true, pid: after.pid, version: after.version, originalExports: before.exports.length,
originalArtifacts: before.persistent.artifacts.length, originalRowsExact: tables, otherMetadataExceptAppendedAttemptsExact: true,
originalPublicProjectsExact: true, originalConfigRegistryAndPoolExact: true, observedConnectionHealthChange: true,
inspectorClosed: closed, noKeyReadOrResaved: true, ownedProjectId: owned.project.id, ownedSessionId: owned.session.id };
save('preflight/restoration.json', result); console.log(JSON.stringify(result));
} finally { await close(); }
@@ -0,0 +1,68 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { randomUUID } from 'node:crypto';
import { publicSnapshot, hash } from './desktop-f-state.mjs';
import { invokeGptProbe, inspectorClosed } from './live-delivery-r-inspector.mjs';
import { root, origin, dataRoot, connectionId, save, meta, client, captureAttempts } from './live-delivery-r-common.mjs';
assert.equal(fs.existsSync(path.join(root, 'preflight')), false, 'Never replay or overwrite a real sample.');
const { api, boot, close } = await client();
let fatal;
try {
await inspectorClosed();
assert.equal(boot.version, '1.24.6');
const host = await api('/host/status'); assert.equal(host.identity.pid, 36552); assert.equal(host.activity.active, false);
const before = await publicSnapshot(origin, dataRoot); save('preflight/before.json', before);
assert.deepEqual(before.active, []);
const connection = before.modelCenter.connections.find(value => value.id === connectionId);
assert.equal(connection.enabled, true); assert.equal(connection.hasKey, true); assert.equal(connection.credentialRevision, 1);
assert.equal(connection.protocol, 'chat-completions'); assert.equal(connection.model, 'gpt-6.1-sol'); assert.equal(connection.revision, 5);
assert.equal(connection.contextLimit, 16000); assert.equal(connection.modelIdentityPolicy ?? 'record', 'record');
const originalAttempts = meta('modelAttempts'); save('preflight/original-attempts.json', originalAttempts);
const nonce = randomUUID(), prompt = `这是独立GPT连接身份预检,不是工程任务。只回复 OK ${nonce},不要调用工具、读写文件或执行命令。`;
save('preflight/contract.json', { kind: 'single-real-GPT-identity-preflight', connectionId, connection,
version: boot.version, runtimeRoot: boot.runtimeRoot, maxRequests: 1, maxAttempts: 1, maxOutputTokens: 256,
maxTokens: 16000, contextLimit: 16000, toolDefinitions: 0, toolExecution: 0,
poolSwitching: false, automaticReplay: false, modelIdentityPolicy: 'require-match in this experiment snapshot only',
noGlobalConfigurationWrite: true, noCredentialExtractionOrResave: true, prompt, nonce,
originalBaselineSha256: hash(fs.readFileSync(path.join(root, 'preflight/before.json'))) });
const projectRoot = path.join(root, 'preflight/identity-only'); fs.mkdirSync(projectRoot);
fs.writeFileSync(path.join(projectRoot, 'README.md'), '# R GPT identity preflight\nNo engineering or command execution.\n', { flag: 'wx' });
const project = await api('/projects', { root: projectRoot });
const session = await api('/sessions', { projectId: project.id }); save('preflight/owned.json', { project, session });
const input = { pid: host.identity.pid, port: 4318, runtimeRoot: boot.runtimeRoot, sessionId: session.id, projectId: project.id,
connectionId, connectionRevision: connection.revision, credentialRevision: connection.credentialRevision,
baseUrl: connection.baseUrl, model: connection.model, title: 'R · jojocode GPT连接单次预检', prompt };
save('preflight/input.json', input);
console.log(JSON.stringify({ stage: 'single-GPT-preflight', connectionId, model: connection.model, requestUrl: connection.baseUrl + '/chat/completions', maxRequests: 1, toolDefinitions: 0 }));
const invoked = await invokeGptProbe(input); save('preflight/expression.js', invoked.expression); save('preflight/host-result.json', invoked.result);
const previous = new Set(originalAttempts.map(value => value.id));
const attempts = meta('modelAttempts').filter(value => !previous.has(value.id)); save('preflight/attempts.json', attempts);
assert.ok(attempts.length <= 1); for (const attempt of attempts) { assert.equal(attempt.sessionId, session.id); assert.equal(attempt.connectionId, connectionId); assert.equal(attempt.poolId, null); }
const state = await api('/sessions/' + session.id); save('preflight/session.json', state);
save('preflight/export.json', await api('/sessions/' + session.id + '/export'));
const captures = await captureAttempts(api, attempts, 'preflight/captures');
const attempt = attempts[0];
const passed = attempts.length === 1 && attempt.status === 'completed' && attempt.modelIdentity?.status === 'matched'
&& attempt.modelIdentity.complete === true && attempt.modelIdentity.policy === 'require-match' && attempt.responseRedacted === false
&& attempt.usageStatus === 'reported' && attempt.usage.total_tokens <= 16000 && captures.length === 2
&& invoked.result.actualTools === 0 && state.status === 'completed' && invoked.result.message?.content?.includes(nonce);
const result = { passed, engineeringTestAllowed: passed, testedAt: new Date().toISOString(), version: boot.version,
connectionId, sessionId: session.id, projectId: project.id, taskId: invoked.result.taskId,
requestedModel: connection.model, reportedModels: attempt?.modelIdentity?.reportedModels ?? [], identity: attempt?.modelIdentity,
requestUrl: attempt?.requestUrl, requests: attempts.length, usage: attempt?.usage ?? null, usageStatus: attempt?.usageStatus ?? 'not_dispatched',
actualTools: invoked.result.actualTools, stopReason: invoked.result.stopReason, captures,
noRetryOrPoolSwitch: attempts.every(value => value.ordinal === 1 && value.poolId === null),
modelWeightsAuthenticated: false, engineeringDeliveryTested: false, purgeBenefitTested: false,
defaultSelectionChanged: false, connectionConfigChanged: false, credentialValuesReadOrSaved: false };
save('preflight/result.json', result); console.log(JSON.stringify({ passed, requests: result.requests, usage: result.usage, reportedModels: result.reportedModels, stopReason: result.stopReason }));
} catch (error) {
fatal = { name: error.name, message: error.message, stack: error.stack, recordedAt: new Date().toISOString(), automaticReplay: false };
save('preflight/driver-error.json', fatal); process.exitCode = 1;
} finally {
save('preflight/after.json', await publicSnapshot(origin, dataRoot));
save('preflight/inspector-final.json', { closed: await inspectorClosed() });
await close();
}
if (fatal) console.error(fatal.message);
@@ -0,0 +1,15 @@
import fs from 'node:fs';
import assert from 'node:assert/strict';
const once = (value, from, to) => { assert.equal(value.split(from).length, 2, from); return value.replace(from, to); };
const names = ['initial', 'common', 'payload', 'inspector', 'preflight', 'preflight-audit', 'node'];
for (const name of names) {
let value = fs.readFileSync('.qa/live-delivery-p-' + name + '.mjs', 'utf8')
.replaceAll('live-delivery-p', 'live-delivery-r').replaceAll('__gptPProbeOnce', '__gptRProbeOnce')
.replaceAll('1.24.5', '1.24.6').replaceAll('P GPT', 'R GPT').replaceAll('P · ', 'R · ');
if (['initial', 'preflight', 'node'].includes(name)) value = once(value, 'assert.equal(connection.revision, 3);', 'assert.equal(connection.revision, 5);');
if (name === 'initial') value = once(value, 'fs.mkdirSync(root);',
"assert.deepEqual(center.selected, { type: 'pool', id: '68e30376-b799-445b-a858-db2dba9920a0' });\nfs.mkdirSync(root);");
if (name === 'common') value = once(value, "['config', 'modelRegistry', 'modelAttempts']", "['config', 'modelRegistry', 'modelAttempts', 'modelNetworkDiagnostics']");
fs.writeFileSync('.qa/live-delivery-r-' + name + '.mjs', value, { flag: 'wx' });
}
console.log(JSON.stringify({ prepared: names, modelRequests: 0, previousDriversUnchanged: true }));
@@ -0,0 +1,153 @@
{
"schemaVersion": 1,
"kind": "bounded-live-delivery-r-contract",
"frozenAt": "2026-11-03T16:00:29.525Z",
"sourceBaseCommit": "8cf152e3ab574ba25f9c48564494a7b3e029cb18",
"branch": "test/live-delivery-r",
"planSha256": "dfba801d07a9be81f68af43cdf5662575fb5e8af501f39d24678e75b1393c7d3",
"originalBaselineSha256": "93f7bd556b1c85ade21124477ba6bdd592e48e0bdc4d126ebfff5f2c4ff7130a",
"releaseVersion": "1.24.6",
"releaseSourceCommit": "54dbe3d6fc7b068e37010222a09cff244975b2c0",
"releaseIdentitySha256": "75ebae8ef9811f2306298e223167f93632d8f9d2bc99d3de86f27647381525be",
"host": {
"pid": 36552,
"runtimeRoot": "C:\\Users\\wangy\\AppData\\Local\\Programs\\AgentWorkbench\\versions\\Agent-Workbench-1.24.6-win-x64-20261103151145294",
"runtimeIdentity": "2c662dee28c0c61b57e2f77dbb546667af7b6938aaf848e5a6facde973cad2e1"
},
"originalProjects": 61,
"originalSessions": 77,
"originalArtifacts": 3610,
"originalAttemptsRow": {
"id": "modelAttempts",
"sha256": "ff16d081e79d5e6903a3618403b314de9efe81fdb9f4323db50746d8459f0642"
},
"dependencySources": [
{
"path": "src/core/git-process.mjs",
"sha256": "80547ec8928610ac4df5a05c5aef12d1aab0dca9e7b1def2773fc745f5adf5f5"
},
{
"path": "src/core/desktop/install-manager.mjs",
"sha256": "91c216537666f690122071a5b53b7c8b3beba4ea549acd1534edca24390d9635"
},
{
"path": "benchmarks/live-delivery-v1/node/src/amount.mjs",
"sha256": "84cb647328ec52dad27d288f3a6127ff3e1ad87274ae2d227ad44daa49cbb2ed"
},
{
"path": "benchmarks/live-delivery-v1/node/src/summary.mjs",
"sha256": "48829850c11ca0cd0ab5e86bbac69a0c5f90297292168c1ba6dc338e2eae6ee7"
},
{
"path": "benchmarks/live-delivery-v1/node/src/report.mjs",
"sha256": "ba0a014e6e9df710d66e255a3a6f970f4e1c8af48accc81f33627029dcded7c0"
},
{
"path": "benchmarks/live-delivery-v1/node/test/expense.test.mjs",
"sha256": "0bcda551dbaeafad9a6e3df8024492ab67d7c09956f4676c393b78249ab44839"
},
{
"path": "benchmarks/live-delivery-v1/node/package.json",
"sha256": "6ad63026b2fe9de7513a4f6704c372a86108ee3d018a1f04883dc0a409ea4c24"
},
{
"path": "benchmarks/live-delivery-v1/node/scripts/build.mjs",
"sha256": "7279bc7c707c0f3ccbae63b14f0abed248ad3755be14f9e37128124ae9267526"
}
],
"previousDriverHashes": [
{
"path": ".qa/live-delivery-p-initial.mjs",
"sha256": "fa69d5dcfe74524fe84ed896b85ab16c7561480f56bd159b5fbc93d6bdd6fc62"
},
{
"path": ".qa/live-delivery-p-common.mjs",
"sha256": "653ddc37c32aabfa68ee675f661085e4fa8ec7e9bcd6498a5182b17024c63611"
},
{
"path": ".qa/live-delivery-p-payload.mjs",
"sha256": "17dc662692bd95a37d07c6b573c38d464fa834aaaa1d0ac2d7b7f4b52900f26f"
},
{
"path": ".qa/live-delivery-p-inspector.mjs",
"sha256": "7735cebbdb4302de5199b754f4ddcb6517e9e9f6b49905602b6d80393d021c54"
},
{
"path": ".qa/live-delivery-p-preflight.mjs",
"sha256": "429d39fae981eb8211c02d971bafe56c7ba7b69e3011f310ddf308ea26ea067c"
},
{
"path": ".qa/live-delivery-p-preflight-audit.mjs",
"sha256": "f1c5b27519f0f3ad821650780de840bf0fb23df662ccc57fe8686f78cd187269"
},
{
"path": ".qa/live-delivery-p-node.mjs",
"sha256": "85bd84617ac2be7e7bdfcc98cc75dea529048a5634d573d69cc7c5ed4f9bcda4"
}
],
"maxNetworkJobs": 1,
"maxPreflightRequests": 1,
"maxNodeRequests": 8,
"maxNodeTokens": 90000,
"contextLimit": 16000,
"maxOutputTokens": 2048,
"modelRequestsAtFreeze": 0,
"noKeyValuesReadOrSaved": true,
"files": [
{
"path": "drivers/desktop-f-state.mjs.txt",
"bytes": 5932,
"sha256": "6cf41ebd2ce55fe6fe3175948e9b964fac99975aca3132420a83b1d122e08b0b"
},
{
"path": "drivers/freeze-live-delivery-r.mjs.txt",
"bytes": 3654,
"sha256": "486503874a89ef20504ef0038a95558475fbc081d8c4b0ad4986a054608fed7d"
},
{
"path": "drivers/live-delivery-r-common.mjs.txt",
"bytes": 3084,
"sha256": "c8ccf89f552ac69668e964a47c56be5e38276e9f239c3729c93de58220e9ed39"
},
{
"path": "drivers/live-delivery-r-initial.mjs.txt",
"bytes": 2150,
"sha256": "c77932a3284de2cf43a85a95b95756867da74dfc5f16f36e642c968a39916a74"
},
{
"path": "drivers/live-delivery-r-inspector.mjs.txt",
"bytes": 3329,
"sha256": "3306efc0651cae2a887ab944a6faed83332b2103a0aa3bf7cc56683c0c5abfe0"
},
{
"path": "drivers/live-delivery-r-network.mjs.txt",
"bytes": 4799,
"sha256": "518c38942629eed0ac671bbe9541e968ef6b8713a59acb62a91d979dfb8232a7"
},
{
"path": "drivers/live-delivery-r-node.mjs.txt",
"bytes": 23935,
"sha256": "014d153e0253182ace91105d19d1b2c78786aaa6de3f9630d97d242da84c1e86"
},
{
"path": "drivers/live-delivery-r-payload.mjs.txt",
"bytes": 7367,
"sha256": "fb2b5a6818cb229512823002aa090b95641cc404a6423190e1cb7194c34ecbd9"
},
{
"path": "drivers/live-delivery-r-preflight-audit.mjs.txt",
"bytes": 3090,
"sha256": "938f92e7a2f5af357a54680ecd4a14f0e1c8798c1fc6f1b0a8f4561166e47f7e"
},
{
"path": "drivers/live-delivery-r-preflight.mjs.txt",
"bytes": 6152,
"sha256": "ed1192b71fbc1af6554cb76117fa1330b5d05345a5db1b784c6a551b1c6bf8f8"
},
{
"path": "drivers/prepare-live-delivery-r.mjs.txt",
"bytes": 1299,
"sha256": "3109c4c992a82b1caad84ae0b949c1cdd04d2a9a327db4c12aef1ed5be6edab0"
}
]
}
@@ -0,0 +1,36 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { root, save, sha } from './live-delivery-r-common.mjs';
const read = relative => JSON.parse(fs.readFileSync(path.join(root, relative)));
const node = read('node/result.json'), session = read('node/session.json'), attempts = read('node/attempts.json');
const requests = attempts.map((attempt, index) => {
const request = node.captures.find(row => row.attemptId === attempt.id && row.kind === 'request');
const response = node.captures.find(row => row.attemptId === attempt.id && row.kind === 'response');
const originalRequest = fs.readFileSync(path.join(root, request.path));
const originalResponse = fs.readFileSync(path.join(root, response.path));
assert.equal(sha(originalRequest), attempt.requestSha256); assert.equal(sha(originalResponse), attempt.responseSha256);
const body = JSON.parse(originalRequest), raw = JSON.parse(originalResponse);
assert.deepEqual(raw.usage, attempt.usage);
return { ordinalInSample: index + 1, attemptId: attempt.id, requestId: attempt.requestId,
requestBytes: originalRequest.length, responseBytes: originalResponse.length, tools: body.tools?.length ?? 0,
messages: body.messages.map(row => ({ role: row.role, contentBytes: Buffer.byteLength(row.content ?? ''),
toolCallId: row.tool_call_id, toolNames: row.tool_calls?.map(call => call.function.name) })),
usage: raw.usage, identity: attempt.modelIdentity, responseMessage: raw.choices[0].message,
finishReason: raw.choices[0].finish_reason };
});
const result = { nodeSucceeded: node.success, stopReason: node.stopReason, requests,
contextPlans: session.execution.contextPlans.map(plan => ({ id: plan.id, status: plan.status, budget: plan.budget,
tokenReservation: plan.tokenReservation, requestAttempts: plan.requestAttempts, diagnostic: plan.diagnostic, usage: plan.usage })),
events: session.events.filter(row => row.kind === 'tool' || row.diagnostic || /budget|limit/.test(row.kind))
.map(row => ({ id: row.id, kind: row.kind, tool: row.tool, phase: row.phase, label: row.label, message: row.message, diagnostic: row.diagnostic })),
task: session.execution.task, run: session.execution.run,
checks: session.execution.checks, plans: session.execution.plans, taskPlans: session.execution.taskPlans,
changes: session.changes, approvals: node.approvals, applications: node.applications,
sourceAndGitUnchanged: read('node/git-final.json').diff === '',
scope: 'Offline original raw request/response, stored context plans, budget receipts and tool events. No model requests or host mutations.' };
save('analysis/original-review.json', result);
console.log(JSON.stringify({ requests: requests.map(row => ({ n: row.ordinalInSample, requestBytes: row.requestBytes,
usage: row.usage, finishReason: row.finishReason, response: row.responseMessage })),
contextPlans: result.contextPlans, run: result.run, checks: result.checks.map(job => ({ id: job.id, status: job.status, results: job.results })),
taskPlans: result.taskPlans, changes: result.changes, events: result.events }, null, 2));
@@ -0,0 +1,32 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { execFileSync } from 'node:child_process';
import { readMessageBudget } from '../src/core/context/read-budget.mjs';
import { root, save, sha } from './live-delivery-r-common.mjs';
const read = name => JSON.parse(fs.readFileSync(path.join(root, name)));
const session = read('node/session.json'), analysis = read('analysis/original-review.json');
const pause = session.execution.run.budgetPause;
assert.equal(pause.reason, 'token_limit'); assert.equal(pause.remainingTokens, 90000 - 72571);
assert.equal(pause.tokenReservation.reservedTokens, 29623); assert.ok(pause.tokenReservation.reservedTokens > pause.remainingTokens);
assert.ok(pause.requiredInputTokens <= pause.inputBudget);
assert.equal(pause.runUsage.requests, 6); assert.equal(pause.runUsage.unknownRequests, 0);
const pageSizing = session.execution.contextPlans.map((plan, index) => ({ request: index + 1,
readMessageBytes: readMessageBudget(plan, analysis.requests[index].responseMessage),
nextFixed: plan.nextReadFixedInputTokens, retention: plan.workingRetentionTokens,
assistantCalls: analysis.requests[index].responseMessage.tool_calls.length }));
assert.equal(pageSizing[2].readMessageBytes, 1024); assert.equal(pageSizing[4].readMessageBytes, 1024);
const sources = ['src/core/context/read-budget.mjs', 'src/core/context/request-plan.mjs', 'src/core/context/working-set.mjs',
'src/core/context/tool-feedback.mjs', 'src/server/provider.mjs', 'src/server/runtime.mjs',
'src/shared/contracts/model-request.mjs', 'src/shared/contracts/model-reservation.mjs'];
const inputs = [];
for (const file of sources) {
const bytes = fs.readFileSync(file), committed = execFileSync('git', ['show', '54dbe3d6fc7b068e37010222a09cff244975b2c0:' + file], { maxBuffer: 2 * 1024 * 1024, windowsHide: true });
assert.deepEqual(bytes, committed, 'Actual source bytes still equal the installed Q source identity.');
const relative = 'analysis/source-inputs/' + file + '.txt'; save(relative, bytes); inputs.push({ path: file, capturedPath: relative, sha256: sha(bytes), bytes: bytes.length });
}
save('analysis/budget-proof.json', { pause, pageSizing, sourceCommit: '54dbe3d6fc7b068e37010222a09cff244975b2c0', sourceInputs: inputs,
fileCoverage: { path: 'test/expense.test.mjs', totalCharacters: 2584, contiguousReturnedCharacters: 1271, ranges: [[0,473],[473,875],[875,1271]], missingCharacters: 1313 },
conclusion: 'The seventh send was rejected because the observed-route reservation 29623 exceeds remaining 17429, while local required input 12352 fits its context input budget. This is not a new context_limit or network failure. Tool paging used the 1024-byte floor; metadata reduced later effective pages to949. No budget or reservation guard was disabled.' });
console.log(JSON.stringify({ passed: true, localInputFits: true, nextReservation: pause.tokenReservation.reservedTokens,
remainingTokens: pause.remainingTokens, pageSizing, sourceFilesBoundToInstalledCommit: inputs.length, modelRequests: 0 }));
@@ -0,0 +1,31 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { DatabaseSync } from 'node:sqlite';
import { root, dataRoot, save, client, sha } from './live-delivery-r-common.mjs';
const read = name => JSON.parse(fs.readFileSync(path.join(root, name)));
const owners = ['preflight', 'node'].map(name => read(name + '/owned.json'));
const db = new DatabaseSync(path.join(dataRoot, 'workbench.sqlite'), { readOnly: true });
let artifacts;
try {
artifacts = owners.flatMap(owner => db.prepare("SELECT payload FROM records WHERE kind='artifact' AND session_id=?").all(owner.session.id).map(row => JSON.parse(row.payload)));
} finally { db.close(); }
assert.ok(artifacts.length > 0);
const { api, close } = await client(), index = [];
try {
for (const artifact of artifacts) {
const owner = owners.find(row => row.session.id === artifact.sessionId);
assert.ok(owner); assert.equal(artifact.projectId, owner.project.id);
let content = '', offset = 0, page;
do {
page = await api('/artifacts/' + artifact.id + '?session=' + artifact.sessionId + '&offset=' + offset + '&limit=16000');
assert.ok(page.content.length || !page.truncated); content += page.content; offset += page.content.length;
} while (page.truncated);
const bytes = Buffer.from(content, 'utf8'); assert.equal(sha(bytes), artifact.sha256); assert.equal(bytes.length, artifact.bytes);
const relative = 'analysis/artifacts/' + artifact.sessionId + '/' + artifact.id + '.txt'; save(relative, bytes);
index.push({ ...artifact, capturedPath: relative });
}
save('analysis/artifact-index.json', { artifacts: index, scope: 'Every owned artifact record, fetched read-only through the original API and checked against its original SHA and bytes; no old/user artifact contents exported.' });
console.log(JSON.stringify({ capturedOwnedArtifactRecords: index.length, uniqueByteHashes: new Set(index.map(row => row.sha256)).size,
bytes: index.reduce((sum,row) => sum + row.bytes, 0), modelRequests: 0, allHashesExact: true }));
} finally { await close(); }
@@ -0,0 +1,104 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { DatabaseSync } from 'node:sqlite';
import { execFileSync } from 'node:child_process';
import { publicSnapshot, databaseSnapshot, canonical, digest } from './desktop-f-state.mjs';
import { root, origin, dataRoot, original, connectionId, save, meta, client, sha } from './live-delivery-r-common.mjs';
import { inspectorClosed } from './live-delivery-r-inspector.mjs';
const read = name => JSON.parse(fs.readFileSync(path.join(root, name)));
const preflight = read('preflight/result.json'), nodeExists = fs.existsSync(path.join(root, 'node/result.json'));
const node = nodeExists ? read('node/result.json') : null;
const previous = read(nodeExists ? 'node/after.json' : 'preflight/after.json'), before = original.baseline;
const { api, boot, close } = await client();
try {
const host = await api('/host/status'); assert.equal(host.identity.pid, 36552); assert.equal(host.activity.active, false);
const existing = fs.existsSync(path.join(root, 'final/snapshot.json'));
const after = existing ? read('final/snapshot.json') : await publicSnapshot(origin, dataRoot);
if (!existing) save('final/snapshot.json', after);
assert.deepEqual(canonical(databaseSnapshot(dataRoot).tables), canonical(after.database.tables), 'Frozen final snapshot is still current.');
for (const field of ['pid', 'version', 'runtimeRoot', 'configSha256', 'projectsSha256', 'sessionsSha256', 'eventCursor']) assert.deepEqual(after[field], previous[field], field);
assert.deepEqual(canonical(after.database.tables), canonical(previous.database.tables));
assert.deepEqual(after.exports, previous.exports); assert.deepEqual(after.persistent, previous.persistent);
for (const item of before.exports) assert.deepEqual(after.exports.find(value => value.id === item.id), item);
for (const [table, originalTable] of Object.entries(before.database.tables)) assert.equal(after.database.tables[table].schemaSha256, originalTable.schemaSha256, table + ' schema');
for (const table of ['sessions', 'records', 'events', 'outbox']) {
const rows = new Map(after.database.tables[table].rows.map(row => [row.id, row]));
for (const item of before.database.tables[table].rows) assert.deepEqual(rows.get(item.id), item, table + '/' + item.id);
}
const beforeRows = new Map(before.database.tables.metadata.rows.map(row => [row.id, row]));
const finalRows = new Map(after.database.tables.metadata.rows.map(row => [row.id, row]));
for (const [id, row] of beforeRows) if (!['config', 'modelRegistry', 'modelAttempts'].includes(id)) assert.deepEqual(finalRows.get(id), row);
const network = read('network/after.json');
assert.deepEqual(finalRows.get('modelNetworkDiagnostics'), network.database.tables.metadata.rows.find(row => row.id === 'modelNetworkDiagnostics'));
assert.deepEqual([...finalRows.keys()].filter(id => !beforeRows.has(id)), ['modelNetworkDiagnostics']);
const artifacts = new Map(after.persistent.artifacts.map(row => [row.path, row]));
for (const row of before.persistent.artifacts) assert.deepEqual(artifacts.get(row.path), row);
const initialCenter = original.center, center = after.modelCenter;
assert.deepEqual(center.selected, initialCenter.selected); assert.deepEqual(center.pools, initialCenter.pools);
const expectedConnection = initialCenter.connections.find(row => row.id === connectionId), actualConnection = center.connections.find(row => row.id === connectionId);
assert.equal(actualConnection.revision, expectedConnection.revision + (nodeExists ? 2 : 0));
assert.equal(actualConnection.credentialRevision, 1);
assert.deepEqual({ ...actualConnection, revision: expectedConnection.revision, updatedAt: expectedConnection.updatedAt,
health: expectedConnection.health, status: expectedConnection.status }, expectedConnection);
for (const item of initialCenter.connections.filter(row => row.id !== connectionId)) {
const next = center.connections.find(row => row.id === item.id);
if (item.id === 'legacy-default') {
assert.equal(item.revision, original.config.configRevision); assert.equal(next.revision, boot.config.configRevision);
assert.deepEqual({ ...next, revision: item.revision }, item);
} else assert.deepEqual(next, item);
}
assert.deepEqual({ ...boot.config, configRevision: original.config.configRevision }, original.config);
const owns = [read('preflight/owned.json'), ...(nodeExists ? [read('node/owned.json')] : [])];
const ownedProjects = owns.map(row => row.project.id), ownedSessions = owns.map(row => row.session.id);
assert.deepEqual(boot.projects.filter(row => !ownedProjects.includes(row.id)), original.projects);
assert.deepEqual(after.database.sessionIds.filter(id => !ownedSessions.includes(id)), before.database.sessionIds);
const db = new DatabaseSync(path.join(dataRoot, 'workbench.sqlite'), { readOnly: true });
try {
const projectRows = new Map(db.prepare('SELECT * FROM projects').all().map(row => [row.id, row]));
for (const row of before.database.tables.projects.rows) assert.equal(digest({ ...projectRows.get(row.id), position: projectRows.get(row.id).position - ownedProjects.length }), row.sha256, 'Original raw project except declared insertion offset: ' + row.id);
for (const table of ['sessions', 'records', 'events']) {
const ids = new Set(before.database.tables[table].rows.map(row => row.id));
const rows = db.prepare('SELECT * FROM ' + table).all().filter(row => !ids.has(row.id));
assert.ok(rows.every(row => ownedProjects.includes(row.project_id) && (table === 'sessions' ? ownedSessions.includes(row.id) : ownedSessions.includes(row.session_id))), 'Every new ' + table + ' row belongs only to this experiment.');
}
const sequence = db.prepare("SELECT seq FROM sqlite_sequence WHERE name='events'").get().seq;
assert.equal(sequence, db.prepare('SELECT MAX(seq) AS seq FROM events').get().seq);
const oldOutbox = new Set(before.database.tables.outbox.rows.map(row => row.id));
for (const row of db.prepare('SELECT o.*,e.session_id FROM outbox o JOIN events e ON e.seq=o.seq').all()) if (!oldOutbox.has(row.seq)) assert.ok(ownedSessions.includes(row.session_id));
} finally { db.close(); }
const attempts = meta('modelAttempts'), oldAttempts = read('preflight/original-attempts.json');
for (const item of oldAttempts) assert.deepEqual(attempts.find(row => row.id === item.id), item);
const added = attempts.filter(row => !oldAttempts.some(old => old.id === row.id));
const expectedAttempts = [...read('preflight/attempts.json'), ...(nodeExists ? read('node/attempts.json') : [])];
assert.deepEqual(added, expectedAttempts); assert.ok(added.every(row => ownedSessions.includes(row.sessionId)));
const reportedTokens = added.reduce((sum, row) => sum + (row.usage?.total_tokens ?? 0), 0);
const unknownRequests = added.filter(row => row.usageStatus === 'unknown').length;
assert.equal(reportedTokens, (preflight.usage?.total_tokens ?? 0) + (node?.usage?.reportedTokens ?? node?.usage?.totalTokens ?? 0));
assert.equal(unknownRequests, node?.usage?.unknownRequests ?? 0);
const sourceChanged = execFileSync('git', ['diff', 'ea82bde3', '--name-only', '--', 'src', 'package.json', 'package-lock.json'], { encoding: 'utf8', windowsHide: true }).trim();
assert.equal(sourceChanged, '');
const contract = JSON.parse(fs.readFileSync('docs/live-delivery-r-contract/manifest.json'));
for (const row of contract.files) assert.equal(sha(fs.readFileSync(path.join('docs/live-delivery-r-contract', row.path))), row.sha256);
for (const row of contract.previousDriverHashes) assert.equal(sha(fs.readFileSync(row.path)), row.sha256);
assert.equal(sha(fs.readFileSync(path.join(root, 'current.json'))), contract.originalBaselineSha256);
const result = { passed: true, pid: after.pid, version: after.version, runtimeRoot: after.runtimeRoot,
originalProjects: original.projects.length, originalSessions: before.exports.length, originalArtifacts: before.persistent.artifacts.length,
originalAttempts: oldAttempts.length, finalProjects: after.projects, finalSessions: after.exports.length,
finalArtifacts: after.persistent.artifacts.length, finalCounts: Object.fromEntries(Object.entries(after.database.tables).map(([name, table]) => [name, table.count])),
ownedProjects, ownedSessions, addedAttempts: added.length, originalRowsExportsAndArtifactsExact: true,
originalRawProjectRowsExceptOwnedInsertionOffsetExact: true, ownedProjectInsertionOffset: ownedProjects.length,
allAppendedRowsBelongToOwnedSamples: true, originalPublicProjectsExact: true, originalAttemptsExact: true,
originalBudgetsSelectionAndPoolRestored: true, connectionRevision: [expectedConnection.revision, actualConnection.revision], credentialRevision: 1,
observedHealthAndStatusExcludedFromConfigurationEquality: true,
legacyDisplayRevisionFollowsGlobalConfigurationRevision: [original.config.configRevision, boot.config.configRevision],
diagnosticHistoryOnlyNewMetadata: true, diagnosticJobIds: meta('modelNetworkDiagnostics').map(row => row.id),
inspectorClosed: await inspectorClosed(), modelRequests: added.length, reportedTokens, unknownRequests,
estimatedUnknownTokens: node?.usage?.estimatedUnknownTokens ?? 0, nodeDelivered: node?.success ?? false,
preflightPassed: preflight.passed, exactSinceLastRestoration: true, previousDriversUnchanged: true,
purgeBenefitTested: false, keyReadOrResaved: false, productSourceChanged: false };
save('final/result.json', result); console.log(JSON.stringify(result));
} catch (error) {
save('final/audit-error-' + Date.now() + '.json', { name: error.name, message: error.message, stack: error.stack, automaticReplay: false });
throw error;
} finally { await close(); }
@@ -0,0 +1,35 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { DatabaseSync } from 'node:sqlite';
import { databaseSnapshot, canonical, digest } from './desktop-f-state.mjs';
import { root, dataRoot, original, save } from './live-delivery-r-common.mjs';
const final = JSON.parse(fs.readFileSync(path.join(root, 'final/result.json')));
const snapshot = JSON.parse(fs.readFileSync(path.join(root, 'final/snapshot.json')));
assert.deepEqual(canonical(databaseSnapshot(dataRoot).tables), canonical(snapshot.database.tables));
const db = new DatabaseSync(path.join(dataRoot, 'workbench.sqlite'), { readOnly: true });
try {
const additions = {};
for (const table of ['sessions', 'records', 'events']) {
const originalIds = new Set(original.baseline.database.tables[table].rows.map(row => row.id));
additions[table] = db.prepare('SELECT * FROM ' + table).all().filter(row => !originalIds.has(row.id)).map(row => ({
id: row.id, ...(row.kind ? { kind: row.kind } : {}), projectId: row.project_id,
sessionId: table === 'sessions' ? row.id : row.session_id, sha256: digest(row) }));
assert.ok(additions[table].every(row => final.ownedProjects.includes(row.projectId) && final.ownedSessions.includes(row.sessionId)));
}
const originalOutbox = new Set(original.baseline.database.tables.outbox.rows.map(row => row.id));
additions.outbox = db.prepare('SELECT o.seq,o.published_at,e.session_id FROM outbox o JOIN events e ON e.seq=o.seq').all()
.filter(row => !originalOutbox.has(row.seq)).map(row => ({ id: row.seq, sessionId: row.session_id, sha256: digest({ seq: row.seq, published_at: row.published_at }) }));
assert.ok(additions.outbox.every(row => final.ownedSessions.includes(row.sessionId)));
const originalProjects = new Map(original.baseline.database.tables.projects.rows.map(row => [row.id, row]));
const projects = db.prepare('SELECT * FROM projects').all().map(row => ({ id: row.id, position: row.position, actualSha256: digest(row),
...(originalProjects.has(row.id) ? { originalSha256: originalProjects.get(row.id).sha256,
normalizedSha256: digest({ ...row, position: row.position - final.ownedProjectInsertionOffset }) } : { owned: true }) }));
assert.ok(projects.filter(row => row.originalSha256).every(row => row.normalizedSha256 === row.originalSha256));
const result = { additions, projects, projectInsertionOffset: final.ownedProjectInsertionOffset,
sequence: db.prepare("SELECT seq FROM sqlite_sequence WHERE name='events'").get().seq,
scope: 'Only IDs, owner fields and full-row hashes of additions; original project payloads are not exported. No key or user content returned.' };
save('final/ownership-proof.json', result);
console.log(JSON.stringify({ passed: true, additions: Object.fromEntries(Object.entries(additions).map(([name, rows]) => [name, rows.length])),
originalProjectsNormalizedExact: projects.filter(row => row.originalSha256).length, ownedProjects: projects.filter(row => row.owned).length }));
} finally { db.close(); }
@@ -0,0 +1,30 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { root, save, sha } from './live-delivery-r-common.mjs';
const read = name => JSON.parse(fs.readFileSync(path.join(root, name)));
const index = read('analysis/artifact-index.json').artifacts, analysis = read('analysis/original-review.json'), session = read('node/session.json');
const pages = [];
for (const artifact of index.filter(row => row.kind === 'tool-result')) {
const bytes = fs.readFileSync(path.join(root, artifact.capturedPath)); assert.equal(sha(bytes), artifact.sha256);
const result = JSON.parse(bytes);
if (result.path && typeof result.content === 'string' || result.kind && typeof result.content === 'string') pages.push({ artifactId: artifact.id,
artifactSha256: artifact.sha256, ...result });
}
const run = session.execution.run;
const budgetNotice = session.messages.filter(row => row.role === 'system').map(row => row.content);
const result = { stopReason: run.stopReason, finalUsage: run.usage,
contextBudget: run.error?.contextBudget ?? session.lastFailure?.contextBudget ?? null,
budgetNotice, pages,
sizing: session.execution.contextPlans.map(plan => ({ id: plan.id, mandatoryInputTokens: plan.mandatoryInputTokens,
nextReadFixedInputTokens: plan.nextReadFixedInputTokens, workingRetentionTokens: plan.workingRetentionTokens,
inputBudget: plan.budget.inputBudget, estimatedInputTokens: plan.estimatedInputTokens,
requestBytes: plan.requestBytes, reservation: plan.tokenReservation.reservedTokens,
observedInputRatio: plan.tokenReservation.routes[0].inputRatio })),
upstreamUsage: analysis.requests.map(row => ({ n: row.ordinalInSample, localRequestBytes: row.requestBytes, ...row.usage })),
readCoverage: session.execution.task.readProgress,
observation: 'Read pages advanced; this is not the same-range retry/no-progress guard. Upstream usage is retained as reported, not replaced by local byte estimates. Reading throughput and wrapper selection need bounded offline reproduction before any product fix.' };
save('analysis/reading-review.json', result);
console.log(JSON.stringify({ stopReason: result.stopReason, budgetNotice, pages: pages.map(page => ({ artifactId: page.artifactId,
path: page.path, kind: page.kind, sourceArtifactId: page.artifact_id, offset: page.offset, next: page.next_offset,
total: page.total_characters, returned: page.returned_characters, maximumMessageBytes: page.maximum_message_bytes, budgetLimited: page.budget_limited, content: page.content })), sizing: result.sizing }, null, 2));
@@ -0,0 +1,42 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { execFileSync } from 'node:child_process';
import { createHash } from 'node:crypto';
const source = path.resolve('.qa/live-delivery-r'), target = path.resolve('docs/live-delivery-r-evidence');
assert.equal(fs.existsSync(target), false, 'Never overwrite sealed evidence.');
const read = name => JSON.parse(fs.readFileSync(path.join(source, name)));
assert.equal(read('preflight/result.json').passed, true); assert.equal(read('node/result.json').success, false);
assert.equal(read('final/result.json').passed, true); assert.equal(read('final/ownership-proof.json').projectInsertionOffset, 2);
const git = args => execFileSync('git', args, { encoding: 'utf8', windowsHide: true }).trim();
assert.equal(git(['diff', 'ea82bde3', '--name-only', '--', 'src', 'package.json', 'package-lock.json']), '');
fs.mkdirSync(target); const files = [], sha = bytes => createHash('sha256').update(bytes).digest('hex');
const copy = (file, relative) => {
const bytes = fs.readFileSync(file), destination = path.join(target, relative);
fs.mkdirSync(path.dirname(destination), { recursive: true }); fs.writeFileSync(destination, bytes, { flag: 'wx' });
files.push({ path: relative.replaceAll('\\', '/'), bytes: bytes.length, sha256: sha(bytes) });
};
const walk = (folder, prefix, relative = '') => {
for (const entry of fs.readdirSync(folder, { withFileTypes: true })) {
if (['expense-project', 'identity-only', '.git', 'node_modules'].includes(entry.name)) continue;
const name = path.posix.join(relative, entry.name), file = path.join(folder, entry.name); assert.equal(entry.isSymbolicLink(), false);
if (entry.isDirectory()) walk(file, prefix, name); else { assert.equal(entry.isFile(), true); copy(file, prefix + '/' + name); }
}
};
walk(source, 'run'); walk('docs/live-delivery-r-contract', 'contract');
for (const name of ['live-delivery-r-final-audit.mjs', 'live-delivery-r-analyze.mjs', 'live-delivery-r-capture-artifacts.mjs',
'live-delivery-r-reading-review.mjs', 'live-delivery-r-budget-proof.mjs', 'live-delivery-r-ownership-proof.mjs', 'seal-live-delivery-r.mjs']) copy(path.join('.qa', name), 'drivers/' + name + '.txt');
copy('docs/network-q-release-identity.json', 'provenance/release-1.24.6.json');
copy('docs/LIVE-DELIVERY-R-PLAN.md', 'provenance/frozen-plan.md');
copy('scripts/verify-live-delivery-r.mjs', 'drivers/verify-live-delivery-r.mjs.txt');
const release = JSON.parse(fs.readFileSync('docs/network-q-release-identity.json'));
const manifest = { schemaVersion: 1, kind: 'owned-live-delivery-r-evidence', createdAt: new Date().toISOString(),
version: '1.24.6', releaseSourceCommit: release.sourceCommit, experimentPlanCommit: git(['rev-parse', 'ea82bde3']),
experimentBaseCommit: git(['rev-parse', '8cf152e3']), branch: git(['branch', '--show-current']),
references: { initial: 'run/current.json', preflight: 'run/preflight/result.json', node: 'run/node/result.json',
final: 'run/final/result.json', network: 'run/network/job.json', ownership: 'run/final/ownership-proof.json',
reading: 'run/analysis/reading-review.json', budget: 'run/analysis/budget-proof.json', artifacts: 'run/analysis/artifact-index.json' },
note: 'One preflight passed; new Node paused before seventh send with 6 completed matched responses and no code change/delivery. Original source tests failed, baseline build passed. All original state and defaults preserved under declared owned insertions/revisions/health. No extra calls, product release or Purge benefit claim. Drivers are inert text; never replay.',
files: files.sort((a,b) => a.path.localeCompare(b.path)) };
fs.writeFileSync(path.join(target, 'manifest.json'), JSON.stringify(manifest, null, 2) + '\n', { flag: 'wx' });
console.log(JSON.stringify({ files: files.length, bytes: files.reduce((sum,row) => sum + row.bytes, 0), manifestSha256: sha(fs.readFileSync(path.join(target, 'manifest.json'))) }));
@@ -0,0 +1,187 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { createHash } from 'node:crypto';
import { execFileSync } from 'node:child_process';
const root = path.resolve('docs/live-delivery-r-evidence');
const sha = bytes => createHash('sha256').update(bytes).digest('hex');
const canonical = value => Array.isArray(value) ? value.map(canonical) : value && typeof value === 'object'
? Object.fromEntries(Object.keys(value).sort().map(key => [key, canonical(value[key])])) : value;
const digest = value => sha(JSON.stringify(canonical(value)));
const file = name => {
assert.equal(typeof name, 'string'); assert.ok(!/[\\\x00\r\n]/.test(name) && !name.split('/').includes('..'));
const target = path.resolve(root, name); assert.ok(target.startsWith(root + path.sep)); return target;
};
const read = name => JSON.parse(fs.readFileSync(file(name)));
const manifest = read('manifest.json'); assert.equal(manifest.kind, 'owned-live-delivery-r-evidence');
const names = new Set(); let totalBytes = 0;
for (const row of manifest.files) {
assert.ok(!names.has(row.path)); names.add(row.path);
const bytes = fs.readFileSync(file(row.path)); assert.equal(bytes.length, row.bytes); assert.equal(sha(bytes), row.sha256, row.path); totalBytes += bytes.length;
}
const list = (directory = root) => fs.readdirSync(directory, { withFileTypes: true }).flatMap(entry => {
assert.equal(entry.isSymbolicLink(), false); const target = path.join(directory, entry.name);
return entry.isDirectory() ? list(target) : [path.relative(root, target).replaceAll('\\','/')];
});
assert.deepEqual(list().sort(), ['manifest.json', ...names].sort());
const owned = name => { assert.ok(names.has(name)); return read(name); };
const initial = owned(manifest.references.initial), preflight = owned(manifest.references.preflight), node = owned(manifest.references.node);
const final = owned(manifest.references.final), network = owned(manifest.references.network), proof = owned(manifest.references.ownership);
const reading = owned(manifest.references.reading), budget = owned(manifest.references.budget), artifacts = owned(manifest.references.artifacts).artifacts;
const frozen = owned('contract/manifest.json'), connectionId = '5b4daed9-b2f7-4de0-b949-573eba70c7b3';
assert.equal(frozen.modelRequestsAtFreeze, 0); assert.equal(frozen.maxNodeRequests, 8); assert.equal(frozen.maxNodeTokens, 90000);
assert.equal(frozen.contextLimit, 16000); assert.equal(frozen.maxOutputTokens, 2048);
assert.equal(sha(fs.readFileSync(file('run/current.json'))), frozen.originalBaselineSha256);
assert.equal(sha(fs.readFileSync(file('provenance/frozen-plan.md'))), frozen.planSha256);
const gitBytes = (commit, relative) => execFileSync('git', ['show', commit + ':' + relative], { maxBuffer: 2 * 1024 * 1024, windowsHide: true });
for (const row of frozen.files) {
const bytes = fs.readFileSync(file('contract/' + row.path)); assert.equal(bytes.length, row.bytes); assert.equal(sha(bytes), row.sha256);
assert.deepEqual(bytes, gitBytes(manifest.experimentPlanCommit, 'docs/live-delivery-r-contract/' + row.path));
}
assert.deepEqual(fs.readFileSync(file('contract/manifest.json')), gitBytes(manifest.experimentPlanCommit, 'docs/live-delivery-r-contract/manifest.json'));
for (const row of frozen.dependencySources) assert.equal(sha(gitBytes(manifest.experimentBaseCommit, row.path)), row.sha256);
for (const row of budget.sourceInputs) {
const bytes = fs.readFileSync(file('run/' + row.capturedPath)); assert.equal(sha(bytes), row.sha256);
assert.deepEqual(bytes, gitBytes(manifest.releaseSourceCommit, row.path));
}
assert.equal(manifest.releaseSourceCommit, owned('provenance/release-1.24.6.json').sourceCommit);
assert.equal(network.connectionId, connectionId); assert.equal(network.connectionRevision, 5);
assert.equal(network.status, 'passed'); assert.equal(network.stages.dns.status, 'passed');
assert.deepEqual(network.trials.map(row => row.mode), ['auto','ipv4','ipv6']);
assert.ok(network.trials.every(row => row.status === 'passed' && row.certificateAuthorized === true));
assert.equal(network.httpRequests, 0); assert.equal(network.modelRequests, 0); assert.equal(network.credentialAccess, false);
assert.equal(network.route.kind, 'direct-endpoint-only'); assert.equal(network.route.modelApiRouteVerified, false);
assert.equal(owned('run/network/restoration.json').originalStateExactExceptNewDiagnosticHistory, true);
let totalRequests = 0, reportedTokens = 0;
const allAttempts = [];
for (const [folder, outcome, expectedCount] of [['preflight',preflight,1],['node',node,6]]) {
const attempts = owned('run/' + folder + '/attempts.json'); assert.equal(attempts.length, expectedCount);
allAttempts.push(...attempts); assert.equal(outcome.captures.length, expectedCount * 2);
for (const attempt of attempts) {
assert.equal(attempt.connectionId, connectionId); assert.equal(attempt.connectionRevision, folder === 'preflight' ? 5 : 6);
assert.equal(attempt.credentialRevision, 1); assert.equal(attempt.poolId, null); assert.equal(attempt.ordinal, 1);
assert.equal(attempt.model, 'gpt-6.1-sol'); assert.equal(attempt.protocol, 'chat-completions'); assert.equal(attempt.streaming, false);
assert.equal(attempt.requestUrl, 'https://jojocode.com/v1/chat/completions'); assert.equal(attempt.status, 'completed');
assert.equal(attempt.modelIdentity.policy, 'require-match'); assert.equal(attempt.modelIdentity.status, 'matched');
assert.equal(attempt.modelIdentity.complete, true); assert.deepEqual(attempt.modelIdentity.reportedModels, ['gpt-6.1-sol']);
assert.equal(attempt.usageStatus, 'reported'); assert.equal(attempt.responseRedacted, false);
const captures = Object.fromEntries(outcome.captures.filter(row => row.attemptId === attempt.id).map(row => [row.kind,row]));
const requestBytes = fs.readFileSync(file('run/' + captures.request.path)), responseBytes = fs.readFileSync(file('run/' + captures.response.path));
assert.equal(sha(requestBytes), attempt.requestSha256); assert.equal(sha(requestBytes), captures.request.sha256);
assert.equal(sha(responseBytes), attempt.responseSha256); assert.equal(sha(responseBytes), captures.response.sha256);
assert.equal(attempt.modelIdentity.responseSource.sha256, attempt.responseSha256); assert.equal(requestBytes.length, attempt.requestBytes);
const body = JSON.parse(requestBytes), raw = JSON.parse(responseBytes); assert.equal(body.model, 'gpt-6.1-sol'); assert.notEqual(body.stream,true);
assert.equal(raw.model, 'gpt-6.1-sol'); assert.deepEqual(raw.usage, attempt.usage);
assert.ok(raw.usage.completion_tokens <= body.max_tokens); reportedTokens += raw.usage.total_tokens; totalRequests++;
if (folder === 'preflight') {
assert.equal(body.tools?.length ?? 0, 0); assert.equal(body.max_tokens, 256); assert.equal(preflight.actualTools, 0); assert.equal(preflight.passed,true);
assert.equal(raw.choices[0].message.tool_calls?.length ?? 0, 0); assert.ok(raw.choices[0].message.content.includes(owned('run/preflight/contract.json').nonce));
assert.deepEqual(raw.usage, preflight.usage); assert.equal(raw.usage.total_tokens, 4492);
} else {
assert.equal(body.max_tokens,2048); assert.ok(body.tools.length > 0);
assert.deepEqual(body.messages.filter(row => row.role === 'user').map(row => row.content), [fs.readFileSync(file('run/node/goal.txt'),'utf8')]);
}
}
assert.equal(owned('run/' + folder + '/restoration.json').passed,true);
}
assert.equal(totalRequests,7); assert.equal(reportedTokens,77063); assert.equal(node.success,false); assert.equal(node.stopReason,'token_limit');
assert.equal(node.usage.requests,6); assert.equal(node.usage.totalTokens,72571); assert.equal(node.usage.unknownRequests,0);
assert.equal(node.usage.estimatedUnknownTokens,0); assert.deepEqual(node.applications,[]); assert.equal(node.modelImplementationSuppliedBySupervisor,false);
const session = owned('run/node/session.json'); assert.deepEqual(session.changes,[]); assert.equal(session.execution.run.toolCalls,12);
assert.equal(session.execution.checks.length,1); const checks=session.execution.checks[0]; assert.equal(checks.status,'failed');
assert.deepEqual(checks.results.find(row => row.name==='test').tests,{total:9,passed:0,failed:9,cancelled:0,skipped:0});
assert.equal(checks.results.find(row => row.name==='build').status,'passed'); assert.equal(node.approvals.length,1); assert.equal(node.approvals[0].allow,true);
assert.equal(node.approvals[0].command,'npm run test\nnpm run build');
assert.deepEqual(session.execution.run.budgetPause,budget.pause); assert.equal(budget.pause.remainingTokens,17429);
assert.equal(budget.pause.tokenReservation.reservedTokens,29623); assert.equal(budget.pause.requiredInputTokens,12352);
assert.ok(budget.pause.requiredInputTokens<=budget.pause.inputBudget); assert.ok(budget.pause.tokenReservation.reservedTokens>budget.pause.remainingTokens);
assert.equal(budget.pause.runBudget.maxTokens,90000); assert.equal(budget.pause.runBudget.maxSteps,8);
assert.equal(budget.pause.contextLimit,16000); assert.equal(budget.pause.safetyTokens,1600); assert.equal(budget.pause.outputReservation,2048);
for (const plan of session.execution.contextPlans) {
assert.ok(plan.estimatedInputTokens<=plan.budget.inputBudget);
assert.ok(plan.tokenReservation.reservedTokens<=Math.min(plan.budget.runRemainingTokens,plan.budget.taskRemainingTokens));
assert.equal(plan.requestAttempts,1);
}
const rawFourth=JSON.parse(fs.readFileSync(file('run/'+node.captures.filter(row=>row.kind==='response')[3].path)));
assert.equal(rawFourth.usage.prompt_tokens,27164); assert.equal(rawFourth.usage.prompt_tokens_details.cached_tokens,24192);
const testSource=fs.readFileSync(file('run/node/source-before/test/expense.test.mjs'),'utf8').replaceAll('\r\n','\n');
const filePages=reading.pages.filter(row=>row.path==='test/expense.test.mjs');
assert.deepEqual(filePages.map(row=>[row.offset,row.next_offset]),[[0,473],[473,875],[875,1271]]);
for(const row of filePages){assert.equal(row.content,testSource.slice(row.offset,row.next_offset));assert.equal(row.total_characters,2584);}
assert.equal(budget.fileCoverage.missingCharacters,1313); assert.equal(budget.pageSizing[2].readMessageBytes,1024);
const wrapper=reading.pages.find(row=>row.kind==='tool-result'&&row.artifact_id===filePages[0].artifactId);
assert.ok(wrapper); assert.equal(wrapper.next_offset,495); assert.equal(wrapper.total_characters,891);
const artifactMap=new Map(artifacts.map(row=>[row.id,row])); assert.equal(artifacts.length,61);
for(const artifact of artifacts){
assert.ok(final.ownedSessions.includes(artifact.sessionId)); assert.ok(final.ownedProjects.includes(artifact.projectId));
const bytes=fs.readFileSync(file('run/'+artifact.capturedPath)); assert.equal(sha(bytes),artifact.sha256); assert.equal(bytes.length,artifact.bytes);
}
for(const result of checks.results){const artifact=artifactMap.get(result.logArtifactId);assert.ok(artifact);assert.equal(artifact.kind,'check-log');}
const snapshot=owned('run/final/snapshot.json');
for(const item of initial.baseline.exports)assert.deepEqual(snapshot.exports.find(row=>row.id===item.id),item);
for(const table of ['sessions','records','events','outbox']){
const before=initial.baseline.database.tables[table],after=snapshot.database.tables[table];assert.equal(after.schemaSha256,before.schemaSha256);
const rows=new Map(after.rows.map(row=>[row.id,row]));for(const row of before.rows)assert.deepEqual(rows.get(row.id),row);
assert.equal(proof.additions[table].length,after.count-before.count);
for(const row of proof.additions[table]){
assert.ok(final.ownedSessions.includes(row.sessionId));if(row.projectId)assert.ok(final.ownedProjects.includes(row.projectId));
assert.equal(rows.get(row.id).sha256,row.sha256);
}
}
assert.equal(proof.additions.records.filter(row=>row.kind==='artifact').length,artifacts.length);
for(const artifact of artifacts)assert.ok(proof.additions.records.some(row=>row.kind==='artifact'&&row.id===artifact.id));
const originalProjectRows=new Map(initial.baseline.database.tables.projects.rows.map(row=>[row.id,row]));
const finalProjectRows=new Map(snapshot.database.tables.projects.rows.map(row=>[row.id,row]));
for(const row of proof.projects){
assert.equal(row.actualSha256,finalProjectRows.get(row.id).sha256);
if(row.originalSha256){assert.equal(row.originalSha256,originalProjectRows.get(row.id).sha256);assert.equal(row.normalizedSha256,row.originalSha256);}
else assert.ok(final.ownedProjects.includes(row.id));
}
assert.equal(proof.projects.filter(row=>row.originalSha256).length,61);
assert.equal(proof.projects.filter(row=>row.owned).length,2); assert.equal(proof.projectInsertionOffset,2);
const oldArtifactMap=new Map(initial.baseline.persistent.artifacts.map(row=>[row.path,row]));
const nextArtifactMap=new Map(snapshot.persistent.artifacts.map(row=>[row.path,row]));
for(const [name,row]of oldArtifactMap)assert.deepEqual(nextArtifactMap.get(name),row);
const newFiles=snapshot.persistent.artifacts.filter(row=>!oldArtifactMap.has(row.path));assert.equal(newFiles.length,50);
assert.ok(newFiles.every(row=>artifacts.some(artifact=>artifact.sha256===row.sha256&&artifact.bytes===row.bytes)));
assert.deepEqual(snapshot.modelCenter.selected,initial.center.selected);assert.deepEqual(snapshot.modelCenter.pools,initial.center.pools);
const beforeMeta=owned('run/node/original-public-metadata.json'),afterMeta=owned('run/node/final-public-metadata.json');
const finalMetadataRows=new Map(snapshot.database.tables.metadata.rows.map(row=>[row.id,row]));
const oldAttempts=owned('run/preflight/original-attempts.json');assert.equal(oldAttempts.length,209);
assert.deepEqual(owned('run/node/original-attempts.json'),[...oldAttempts,...owned('run/preflight/attempts.json')]);
assert.equal(finalMetadataRows.get('modelAttempts').sha256,digest({key:'modelAttempts',value:JSON.stringify([...oldAttempts,...allAttempts])}));
for(const [key,value]of [['config',afterMeta.config],['modelRegistry',afterMeta.registry]])assert.equal(finalMetadataRows.get(key).sha256,digest({key,value:JSON.stringify(value)}));
const rawNetwork={...network};delete rawNetwork.stale;delete rawNetwork.currentConnectionRevision;
assert.equal(finalMetadataRows.get('modelNetworkDiagnostics').sha256,digest({key:'modelNetworkDiagnostics',value:JSON.stringify([rawNetwork])}));
for(const row of initial.baseline.database.tables.metadata.rows)if(!['config','modelRegistry','modelAttempts'].includes(row.id))assert.deepEqual(finalMetadataRows.get(row.id),row);
assert.deepEqual([...finalMetadataRows.keys()].filter(key=>!initial.baseline.database.tables.metadata.rows.some(row=>row.id===key)),['modelNetworkDiagnostics']);
assert.deepEqual({...afterMeta.config,configRevision:beforeMeta.config.configRevision},beforeMeta.config);
const registry=structuredClone(afterMeta.registry);registry.revision=beforeMeta.registry.revision;
const connection=registry.connections.find(row=>row.id===connectionId),oldConnection=beforeMeta.registry.connections.find(row=>row.id===connectionId);
assert.equal(connection.revision,oldConnection.revision+2);connection.revision=oldConnection.revision;connection.updatedAt=oldConnection.updatedAt;
const expected=structuredClone(beforeMeta.registry);for(const value of [expected,registry])value.connections.sort((a,b)=>a.id.localeCompare(b.id));
assert.deepEqual(canonical(registry),canonical(expected));assert.deepEqual(owned('run/node/restoration.json').identityDefaultNormalization,{});
for(const name of ['src/amount.mjs','src/summary.mjs','src/report.mjs'])assert.deepEqual(fs.readFileSync(file('run/node/source-before/'+name)),fs.readFileSync(file('run/node/source-after/'+name)));
const git=owned('run/node/git-final.json'),baseline=owned('run/node/source-identity.json');
assert.equal(git.head,baseline.head);assert.equal(git.status,baseline.status);assert.equal(git.stagedAfter,baseline.stagedBefore);assert.equal(git.diff,'');
assert.equal(final.passed,true);assert.equal(final.version,'1.24.6');assert.equal(final.pid,36552);assert.equal(final.inspectorClosed,true);
assert.equal(final.originalProjects,61);assert.equal(final.originalSessions,77);assert.equal(final.originalArtifacts,3610);assert.equal(final.originalAttempts,209);
assert.equal(final.finalProjects,63);assert.equal(final.finalSessions,79);assert.equal(final.finalArtifacts,3660);assert.equal(final.addedAttempts,7);
assert.deepEqual(final.connectionRevision,[5,7]);assert.equal(final.credentialRevision,1);assert.deepEqual(final.legacyDisplayRevisionFollowsGlobalConfigurationRevision,[65,69]);
assert.equal(final.originalBudgetsSelectionAndPoolRestored,true);assert.equal(final.reportedTokens,reportedTokens);assert.equal(final.unknownRequests,0);
assert.equal(final.nodeDelivered,false);assert.equal(final.purgeBenefitTested,false);assert.equal(final.productSourceChanged,false);assert.equal(final.keyReadOrResaved,false);
let gitIndex;
if(process.argv.includes('--index')){
const prefix=path.relative(process.cwd(),root).replaceAll('\\','/'),manifestBytes=fs.readFileSync(file('manifest.json'));
const entries=[...manifest.files,{path:'manifest.json',bytes:manifestBytes.length,sha256:sha(manifestBytes)}];
const output=execFileSync('git',['cat-file','--batch'],{input:entries.map(row=>':'+prefix+'/'+row.path).join('\n')+'\n',maxBuffer:256*1024*1024,windowsHide:true});
let offset=0,indexBytes=0;
for(const entry of entries){const end=output.indexOf(10,offset),header=output.subarray(offset,end).toString('utf8'),match=header.match(/^[a-f0-9]{40} blob (\d+)$/);assert.ok(match,header);
const size=Number(match[1]);offset=end+1;const bytes=output.subarray(offset,offset+size);offset+=size;assert.equal(output[offset++],10);
assert.equal(size,entry.bytes,entry.path);assert.equal(sha(bytes),entry.sha256,entry.path);indexBytes+=size;}
assert.equal(offset,output.length);gitIndex={passed:true,files:entries.length,bytes:indexBytes,exactOriginalBytes:true};
}
console.log(JSON.stringify({success:true,files:manifest.files.length,bytes:totalBytes,manifestSha256:sha(fs.readFileSync(file('manifest.json'))),
modelRequests:totalRequests,reportedTokens,unknownRequests:0,preflightPassed:true,nodeDelivered:false,originalPurgeBenefitTested:false,
ownedArtifactRecords:artifacts.length,originalDataAndDefaultsVerified:true,readingPaginationAndBudgetPauseVerified:true,productVersion:'1.24.6',
...(gitIndex?{gitIndex}:{}),scope:'Offline original bytes, frozen plan/source, actual reports, paging, ownership and declared restoration. No network, host mutation, model or credential access.'}));
+914
View File
@@ -0,0 +1,914 @@
{
"schemaVersion": 1,
"kind": "owned-live-delivery-r-evidence",
"createdAt": "2026-11-03T16:13:46.831Z",
"version": "1.24.6",
"releaseSourceCommit": "54dbe3d6fc7b068e37010222a09cff244975b2c0",
"experimentPlanCommit": "ea82bde3bc0f78a75b28a7918d713e05805cba8e",
"experimentBaseCommit": "8cf152e3ab574ba25f9c48564494a7b3e029cb18",
"branch": "test/live-delivery-r",
"references": {
"initial": "run/current.json",
"preflight": "run/preflight/result.json",
"node": "run/node/result.json",
"final": "run/final/result.json",
"network": "run/network/job.json",
"ownership": "run/final/ownership-proof.json",
"reading": "run/analysis/reading-review.json",
"budget": "run/analysis/budget-proof.json",
"artifacts": "run/analysis/artifact-index.json"
},
"note": "One preflight passed; new Node paused before seventh send with 6 completed matched responses and no code change/delivery. Original source tests failed, baseline build passed. All original state and defaults preserved under declared owned insertions/revisions/health. No extra calls, product release or Purge benefit claim. Drivers are inert text; never replay.",
"files": [
{
"path": "contract/drivers/desktop-f-state.mjs.txt",
"bytes": 5932,
"sha256": "6cf41ebd2ce55fe6fe3175948e9b964fac99975aca3132420a83b1d122e08b0b"
},
{
"path": "contract/drivers/freeze-live-delivery-r.mjs.txt",
"bytes": 3654,
"sha256": "486503874a89ef20504ef0038a95558475fbc081d8c4b0ad4986a054608fed7d"
},
{
"path": "contract/drivers/live-delivery-r-common.mjs.txt",
"bytes": 3084,
"sha256": "c8ccf89f552ac69668e964a47c56be5e38276e9f239c3729c93de58220e9ed39"
},
{
"path": "contract/drivers/live-delivery-r-initial.mjs.txt",
"bytes": 2150,
"sha256": "c77932a3284de2cf43a85a95b95756867da74dfc5f16f36e642c968a39916a74"
},
{
"path": "contract/drivers/live-delivery-r-inspector.mjs.txt",
"bytes": 3329,
"sha256": "3306efc0651cae2a887ab944a6faed83332b2103a0aa3bf7cc56683c0c5abfe0"
},
{
"path": "contract/drivers/live-delivery-r-network.mjs.txt",
"bytes": 4799,
"sha256": "518c38942629eed0ac671bbe9541e968ef6b8713a59acb62a91d979dfb8232a7"
},
{
"path": "contract/drivers/live-delivery-r-node.mjs.txt",
"bytes": 23935,
"sha256": "014d153e0253182ace91105d19d1b2c78786aaa6de3f9630d97d242da84c1e86"
},
{
"path": "contract/drivers/live-delivery-r-payload.mjs.txt",
"bytes": 7367,
"sha256": "fb2b5a6818cb229512823002aa090b95641cc404a6423190e1cb7194c34ecbd9"
},
{
"path": "contract/drivers/live-delivery-r-preflight-audit.mjs.txt",
"bytes": 3090,
"sha256": "938f92e7a2f5af357a54680ecd4a14f0e1c8798c1fc6f1b0a8f4561166e47f7e"
},
{
"path": "contract/drivers/live-delivery-r-preflight.mjs.txt",
"bytes": 6152,
"sha256": "ed1192b71fbc1af6554cb76117fa1330b5d05345a5db1b784c6a551b1c6bf8f8"
},
{
"path": "contract/drivers/prepare-live-delivery-r.mjs.txt",
"bytes": 1299,
"sha256": "3109c4c992a82b1caad84ae0b949c1cdd04d2a9a327db4c12aef1ed5be6edab0"
},
{
"path": "contract/manifest.json",
"bytes": 5572,
"sha256": "b19caea4c7fbabb4b3f7ab967963017acc69ef3973d946c2acd5b52e65e266b6"
},
{
"path": "drivers/live-delivery-r-analyze.mjs.txt",
"bytes": 3138,
"sha256": "b1b6d67486b77d4ae446d3496a9e1f8470d5b7e10d32af5c056f04a1c2b809c8"
},
{
"path": "drivers/live-delivery-r-budget-proof.mjs.txt",
"bytes": 3084,
"sha256": "6b6ab2ccc47839ccd7c3a00431d40926409faddff7a96117bb25f47e4e7c31e3"
},
{
"path": "drivers/live-delivery-r-capture-artifacts.mjs.txt",
"bytes": 2101,
"sha256": "199024b932dbb3cf5fd86f58ed8d980d9b7d64c1c0b12b365fc5bc8a341a13bd"
},
{
"path": "drivers/live-delivery-r-final-audit.mjs.txt",
"bytes": 9831,
"sha256": "986e31fe227ca0a4662d05296d8018f0743e76eac46533cd1670be6a1b59e6d0"
},
{
"path": "drivers/live-delivery-r-ownership-proof.mjs.txt",
"bytes": 3063,
"sha256": "d0d83514cf71b58d35f37c45a40eba3b200c83f8c9ae6b44acc8a9b58d22f6a0"
},
{
"path": "drivers/live-delivery-r-reading-review.mjs.txt",
"bytes": 2587,
"sha256": "87eae2a66e59d25140a4661321c11c366ab0eba9b827cc93be035b6643a9bf16"
},
{
"path": "drivers/seal-live-delivery-r.mjs.txt",
"bytes": 3991,
"sha256": "530fb30fc10b4f6d820d7fa9870ed2ea7944fa682729bc45ac211b7d13f083f8"
},
{
"path": "drivers/verify-live-delivery-r.mjs.txt",
"bytes": 18658,
"sha256": "f3f13811c8b4c121056e8f4a664e119d166a1a321b9b1b01d8af7ac7869bc25f"
},
{
"path": "provenance/frozen-plan.md",
"bytes": 2913,
"sha256": "dfba801d07a9be81f68af43cdf5662575fb5e8af501f39d24678e75b1393c7d3"
},
{
"path": "provenance/release-1.24.6.json",
"bytes": 1812,
"sha256": "75ebae8ef9811f2306298e223167f93632d8f9d2bc99d3de86f27647381525be"
},
{
"path": "run/analysis-first.log",
"bytes": 55406,
"sha256": "64fe1f4c37e9375b860b61036e116d8a7e7395c77c880625b7bc70eb5b049935"
},
{
"path": "run/analysis/artifact-index.json",
"bytes": 46446,
"sha256": "d15e7882fe3f8593070bc4fb46d3901c95b8da87ead42a4aee193d633c6c38b4"
},
{
"path": "run/analysis/artifacts/927220f9-449f-476f-b847-0bd58916f204/5f66a4c0-4b8e-47b0-92e3-460690aac391.txt",
"bytes": 444,
"sha256": "c86b749f624bde38a2dda8a67423a41ca46b2d0cfa82b94783f6f2453dd93e7a"
},
{
"path": "run/analysis/artifacts/927220f9-449f-476f-b847-0bd58916f204/6f6d0e7f-97a8-4565-8e70-2378a288a850.txt",
"bytes": 363,
"sha256": "5486801916281c7a6638a085f0492870e7475d6c7503390440695613cabac5e7"
},
{
"path": "run/analysis/artifacts/927220f9-449f-476f-b847-0bd58916f204/715bddfe-c4c3-49cf-a953-6a178bace28a.txt",
"bytes": 2077,
"sha256": "1b7e8c272937a5055f3a90d681f7a8d04ab11f0059a0fbc34132d8bdbfa66ef2"
},
{
"path": "run/analysis/artifacts/927220f9-449f-476f-b847-0bd58916f204/c1bbd97d-22e3-421f-b5ab-d062014800cd.txt",
"bytes": 444,
"sha256": "c86b749f624bde38a2dda8a67423a41ca46b2d0cfa82b94783f6f2453dd93e7a"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/07f90a88-3c0d-427b-a2cf-4f4cbfda1cca.txt",
"bytes": 35303,
"sha256": "ce0456b5a24c90298b823e5ff4ae23df2756cff5eb0ceecde4115562fa6d01a2"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/08ef671d-dbda-4a53-846e-6d14b1a15b3d.txt",
"bytes": 891,
"sha256": "55a48762ac74d0be73e09fb91c59e28a649b93a0802a016d31cd99a8bee0514e"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/0df37a5d-c38b-4591-9370-d72d2049a2b3.txt",
"bytes": 1276,
"sha256": "1ce43f17b376532dbe71a9a2c0369762cc49568d94859059897776b462920873"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/0f7d4a29-9fc8-459d-a5e8-a33230bd5f1f.txt",
"bytes": 3171,
"sha256": "467c9be261bd6c6acb596a4ff37a1c88930291d6e885d12562e472a9a5f01377"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/10b394db-47e8-43b7-8622-274660e3bbec.txt",
"bytes": 878,
"sha256": "aae0745c80c0a0eb7489c0a23e29e829c6d896852a3df709415e8cd8af784174"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/1176577e-f877-4b2d-91cb-8498f1786377.txt",
"bytes": 23127,
"sha256": "784af768d46b395d3ae42438f16027d9dafd82da9434aa7107052a9ab26483bb"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/14f364b4-0e7f-4d89-b1c3-01ce91e6b199.txt",
"bytes": 71,
"sha256": "6dcc686eebcece6596143099d9b2feb1b5790fd25434ed127d36f0cbb29c8005"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/1ef68d1e-dced-43b8-8e3d-349161866ca7.txt",
"bytes": 10293,
"sha256": "28eb8f50fa01eb542548d32205949632b88c1cc9ccca4e289e86b6861ce68e44"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/23bf879b-5004-4b41-acca-dd92c0187830.txt",
"bytes": 5273,
"sha256": "13573650af88e857d55e59c413f62fa46a1836edc1b18673e9eab84c7fa29329"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/2f7a8793-ddc6-4f5e-8c03-20f388477df2.txt",
"bytes": 869,
"sha256": "97a1466a183c119ef656ff43ed50e198ed623d1054ad368a651b4b9c1eb1b126"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/303695ff-de3d-495e-a106-1eb2d1c25288.txt",
"bytes": 4132,
"sha256": "1aae4739def15905e327991c651d8ee49231c081fad9af4d41fe4456d2824689"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/39c1521e-b9e8-40ec-bab6-c57776f4b968.txt",
"bytes": 2293,
"sha256": "954e1a41de30ff9b3b57b6a48a2210a65991a595e9871741696544b7c71adf23"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/429cb3fc-9a14-47e0-b76a-bccf8e1d91aa.txt",
"bytes": 9226,
"sha256": "97efae78071d2b6ae7ea73df122707bd7d286a669ed6ca2774df3c24cf967c15"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/44a37251-3a9a-4edb-8d29-dc0e7233aa70.txt",
"bytes": 35191,
"sha256": "d9d29499817b20d3eea662b1a0dfa554e4a2294e67699d3991cfaa14d92791cf"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/4f5dd2b2-b8f2-450a-8857-64ace056701a.txt",
"bytes": 452,
"sha256": "4cdaf349f368e66ecb05754fd3146c6b097426dee6f0d9b363480b79fbde897d"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/535ca4ec-b28e-4b90-af68-aa27192a5b1b.txt",
"bytes": 25899,
"sha256": "26d9dad553840ab18b7ec8d51a3f871bfef10bac5b16ca8422438c30943b2a25"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/58e0e3b0-9637-426a-9e24-963030578fa7.txt",
"bytes": 35191,
"sha256": "d9d29499817b20d3eea662b1a0dfa554e4a2294e67699d3991cfaa14d92791cf"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/5e794717-dccf-4d67-b820-e68c618f8e79.txt",
"bytes": 35808,
"sha256": "6b583d65aeabf5dc7280ed36d3b7536d27dba154dc2369ca3b78a5c0acd36d75"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/647ab922-e2c1-45c3-b6ea-695bf0165eb5.txt",
"bytes": 3105,
"sha256": "fd1e3cd3689c9d71c393244a5880fcf09b5e9b79790d2939b3584c7d29d50930"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/64f3886d-72e5-4bb4-b24f-7e962cdeea10.txt",
"bytes": 25899,
"sha256": "26d9dad553840ab18b7ec8d51a3f871bfef10bac5b16ca8422438c30943b2a25"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/6e92be61-972c-4d0a-a8ab-f99e44e3f729.txt",
"bytes": 3302,
"sha256": "d82b940c92e6d90af7cf0aaf530514758219c16201e5cc39a948a9c262c89f59"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/70bce812-4050-431c-b36d-8886381b5018.txt",
"bytes": 2564,
"sha256": "9a5ac7c48fd0ca959f4573d28b340dd6e89251ab770069f88fe7098cd8ba9bc5"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/716a7c24-abe5-477d-9078-6d4c3dc2addf.txt",
"bytes": 2093,
"sha256": "9335a126e7b460bf85c1bcdb57a9de84b83df7128843287c026834bdb78cdc16"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/74a5b7a9-63f8-4461-86b3-2b714913c173.txt",
"bytes": 30629,
"sha256": "2a52b0f0384e0cdc0f1c06262cc76b4bddda6076e78708aadc562d7e25799ee9"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/75b2284b-0796-4fff-bc7a-e84d9faffaa5.txt",
"bytes": 2903,
"sha256": "74c106df2e479ecdbde1b2a26688d4fb7ef21034e7a472df97246924c2774722"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/76bcb2ca-ed02-4350-a3c3-cf096b8c5db1.txt",
"bytes": 9547,
"sha256": "7639f79b8acac27b60430ce91fc9d808d476dc3a21750216974abdf7d4de4abb"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/7e7f3fc2-c661-4072-9637-68d0540fabb0.txt",
"bytes": 2355,
"sha256": "2cbdaf534193066939d3a08205f4d44cab56435f72d363225afabfc78d544ffc"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/80102911-4a35-4cd0-a016-1a018f48f8ab.txt",
"bytes": 495,
"sha256": "17ea0f01e00d78ced1813dd906e6ef4b14de864d14467d17538674fda3be87af"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/82b30b44-a244-4dbc-9876-201a52be5c0d.txt",
"bytes": 6058,
"sha256": "15c3587dab6135ab5f04560d65df10b4b30de21892b87e8796867c40cd37e3b8"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/8e29eeb7-d7af-416d-b6d1-9e1fa137c52f.txt",
"bytes": 2685,
"sha256": "cf792aceebc1b016876013d0de3bbd2fc564ee5f68d2a264bc88f9eab656ce85"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/8f10c14b-d41b-46d6-a665-5ee780c7302e.txt",
"bytes": 23127,
"sha256": "784af768d46b395d3ae42438f16027d9dafd82da9434aa7107052a9ab26483bb"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/9564171c-d23d-4744-a9b9-a95b7aa2fd90.txt",
"bytes": 579,
"sha256": "2523008330b8cd2cf3fba5c115d531056ebf1df2f8d7735df80188e173ac3473"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/98156d56-2efe-4c60-bf92-b2cea508017f.txt",
"bytes": 844,
"sha256": "6f11b37eb2ad7f0dce60eee13c084d851814cda6c9ea23cb1da51f1f39f86485"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/a97c9176-3a54-4512-8089-fecc773ebf6d.txt",
"bytes": 452,
"sha256": "f87140405c8673a0384fb4ee889e2d23e7193e47f01bd1bb8d9a8b8a4263e06a"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/ac7ccec4-04b8-44b0-8c59-53426f821746.txt",
"bytes": 596,
"sha256": "81122976b73e350e26e16a6a8235a70a8ca407ea1a6f10c13aa23923d8606d88"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/aef90f94-cb66-46a0-8e61-bfafaee56d84.txt",
"bytes": 6848,
"sha256": "f038f204ff596accb4304c74f1048b92d03cced4f4894146ce6828da78085a25"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/b18ba7c4-27c5-4adf-b3ef-ac84887f2b1f.txt",
"bytes": 2439,
"sha256": "5d58c9731e1decd0ade94f62366624493f1ba19e06f97bced111d7c17219aefc"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/b573c384-4209-4601-b52f-a48c05f91e9b.txt",
"bytes": 7778,
"sha256": "8576989a99a24d177bb821739cc072ea8cefee82555cab8ec1da282ce071eb3b"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/c0429e6a-022a-4d1b-8b3c-de181cf54e46.txt",
"bytes": 1470,
"sha256": "86c5e31a8edbffa1c6e44bd4a4c71fcd8735ec79c10c3575b0f14b6b59d42e13"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/c3c591d4-2d2e-4fdd-85dc-d07d03e4f3af.txt",
"bytes": 15454,
"sha256": "e91427f653bbd0721b065b5a223d27267541bf9218c0d511b15090acccb9b979"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/c4d8b286-0c26-4bd9-b747-f71519bc3c6e.txt",
"bytes": 30629,
"sha256": "2a52b0f0384e0cdc0f1c06262cc76b4bddda6076e78708aadc562d7e25799ee9"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/cbe97e69-8473-4fbb-95d1-8b809a54394c.txt",
"bytes": 1210,
"sha256": "866bf01bf800bc754af47daa468f4af21ef0234479ab0e99ea5d5e3541952b5a"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/ce6c8bfe-1991-4f8b-8e55-1d4098d8b3f0.txt",
"bytes": 8327,
"sha256": "9ffd5100eadfe9aa30432e9819990197f1acd4216111ffaf85c2d991fe791661"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/d273074f-e1dd-44d3-80ee-703c4248aeec.txt",
"bytes": 6141,
"sha256": "8b792dab1edaaa0cfbb8a3d1033578eebb8c55ad7af61cbfae6d6c0f7599a971"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/d3ac2079-98b6-4ca4-a1d7-07187d38e71b.txt",
"bytes": 451,
"sha256": "08b6595803497876c0745e6f72fab5d5a5233864e2f6447608b51adc2b7ddcf1"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/d4651a7d-3952-4495-99e5-ce471bbd90ec.txt",
"bytes": 35303,
"sha256": "ce0456b5a24c90298b823e5ff4ae23df2756cff5eb0ceecde4115562fa6d01a2"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/da511e01-2d28-4d3f-ae4f-ccacc55686ed.txt",
"bytes": 3604,
"sha256": "fd9922d2b3cca90c85bee1b04d3eec247fb1fe6068426dc665a4fca1b3678652"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/e1885cbf-9a62-4550-adc6-bc8624d939da.txt",
"bytes": 2174,
"sha256": "dfc459e323a15ec8ffa1633be1cb5b3ec5995a6117e83f49cac4e3ad9f2f4e25"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/e9bff77e-9417-4ecc-91cf-7994127e51b9.txt",
"bytes": 35808,
"sha256": "6b583d65aeabf5dc7280ed36d3b7536d27dba154dc2369ca3b78a5c0acd36d75"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/ebcdb39b-3362-4e90-b895-bd4e7365de56.txt",
"bytes": 1210,
"sha256": "012daf27091d1e8273f024d6e80e51a97e1ffb1b6f7f4d772ea34d61329adc8a"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/edf696bb-a422-480f-8bb7-9e26a3e617cf.txt",
"bytes": 880,
"sha256": "bc72011d44f3ca02d4e9c86f81c03ce8a5e5b9fb0d4676cac1b81262a8581d6f"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/ee812673-93f5-4fd2-986b-562c60ff4934.txt",
"bytes": 1587,
"sha256": "29480d466e81a22ac3733df06215d3650722f91e9020ca13d645bf1594e831bd"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/f16a9f47-5c55-4364-bc48-bc27292d3a94.txt",
"bytes": 8709,
"sha256": "b02b5e6866524127baee14cfa0a6afa01b7e954a61e890014a780bd5b379595e"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/f285f468-e077-44e5-b2e7-9d79515e3844.txt",
"bytes": 722,
"sha256": "8c39c2a86cedd3edfb8ff2612bc7c9f347d6984242d7bf030f5b1a47964f3304"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/f7b44e79-c416-407f-99ee-a52b1bc57324.txt",
"bytes": 4264,
"sha256": "9290a183c13ae309ce111944b014854e870484256bf7081872b806e6079a8089"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/fc5be6e2-20a6-4d33-8d3d-6935e206945f.txt",
"bytes": 933,
"sha256": "952d62b85f84e6cdd6d1c30839b469032fa5085c1a545457103844ee5329d3dc"
},
{
"path": "run/analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/ff695ec7-d614-43cc-b66a-aa5eb7cccd0b.txt",
"bytes": 2234,
"sha256": "68dc52dced4094e028096de34cab7c37396057a66de1f5570fa3ff037ebf193c"
},
{
"path": "run/analysis/budget-proof.json",
"bytes": 8362,
"sha256": "1089a80cbac1085ede41af851c2802582b60f4be202e820a1e0ddeb522bfcd09"
},
{
"path": "run/analysis/original-review.json",
"bytes": 78019,
"sha256": "6d0bf898f14247626b76c975ca1a4fd50579f3d976afde865f153c6ea552294e"
},
{
"path": "run/analysis/reading-review.json",
"bytes": 14146,
"sha256": "8c0bebb555092e7af08987d48a43081beac8ee09535138aa1d86675c809bc0da"
},
{
"path": "run/analysis/source-inputs/src/core/context/read-budget.mjs.txt",
"bytes": 13897,
"sha256": "8bf309d662240a89f952a3f70260301868c8976593f92696f46e64acc3e15307"
},
{
"path": "run/analysis/source-inputs/src/core/context/request-plan.mjs.txt",
"bytes": 40633,
"sha256": "0525beddf1ca05d84d780972e9a97c013f48de69e716a77be1c86ff3a2952e7d"
},
{
"path": "run/analysis/source-inputs/src/core/context/tool-feedback.mjs.txt",
"bytes": 9640,
"sha256": "a6c6350cd5b708624176c7b588b00a64358ec69ab6ab9447caedf7c482f4c817"
},
{
"path": "run/analysis/source-inputs/src/core/context/working-set.mjs.txt",
"bytes": 11071,
"sha256": "a8e9183321c3b5bc2afb7955a6daf496ff72d3e938be9b9ec514eaacfa7352be"
},
{
"path": "run/analysis/source-inputs/src/server/provider.mjs.txt",
"bytes": 42923,
"sha256": "0f90fbe160396ac341b9235ed428f8469affd9e1f4ccd74626e10d541a08be51"
},
{
"path": "run/analysis/source-inputs/src/server/runtime.mjs.txt",
"bytes": 89124,
"sha256": "b8ef89b2f356496504190b08ed5c7362cf06358731139f7fc73a8ba46242e0d5"
},
{
"path": "run/analysis/source-inputs/src/shared/contracts/model-request.mjs.txt",
"bytes": 7952,
"sha256": "c4846621c0405a6d89f09a611049579b2846e3fa2c2ef589fdb1abb1599e60a2"
},
{
"path": "run/analysis/source-inputs/src/shared/contracts/model-reservation.mjs.txt",
"bytes": 6741,
"sha256": "7f3e0f21720dc19efd5c675ae65e4eeed96dffb41c42a3d460fcc9f0b6473c6c"
},
{
"path": "run/artifacts-first.log",
"bytes": 114,
"sha256": "b8ee7b707c6fe91da6f290b43acd92f1b729c194c6ea09a6adc2bc8c0766e182"
},
{
"path": "run/budget-proof-first.log",
"bytes": 693,
"sha256": "bd6eee3de08418b2c0b159ba975bc40c67672c034b70e05e094bfa1af005ecaf"
},
{
"path": "run/current.json",
"bytes": 9740315,
"sha256": "93f7bd556b1c85ade21124477ba6bdd592e48e0bdc4d126ebfff5f2c4ff7130a"
},
{
"path": "run/final-audit-first.log",
"bytes": 1540,
"sha256": "d9086985ccab7941f291092fae6feae9dbd7abf13355c9975176b79b1d43051e"
},
{
"path": "run/final/ownership-proof.json",
"bytes": 128129,
"sha256": "6f154177663112e96e838d154adbd80cbf14652662ea57bc209c1d25523d23e5"
},
{
"path": "run/final/result.json",
"bytes": 1805,
"sha256": "08562f4c9a727207c7f57a5e00005f6c9635b622adb2b476461888f5b176ce7e"
},
{
"path": "run/final/snapshot.json",
"bytes": 9141742,
"sha256": "4fc6cf275b15a165b542b2a25e77b4718c55eb0cb648b28ae1511117279e1082"
},
{
"path": "run/network-first.log",
"bytes": 801,
"sha256": "4960cb9f2eaae1d9ca8dafbd74b97623ab9c67c2c15bd3953aaf09c6e8376f24"
},
{
"path": "run/network/after.json",
"bytes": 9006961,
"sha256": "3b00c1aacd6fc3e7f290b3dc66bf1ceefe267f943005755888e934a84196830a"
},
{
"path": "run/network/before.json",
"bytes": 9006724,
"sha256": "738026d50009a4e57e6aa05b82f8e1b8533ef662ae172de237f3beb7446a6ced"
},
{
"path": "run/network/contract.json",
"bytes": 328,
"sha256": "36099e5f05d5930e902e91bbd2b339d3c85971b519519c2b540bb6c1d09137b7"
},
{
"path": "run/network/history-after.json",
"bytes": 4136,
"sha256": "dcc789ed269231fc08f750e5ced5b046ddef614e6e10684efbe1a0e1cf1063be"
},
{
"path": "run/network/history-before.json",
"bytes": 93,
"sha256": "632615710ed5ffea1ed5e577e4d8b861fc1b099c0ec0b225341907ca7871212a"
},
{
"path": "run/network/job.json",
"bytes": 3488,
"sha256": "9904c88b0e7fef90818ce22a80143160c6db28b787890da6b92a34dfd5194439"
},
{
"path": "run/network/restoration.json",
"bytes": 1151,
"sha256": "e2c56c10b97a16e0b30382cf1cce4b8d1eaf0588bc70a97596094304856066e9"
},
{
"path": "run/network/start.json",
"bytes": 1200,
"sha256": "cd34f430637d9044b73c6a68d4fcbd6814fb15d4d814bc1131b5715e644517ba"
},
{
"path": "run/node-first.log",
"bytes": 1261,
"sha256": "9015014f5095e85003204b8fa90da13c5fbed03baf51258cb77bb2caed6fd2ac"
},
{
"path": "run/node/after.json",
"bytes": 9141742,
"sha256": "a3e519174154100ce0908602cad2f4605274bc19d1fec01cd1acf6a9fe2ba8f5"
},
{
"path": "run/node/attempts.json",
"bytes": 30499,
"sha256": "c3732ba8dcac5966e450e18dcee5cdc64bace4b2d93753e148582d035a3c3a8a"
},
{
"path": "run/node/before.json",
"bytes": 9021112,
"sha256": "ab6800bf8439bd17d314421eaabb882aeedf7b41d1c3bdb0bc0f0f133b27c98a"
},
{
"path": "run/node/captures/19f33d0d-9344-4b27-a6b9-556bb8a3797d-request.json",
"bytes": 25899,
"sha256": "26d9dad553840ab18b7ec8d51a3f871bfef10bac5b16ca8422438c30943b2a25"
},
{
"path": "run/node/captures/19f33d0d-9344-4b27-a6b9-556bb8a3797d-response.txt",
"bytes": 579,
"sha256": "2523008330b8cd2cf3fba5c115d531056ebf1df2f8d7735df80188e173ac3473"
},
{
"path": "run/node/captures/23226d1c-9ad6-4daa-81f5-1b44f0d57ecc-request.json",
"bytes": 35303,
"sha256": "ce0456b5a24c90298b823e5ff4ae23df2756cff5eb0ceecde4115562fa6d01a2"
},
{
"path": "run/node/captures/23226d1c-9ad6-4daa-81f5-1b44f0d57ecc-response.txt",
"bytes": 844,
"sha256": "6f11b37eb2ad7f0dce60eee13c084d851814cda6c9ea23cb1da51f1f39f86485"
},
{
"path": "run/node/captures/4ed9deb8-58e1-47e0-9585-48c4e644e68f-request.json",
"bytes": 35191,
"sha256": "d9d29499817b20d3eea662b1a0dfa554e4a2294e67699d3991cfaa14d92791cf"
},
{
"path": "run/node/captures/4ed9deb8-58e1-47e0-9585-48c4e644e68f-response.txt",
"bytes": 596,
"sha256": "81122976b73e350e26e16a6a8235a70a8ca407ea1a6f10c13aa23923d8606d88"
},
{
"path": "run/node/captures/53337890-31fe-4261-9604-c9ffff6139c3-request.json",
"bytes": 30629,
"sha256": "2a52b0f0384e0cdc0f1c06262cc76b4bddda6076e78708aadc562d7e25799ee9"
},
{
"path": "run/node/captures/53337890-31fe-4261-9604-c9ffff6139c3-response.txt",
"bytes": 2234,
"sha256": "68dc52dced4094e028096de34cab7c37396057a66de1f5570fa3ff037ebf193c"
},
{
"path": "run/node/captures/704d88f7-fbef-4507-9597-22cf79481961-request.json",
"bytes": 35808,
"sha256": "6b583d65aeabf5dc7280ed36d3b7536d27dba154dc2369ca3b78a5c0acd36d75"
},
{
"path": "run/node/captures/704d88f7-fbef-4507-9597-22cf79481961-response.txt",
"bytes": 722,
"sha256": "8c39c2a86cedd3edfb8ff2612bc7c9f347d6984242d7bf030f5b1a47964f3304"
},
{
"path": "run/node/captures/dcb342bf-a983-4124-8f3a-9dd84fbf40a5-request.json",
"bytes": 23127,
"sha256": "784af768d46b395d3ae42438f16027d9dafd82da9434aa7107052a9ab26483bb"
},
{
"path": "run/node/captures/dcb342bf-a983-4124-8f3a-9dd84fbf40a5-response.txt",
"bytes": 452,
"sha256": "f87140405c8673a0384fb4ee889e2d23e7193e47f01bd1bb8d9a8b8a4263e06a"
},
{
"path": "run/node/connection-frozen.json",
"bytes": 1415,
"sha256": "26e3164dbe5409ec2db3d364486f2096958528d803fa0b14000a9fec35758cc0"
},
{
"path": "run/node/connection-restored.json",
"bytes": 1408,
"sha256": "603b849d84eedc755e25127450dfa49a6fd0f2dbc3c80c60deffe3a33cb40e4a"
},
{
"path": "run/node/contract.json",
"bytes": 2974,
"sha256": "1909ac918d864f020ba58817f082d9da5b1e2beb76805753349cc8692fe7ded6"
},
{
"path": "run/node/declared-identity-default-normalization.json",
"bytes": 309,
"sha256": "d8311296a9b2a78d8df3fc81d8c87d8f98f44d249e286cede10ae0b967b68d00"
},
{
"path": "run/node/export.json",
"bytes": 201763,
"sha256": "bdd59ca99e01f02f5524cfa301be64cc526f159e3c012e6213ffd2b1815da442"
},
{
"path": "run/node/final-public-metadata.json",
"bytes": 3978,
"sha256": "e779ed27b744d1e9586177fa710358ae2e99bc7f4865f022dc70075c3d7c3aa9"
},
{
"path": "run/node/git-final.json",
"bytes": 240,
"sha256": "3072edb82237f22b81dacd089df72ee38b987d2dbadb9410a370d54bb76af5c4"
},
{
"path": "run/node/goal.txt",
"bytes": 1193,
"sha256": "d5f2cb382e917c073d379742a0dc468d7326f242d6fb9bb392da99d8af3393dd"
},
{
"path": "run/node/model-outcome.json",
"bytes": 7387,
"sha256": "55f346d327685c95b50fc7f6453ac1852a27b6ed18c0c6ad6ee7b7ef2d919f36"
},
{
"path": "run/node/original-attempts.json",
"bytes": 471699,
"sha256": "5109e8db2b0a2d91cf4279efb4dc6504439506df8789ba939cae16d5063537ba"
},
{
"path": "run/node/original-public-metadata.json",
"bytes": 3978,
"sha256": "a44eca9d5e48b39c2d617a2672aafda7dcd04bf871102b4a14791ca565e71c19"
},
{
"path": "run/node/owned.json",
"bytes": 1784,
"sha256": "5a7f2b312576a04d38adbf7dfe84cda7523afec4a2de78fb0f6973cf45954e2f"
},
{
"path": "run/node/restoration.json",
"bytes": 718,
"sha256": "c740cb306e3b6b57e70fd32cf7d2b092472800e2e280a3f2c81d8a6da9932887"
},
{
"path": "run/node/result.json",
"bytes": 7387,
"sha256": "55f346d327685c95b50fc7f6453ac1852a27b6ed18c0c6ad6ee7b7ef2d919f36"
},
{
"path": "run/node/session.json",
"bytes": 165290,
"sha256": "9b727b72e5e37274358c129c6eb6597b28ed76630341374b2fb0a5bd5a9a7a51"
},
{
"path": "run/node/source-after/src/amount.mjs",
"bytes": 51,
"sha256": "84cb647328ec52dad27d288f3a6127ff3e1ad87274ae2d227ad44daa49cbb2ed"
},
{
"path": "run/node/source-after/src/report.mjs",
"bytes": 52,
"sha256": "ba0a014e6e9df710d66e255a3a6f970f4e1c8af48accc81f33627029dcded7c0"
},
{
"path": "run/node/source-after/src/summary.mjs",
"bytes": 93,
"sha256": "48829850c11ca0cd0ab5e86bbac69a0c5f90297292168c1ba6dc338e2eae6ee7"
},
{
"path": "run/node/source-before/.gitignore",
"bytes": 27,
"sha256": "cab0bc87cad1b1214d71b023eee742986044093ff4b4331cd6a51098af6bdce6"
},
{
"path": "run/node/source-before/owner-staged.txt",
"bytes": 40,
"sha256": "56b0dda452eaf9aead80f0e4ad971d7befa3cf152c3553923f8fde46e1fd336a"
},
{
"path": "run/node/source-before/owner-unstaged.txt",
"bytes": 22,
"sha256": "468bfb2956a4ac040508fc5ffd915cf8057fb7420e22c41a3cc2d094785f0d3e"
},
{
"path": "run/node/source-before/owner-untracked.txt",
"bytes": 23,
"sha256": "e32ab29a12ed13d72c2ed603b2360e1b4e35afb0fe4280db2e523ad2c6c5bc8d"
},
{
"path": "run/node/source-before/package.json",
"bytes": 188,
"sha256": "6ad63026b2fe9de7513a4f6704c372a86108ee3d018a1f04883dc0a409ea4c24"
},
{
"path": "run/node/source-before/README.md",
"bytes": 136,
"sha256": "5e35a4dace9537e7c4cc815ce7054f73c171f053f1cccb9ff141f49ecb3c013e"
},
{
"path": "run/node/source-before/scripts/build.mjs",
"bytes": 475,
"sha256": "7279bc7c707c0f3ccbae63b14f0abed248ad3755be14f9e37128124ae9267526"
},
{
"path": "run/node/source-before/src/amount.mjs",
"bytes": 51,
"sha256": "84cb647328ec52dad27d288f3a6127ff3e1ad87274ae2d227ad44daa49cbb2ed"
},
{
"path": "run/node/source-before/src/report.mjs",
"bytes": 52,
"sha256": "ba0a014e6e9df710d66e255a3a6f970f4e1c8af48accc81f33627029dcded7c0"
},
{
"path": "run/node/source-before/src/summary.mjs",
"bytes": 93,
"sha256": "48829850c11ca0cd0ab5e86bbac69a0c5f90297292168c1ba6dc338e2eae6ee7"
},
{
"path": "run/node/source-before/test/expense.test.mjs",
"bytes": 2584,
"sha256": "0bcda551dbaeafad9a6e3df8024492ab67d7c09956f4676c393b78249ab44839"
},
{
"path": "run/node/source-identity.json",
"bytes": 1202,
"sha256": "a4297f5fbc5a065a34e76e356abf7cd28497b9a0b29085af358c7bd7782f9793"
},
{
"path": "run/ownership-first.log",
"bytes": 138,
"sha256": "ff97d6f13a894d0e13876a99629821cbdec669412152c1435af51da0b0a60d3b"
},
{
"path": "run/preflight-audit-first.log",
"bytes": 479,
"sha256": "4180c8b0a81e24ea94f7271bad316dbb57be1372dc3cff7306d56a06fee5d2bd"
},
{
"path": "run/preflight-first.log",
"bytes": 378,
"sha256": "1832c3f4b62de1ed9012c2c6a002543bd6ca64913ffa9556b775ec4caeb3ab11"
},
{
"path": "run/preflight/after.json",
"bytes": 9021112,
"sha256": "9280ef42ca1abbcb5ba23d1155a4859b4451e3801127efa0fc5d118d7476bc9d"
},
{
"path": "run/preflight/attempts.json",
"bytes": 4376,
"sha256": "903044d7eeb0cc2beacabb29f83e1c32096f82d1a1c04afecd95c4dff8ea2dfa"
},
{
"path": "run/preflight/before.json",
"bytes": 9006961,
"sha256": "08cfb79e486c400f69d90203dc58c3936f50f75ec16b94a46df3cd9922edfaee"
},
{
"path": "run/preflight/captures/e5728f74-3465-4e52-8458-3a9e42312d3b-request.json",
"bytes": 444,
"sha256": "c86b749f624bde38a2dda8a67423a41ca46b2d0cfa82b94783f6f2453dd93e7a"
},
{
"path": "run/preflight/captures/e5728f74-3465-4e52-8458-3a9e42312d3b-response.txt",
"bytes": 363,
"sha256": "5486801916281c7a6638a085f0492870e7475d6c7503390440695613cabac5e7"
},
{
"path": "run/preflight/contract.json",
"bytes": 2491,
"sha256": "4bb904a334716283841bb9569d075f8a5d28c5b2a1187f17a7871af0afd929b0"
},
{
"path": "run/preflight/export.json",
"bytes": 22643,
"sha256": "4335badc3157f49a27276eb5618d37c382db9e4fa0a883074572634922271cce"
},
{
"path": "run/preflight/expression.js",
"bytes": 7920,
"sha256": "4b836157fb26948d475aec642b0eb22f77ad56bcec39f1da3543ba7abcd4148d"
},
{
"path": "run/preflight/host-result.json",
"bytes": 709,
"sha256": "0af5f435db0d08b0cb82108c6ee775e03f70fc6b47b303461ffd23aa5a0340a5"
},
{
"path": "run/preflight/input.json",
"bytes": 688,
"sha256": "8308ffaa1ab1a2696d4da80738ffff2ea6fb0b7ce6157ad605dc6f3da3bc8e17"
},
{
"path": "run/preflight/inspector-final.json",
"bytes": 21,
"sha256": "a54ac5bb1f80f63e97d0fdea2ed11b5d547130e28378703d643019b310611f98"
},
{
"path": "run/preflight/original-attempts.json",
"bytes": 467326,
"sha256": "8ad3ed6c11562910e4bd85b227619cd1f7c19ea181df6a77002083433ed70b0b"
},
{
"path": "run/preflight/owned.json",
"bytes": 1788,
"sha256": "1ac90130daef6494c1ddaf215383d95e1d59bc1e220e57e9cefca86b69c54646"
},
{
"path": "run/preflight/restoration.json",
"bytes": 558,
"sha256": "5378c6b657613a92678fe471874731118808248e098a53bdae5b219902d9bdc3"
},
{
"path": "run/preflight/result.json",
"bytes": 2307,
"sha256": "9ced268daa99fbec6e24a4c3c1a6f941a00fe09ae6a87446d56409fcf4fdee0d"
},
{
"path": "run/preflight/session.json",
"bytes": 21798,
"sha256": "836c01221be34e19bf09dbdefb6745885eb9c0f4cc9a3e499728b30ce4cdcc71"
},
{
"path": "run/reading-review-first.log",
"bytes": 6412,
"sha256": "998e9020f425050f40c37b53ee989c9ddabda89b829fb760d0030bea00b9a875"
}
]
}
@@ -0,0 +1,23 @@
# R:诊断后的单次真实身份预检与 Node 交付
继承 Q 的完整发行验收。正式产品为 1.24.6/source54dbe3d6,原进程 PID36552 与 Provider 保持;本轮新建自有样本,不续跑 P/O/J/E/H 失败。生产凭据仅由原 Provider 使用,不提取、复制、解密或重存值。
## 冻结范围
目标为已启用 jojocode/5b4daed9-b2f7-4de0-b949-573eba70c7b3,连接修订5/凭据修订1、gpt-6.1-sol、Chat 非流式 JSON、https://jojocode.com/v1,16K 上下文和2048输出。保留默认高性能池68e30376及旧09b停用状态,不自动切换连接。配置变化则发送前停止,不覆盖外部修改。
| 阶段 | 硬限制 | 判断依据 |
| --- | --- | --- |
| 所属网络诊断 | 1个job、最多12秒、零HTTP/模型请求/凭据访问 | DNS/TCP/TLS原结果、地址族与代理范围;只观察直连端点 |
| 独立身份预检 | 1请求/1尝试、256输出、16000总tokens、0工具、无重试/切池 | 原请求/响应、完整matched身份、原报告用量;strict仅实验快照 |
| 新Node工程,仅预检通过后 | 最多8请求/90000tokens/600000ms、16K/2048、仅三源码 | 原九测试/test/build、完整修改审查、同Task显式续接、模型计划Git及实际提交 |
Node 使用 benchmarks/live-delivery-v1/node 原九测试,仅允许 src/amount.mjs、src/summary.mjs、src/report.mjs。测试、构建脚本和配置不修改;设置并验证已有暂存、不同工作副本、未暂存和未跟踪所有者文件。监督只核对完整模型提案并应用、批准模型计划的原 test/build、确认模型计划的Git,不能代替实现或追加实现提示。审查续接仍使用同Task和原剩余请求,不重置预算。
旧数据基线包括每表原行摘要、全部原会话导出摘要、工件字节摘要和公开模型配置/原尝试。诊断新增一条所属历史;预检/Node新增的自有项目、会话、记录、事件、尝试和工件分别列明。Node临时严格身份、预算和固定选择在结束后按原语义恢复,修订保持单调,连接健康变化按实际结果记录。任何失败、未知用量或驱动错误保留原件,不重复请求补成绩。
## 退出和后续
诊断不认证API路线、Key权限、权重或交付能力;预检也不证明工程通过。Node失败时先保存和分析,不扩大预算或连续新开题。只有Node真实闭环通过后再另做React/Python,原版Purge收益另立同源/同题/同预算AB/BA,不把早停当节省。发现实际产品缺陷才进入新的修复/发行切片,不能为了实测制造版本。最终回顾、证据离线核验与本地Git,不推送。
实验驱动在调用前以原字节文本冻结到 docs/live-delivery-r-contract/drivers;原 .qa 文件不覆盖历史 P/O 驱动。固定计划和驱动完成范围审查后先本地提交,再运行诊断/真实请求。
@@ -0,0 +1,38 @@
{
"version": "1.24.6",
"sourceCommit": "54dbe3d6fc7b068e37010222a09cff244975b2c0",
"candidate": "Agent-Workbench-1.24.6-win-x64-20261103151145294",
"portableManifestSha256": "64aa8b2ae90df30eb33b9d2f60b458c3fcf61de7cbc778ac2d08fd0f7437127d",
"sourceManifestSha256": "76a18cef5956d576494ba00c13537f80b3b16cd544cc18791243fc3c9b2091a1",
"installer": {
"path": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.24.6-win-x64-20261103151145294-Setup.exe",
"bytes": 213233219,
"sha256": "df1455bd0d9e85e8788aa0be06c171d45aa580eb5cde22854a66f4e2b265b358",
"compiler": {
"version": "6.3.1",
"sha256": "3b22d36fc7e7c421d8caf780008ecdb42b14b3f0371b9bafe3cad64e6648d9cf"
},
"source": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\installer-build-b905e1b4-ede3-4de0-9831-5926c982cf0e\\installer.iss",
"version": "1.24.6",
"candidateDirectory": "Agent-Workbench-1.24.6-win-x64-20261103151145294",
"qaFixture": null
},
"archives": {
"portable": {
"path": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.24.6-win-x64-20261103151145294.zip",
"bytes": 242826539,
"sha256": "d142770c8cdc18378d34cdca768d2704301de55b44781e5c435220f4b8525eeb"
},
"source": {
"path": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.24.6-source-20261103151145294.zip",
"bytes": 967345427,
"sha256": "92e000f9c97abdb2da44c544cea6a3c3a5ce21a317e93d364af51588956a0302"
},
"evidence": {
"path": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.24.6-evidence-20261103151145294.zip",
"bytes": 726162616,
"sha256": "19e626a672324b108e7d504cf535a344e9d8213fa078ef5537b133edad18b148"
}
},
"realModelRequests": 0
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,920 @@
{
"artifacts": [
{
"id": "5f66a4c0-4b8e-47b0-92e3-460690aac391",
"sessionId": "927220f9-449f-476f-b847-0bd58916f204",
"projectId": "5ca4d319-8ff7-4d8c-a49f-94641a16b777",
"taskId": "4bef8a00-e894-44c7-a8f1-16278404a090",
"runId": "fd74d64f-ceae-4f32-877b-6d432bdee38e",
"kind": "model-request",
"mediaType": "application/json",
"sha256": "c86b749f624bde38a2dda8a67423a41ca46b2d0cfa82b94783f6f2453dd93e7a",
"bytes": 444,
"relative": "c8/c86b749f624bde38a2dda8a67423a41ca46b2d0cfa82b94783f6f2453dd93e7a.blob",
"createdAt": "2026-11-03T16:01:51.945Z",
"status": "stored",
"capturedPath": "analysis/artifacts/927220f9-449f-476f-b847-0bd58916f204/5f66a4c0-4b8e-47b0-92e3-460690aac391.txt"
},
{
"id": "715bddfe-c4c3-49cf-a953-6a178bace28a",
"sessionId": "927220f9-449f-476f-b847-0bd58916f204",
"projectId": "5ca4d319-8ff7-4d8c-a49f-94641a16b777",
"taskId": "4bef8a00-e894-44c7-a8f1-16278404a090",
"runId": "fd74d64f-ceae-4f32-877b-6d432bdee38e",
"kind": "context-plan",
"mediaType": "application/json",
"sha256": "1b7e8c272937a5055f3a90d681f7a8d04ab11f0059a0fbc34132d8bdbfa66ef2",
"bytes": 2077,
"relative": "1b/1b7e8c272937a5055f3a90d681f7a8d04ab11f0059a0fbc34132d8bdbfa66ef2.blob",
"createdAt": "2026-11-03T16:01:51.947Z",
"status": "stored",
"capturedPath": "analysis/artifacts/927220f9-449f-476f-b847-0bd58916f204/715bddfe-c4c3-49cf-a953-6a178bace28a.txt"
},
{
"id": "c1bbd97d-22e3-421f-b5ab-d062014800cd",
"sessionId": "927220f9-449f-476f-b847-0bd58916f204",
"projectId": "5ca4d319-8ff7-4d8c-a49f-94641a16b777",
"taskId": "4bef8a00-e894-44c7-a8f1-16278404a090",
"runId": "fd74d64f-ceae-4f32-877b-6d432bdee38e",
"kind": "model-attempt-request",
"mediaType": "application/json",
"sha256": "c86b749f624bde38a2dda8a67423a41ca46b2d0cfa82b94783f6f2453dd93e7a",
"bytes": 444,
"relative": "c8/c86b749f624bde38a2dda8a67423a41ca46b2d0cfa82b94783f6f2453dd93e7a.blob",
"createdAt": "2026-11-03T16:01:51.951Z",
"status": "stored",
"capturedPath": "analysis/artifacts/927220f9-449f-476f-b847-0bd58916f204/c1bbd97d-22e3-421f-b5ab-d062014800cd.txt"
},
{
"id": "6f6d0e7f-97a8-4565-8e70-2378a288a850",
"sessionId": "927220f9-449f-476f-b847-0bd58916f204",
"projectId": "5ca4d319-8ff7-4d8c-a49f-94641a16b777",
"taskId": "4bef8a00-e894-44c7-a8f1-16278404a090",
"runId": "fd74d64f-ceae-4f32-877b-6d432bdee38e",
"kind": "model-http-response",
"mediaType": "text/plain",
"sha256": "5486801916281c7a6638a085f0492870e7475d6c7503390440695613cabac5e7",
"bytes": 363,
"relative": "54/5486801916281c7a6638a085f0492870e7475d6c7503390440695613cabac5e7.blob",
"createdAt": "2026-11-03T16:01:56.949Z",
"status": "stored",
"capturedPath": "analysis/artifacts/927220f9-449f-476f-b847-0bd58916f204/6f6d0e7f-97a8-4565-8e70-2378a288a850.txt"
},
{
"id": "8f10c14b-d41b-46d6-a665-5ee780c7302e",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "model-request",
"mediaType": "application/json",
"sha256": "784af768d46b395d3ae42438f16027d9dafd82da9434aa7107052a9ab26483bb",
"bytes": 23127,
"relative": "78/784af768d46b395d3ae42438f16027d9dafd82da9434aa7107052a9ab26483bb.blob",
"createdAt": "2026-11-03T16:02:55.220Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/8f10c14b-d41b-46d6-a665-5ee780c7302e.txt"
},
{
"id": "716a7c24-abe5-477d-9078-6d4c3dc2addf",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "context-plan",
"mediaType": "application/json",
"sha256": "9335a126e7b460bf85c1bcdb57a9de84b83df7128843287c026834bdb78cdc16",
"bytes": 2093,
"relative": "93/9335a126e7b460bf85c1bcdb57a9de84b83df7128843287c026834bdb78cdc16.blob",
"createdAt": "2026-11-03T16:02:55.223Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/716a7c24-abe5-477d-9078-6d4c3dc2addf.txt"
},
{
"id": "1176577e-f877-4b2d-91cb-8498f1786377",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "model-attempt-request",
"mediaType": "application/json",
"sha256": "784af768d46b395d3ae42438f16027d9dafd82da9434aa7107052a9ab26483bb",
"bytes": 23127,
"relative": "78/784af768d46b395d3ae42438f16027d9dafd82da9434aa7107052a9ab26483bb.blob",
"createdAt": "2026-11-03T16:02:55.226Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/1176577e-f877-4b2d-91cb-8498f1786377.txt"
},
{
"id": "a97c9176-3a54-4512-8089-fecc773ebf6d",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "model-http-response",
"mediaType": "text/plain",
"sha256": "f87140405c8673a0384fb4ee889e2d23e7193e47f01bd1bb8d9a8b8a4263e06a",
"bytes": 452,
"relative": "f8/f87140405c8673a0384fb4ee889e2d23e7193e47f01bd1bb8d9a8b8a4263e06a.blob",
"createdAt": "2026-11-03T16:03:01.121Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/a97c9176-3a54-4512-8089-fecc773ebf6d.txt"
},
{
"id": "cbe97e69-8473-4fbb-95d1-8b809a54394c",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "tool-result",
"mediaType": "application/json",
"sha256": "866bf01bf800bc754af47daa468f4af21ef0234479ab0e99ea5d5e3541952b5a",
"bytes": 1210,
"relative": "86/866bf01bf800bc754af47daa468f4af21ef0234479ab0e99ea5d5e3541952b5a.blob",
"createdAt": "2026-11-03T16:03:01.424Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/cbe97e69-8473-4fbb-95d1-8b809a54394c.txt"
},
{
"id": "535ca4ec-b28e-4b90-af68-aa27192a5b1b",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "model-request",
"mediaType": "application/json",
"sha256": "26d9dad553840ab18b7ec8d51a3f871bfef10bac5b16ca8422438c30943b2a25",
"bytes": 25899,
"relative": "26/26d9dad553840ab18b7ec8d51a3f871bfef10bac5b16ca8422438c30943b2a25.blob",
"createdAt": "2026-11-03T16:03:01.439Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/535ca4ec-b28e-4b90-af68-aa27192a5b1b.txt"
},
{
"id": "39c1521e-b9e8-40ec-bab6-c57776f4b968",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "context-plan",
"mediaType": "application/json",
"sha256": "954e1a41de30ff9b3b57b6a48a2210a65991a595e9871741696544b7c71adf23",
"bytes": 2293,
"relative": "95/954e1a41de30ff9b3b57b6a48a2210a65991a595e9871741696544b7c71adf23.blob",
"createdAt": "2026-11-03T16:03:01.442Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/39c1521e-b9e8-40ec-bab6-c57776f4b968.txt"
},
{
"id": "64f3886d-72e5-4bb4-b24f-7e962cdeea10",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "model-attempt-request",
"mediaType": "application/json",
"sha256": "26d9dad553840ab18b7ec8d51a3f871bfef10bac5b16ca8422438c30943b2a25",
"bytes": 25899,
"relative": "26/26d9dad553840ab18b7ec8d51a3f871bfef10bac5b16ca8422438c30943b2a25.blob",
"createdAt": "2026-11-03T16:03:01.445Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/64f3886d-72e5-4bb4-b24f-7e962cdeea10.txt"
},
{
"id": "9564171c-d23d-4744-a9b9-a95b7aa2fd90",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "model-http-response",
"mediaType": "text/plain",
"sha256": "2523008330b8cd2cf3fba5c115d531056ebf1df2f8d7735df80188e173ac3473",
"bytes": 579,
"relative": "25/2523008330b8cd2cf3fba5c115d531056ebf1df2f8d7735df80188e173ac3473.blob",
"createdAt": "2026-11-03T16:03:10.140Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/9564171c-d23d-4744-a9b9-a95b7aa2fd90.txt"
},
{
"id": "ebcdb39b-3362-4e90-b895-bd4e7365de56",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "project-inspection",
"mediaType": "application/json",
"sha256": "012daf27091d1e8273f024d6e80e51a97e1ffb1b6f7f4d772ea34d61329adc8a",
"bytes": 1210,
"relative": "01/012daf27091d1e8273f024d6e80e51a97e1ffb1b6f7f4d772ea34d61329adc8a.blob",
"createdAt": "2026-11-03T16:03:10.424Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/ebcdb39b-3362-4e90-b895-bd4e7365de56.txt"
},
{
"id": "e1885cbf-9a62-4550-adc6-bc8624d939da",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "check-plan",
"mediaType": "application/json",
"sha256": "dfc459e323a15ec8ffa1633be1cb5b3ec5995a6117e83f49cac4e3ad9f2f4e25",
"bytes": 2174,
"relative": "df/dfc459e323a15ec8ffa1633be1cb5b3ec5995a6117e83f49cac4e3ad9f2f4e25.blob",
"createdAt": "2026-11-03T16:03:10.498Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/e1885cbf-9a62-4550-adc6-bc8624d939da.txt"
},
{
"id": "da511e01-2d28-4d3f-ae4f-ccacc55686ed",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "tool-result",
"mediaType": "application/json",
"sha256": "fd9922d2b3cca90c85bee1b04d3eec247fb1fe6068426dc665a4fca1b3678652",
"bytes": 3604,
"relative": "fd/fd9922d2b3cca90c85bee1b04d3eec247fb1fe6068426dc665a4fca1b3678652.blob",
"createdAt": "2026-11-03T16:03:10.504Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/da511e01-2d28-4d3f-ae4f-ccacc55686ed.txt"
},
{
"id": "ce6c8bfe-1991-4f8b-8e55-1d4098d8b3f0",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "project-index",
"mediaType": "application/json",
"sha256": "9ffd5100eadfe9aa30432e9819990197f1acd4216111ffaf85c2d991fe791661",
"bytes": 8327,
"relative": "9f/9ffd5100eadfe9aa30432e9819990197f1acd4216111ffaf85c2d991fe791661.blob",
"createdAt": "2026-11-03T16:03:10.718Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/ce6c8bfe-1991-4f8b-8e55-1d4098d8b3f0.txt"
},
{
"id": "23bf879b-5004-4b41-acca-dd92c0187830",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "tool-result",
"mediaType": "application/json",
"sha256": "13573650af88e857d55e59c413f62fa46a1836edc1b18673e9eab84c7fa29329",
"bytes": 5273,
"relative": "13/13573650af88e857d55e59c413f62fa46a1836edc1b18673e9eab84c7fa29329.blob",
"createdAt": "2026-11-03T16:03:10.720Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/23bf879b-5004-4b41-acca-dd92c0187830.txt"
},
{
"id": "1ef68d1e-dced-43b8-8e3d-349161866ca7",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "context-group",
"mediaType": "application/json",
"sha256": "28eb8f50fa01eb542548d32205949632b88c1cc9ccca4e289e86b6861ce68e44",
"bytes": 10293,
"relative": "28/28eb8f50fa01eb542548d32205949632b88c1cc9ccca4e289e86b6861ce68e44.blob",
"createdAt": "2026-11-03T16:03:10.740Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/1ef68d1e-dced-43b8-8e3d-349161866ca7.txt"
},
{
"id": "7e7f3fc2-c661-4072-9637-68d0540fabb0",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "context-history-index",
"mediaType": "application/json",
"sha256": "2cbdaf534193066939d3a08205f4d44cab56435f72d363225afabfc78d544ffc",
"bytes": 2355,
"relative": "2c/2cbdaf534193066939d3a08205f4d44cab56435f72d363225afabfc78d544ffc.blob",
"createdAt": "2026-11-03T16:03:10.741Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/7e7f3fc2-c661-4072-9637-68d0540fabb0.txt"
},
{
"id": "b18ba7c4-27c5-4adf-b3ef-ac84887f2b1f",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "context-latest-tools",
"mediaType": "application/json",
"sha256": "5d58c9731e1decd0ade94f62366624493f1ba19e06f97bced111d7c17219aefc",
"bytes": 2439,
"relative": "5d/5d58c9731e1decd0ade94f62366624493f1ba19e06f97bced111d7c17219aefc.blob",
"createdAt": "2026-11-03T16:03:10.743Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/b18ba7c4-27c5-4adf-b3ef-ac84887f2b1f.txt"
},
{
"id": "c4d8b286-0c26-4bd9-b747-f71519bc3c6e",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "model-request",
"mediaType": "application/json",
"sha256": "2a52b0f0384e0cdc0f1c06262cc76b4bddda6076e78708aadc562d7e25799ee9",
"bytes": 30629,
"relative": "2a/2a52b0f0384e0cdc0f1c06262cc76b4bddda6076e78708aadc562d7e25799ee9.blob",
"createdAt": "2026-11-03T16:03:10.745Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/c4d8b286-0c26-4bd9-b747-f71519bc3c6e.txt"
},
{
"id": "8e29eeb7-d7af-416d-b6d1-9e1fa137c52f",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "context-plan",
"mediaType": "application/json",
"sha256": "cf792aceebc1b016876013d0de3bbd2fc564ee5f68d2a264bc88f9eab656ce85",
"bytes": 2685,
"relative": "cf/cf792aceebc1b016876013d0de3bbd2fc564ee5f68d2a264bc88f9eab656ce85.blob",
"createdAt": "2026-11-03T16:03:10.748Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/8e29eeb7-d7af-416d-b6d1-9e1fa137c52f.txt"
},
{
"id": "74a5b7a9-63f8-4461-86b3-2b714913c173",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "model-attempt-request",
"mediaType": "application/json",
"sha256": "2a52b0f0384e0cdc0f1c06262cc76b4bddda6076e78708aadc562d7e25799ee9",
"bytes": 30629,
"relative": "2a/2a52b0f0384e0cdc0f1c06262cc76b4bddda6076e78708aadc562d7e25799ee9.blob",
"createdAt": "2026-11-03T16:03:10.756Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/74a5b7a9-63f8-4461-86b3-2b714913c173.txt"
},
{
"id": "ff695ec7-d614-43cc-b66a-aa5eb7cccd0b",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "model-http-response",
"mediaType": "text/plain",
"sha256": "68dc52dced4094e028096de34cab7c37396057a66de1f5570fa3ff037ebf193c",
"bytes": 2234,
"relative": "68/68dc52dced4094e028096de34cab7c37396057a66de1f5570fa3ff037ebf193c.blob",
"createdAt": "2026-11-03T16:03:24.808Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/ff695ec7-d614-43cc-b66a-aa5eb7cccd0b.txt"
},
{
"id": "76bcb2ca-ed02-4350-a3c3-cf096b8c5db1",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "check-log",
"mediaType": "text/plain",
"sha256": "7639f79b8acac27b60430ce91fc9d808d476dc3a21750216974abdf7d4de4abb",
"bytes": 9547,
"relative": "76/7639f79b8acac27b60430ce91fc9d808d476dc3a21750216974abdf7d4de4abb.blob",
"createdAt": "2026-11-03T16:03:26.100Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/76bcb2ca-ed02-4350-a3c3-cf096b8c5db1.txt"
},
{
"id": "14f364b4-0e7f-4d89-b1c3-01ce91e6b199",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "check-log",
"mediaType": "text/plain",
"sha256": "6dcc686eebcece6596143099d9b2feb1b5790fd25434ed127d36f0cbb29c8005",
"bytes": 71,
"relative": "6d/6dcc686eebcece6596143099d9b2feb1b5790fd25434ed127d36f0cbb29c8005.blob",
"createdAt": "2026-11-03T16:03:26.698Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/14f364b4-0e7f-4d89-b1c3-01ce91e6b199.txt"
},
{
"id": "429cb3fc-9a14-47e0-b76a-bccf8e1d91aa",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "tool-result",
"mediaType": "application/json",
"sha256": "97efae78071d2b6ae7ea73df122707bd7d286a669ed6ca2774df3c24cf967c15",
"bytes": 9226,
"relative": "97/97efae78071d2b6ae7ea73df122707bd7d286a669ed6ca2774df3c24cf967c15.blob",
"createdAt": "2026-11-03T16:03:27.772Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/429cb3fc-9a14-47e0-b76a-bccf8e1d91aa.txt"
},
{
"id": "08ef671d-dbda-4a53-846e-6d14b1a15b3d",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "tool-result",
"mediaType": "application/json",
"sha256": "55a48762ac74d0be73e09fb91c59e28a649b93a0802a016d31cd99a8bee0514e",
"bytes": 891,
"relative": "55/55a48762ac74d0be73e09fb91c59e28a649b93a0802a016d31cd99a8bee0514e.blob",
"createdAt": "2026-11-03T16:03:27.790Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/08ef671d-dbda-4a53-846e-6d14b1a15b3d.txt"
},
{
"id": "d3ac2079-98b6-4ca4-a1d7-07187d38e71b",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "tool-result",
"mediaType": "application/json",
"sha256": "08b6595803497876c0745e6f72fab5d5a5233864e2f6447608b51adc2b7ddcf1",
"bytes": 451,
"relative": "08/08b6595803497876c0745e6f72fab5d5a5233864e2f6447608b51adc2b7ddcf1.blob",
"createdAt": "2026-11-03T16:03:27.805Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/d3ac2079-98b6-4ca4-a1d7-07187d38e71b.txt"
},
{
"id": "80102911-4a35-4cd0-a016-1a018f48f8ab",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "tool-result",
"mediaType": "application/json",
"sha256": "17ea0f01e00d78ced1813dd906e6ef4b14de864d14467d17538674fda3be87af",
"bytes": 495,
"relative": "17/17ea0f01e00d78ced1813dd906e6ef4b14de864d14467d17538674fda3be87af.blob",
"createdAt": "2026-11-03T16:03:27.820Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/80102911-4a35-4cd0-a016-1a018f48f8ab.txt"
},
{
"id": "4f5dd2b2-b8f2-450a-8857-64ace056701a",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "tool-result",
"mediaType": "application/json",
"sha256": "4cdaf349f368e66ecb05754fd3146c6b097426dee6f0d9b363480b79fbde897d",
"bytes": 452,
"relative": "4c/4cdaf349f368e66ecb05754fd3146c6b097426dee6f0d9b363480b79fbde897d.blob",
"createdAt": "2026-11-03T16:03:27.835Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/4f5dd2b2-b8f2-450a-8857-64ace056701a.txt"
},
{
"id": "70bce812-4050-431c-b36d-8886381b5018",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "task-plan",
"mediaType": "application/json",
"sha256": "9a5ac7c48fd0ca959f4573d28b340dd6e89251ab770069f88fe7098cd8ba9bc5",
"bytes": 2564,
"relative": "9a/9a5ac7c48fd0ca959f4573d28b340dd6e89251ab770069f88fe7098cd8ba9bc5.blob",
"createdAt": "2026-11-03T16:03:27.858Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/70bce812-4050-431c-b36d-8886381b5018.txt"
},
{
"id": "fc5be6e2-20a6-4d33-8d3d-6935e206945f",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "tool-result",
"mediaType": "application/json",
"sha256": "952d62b85f84e6cdd6d1c30839b469032fa5085c1a545457103844ee5329d3dc",
"bytes": 933,
"relative": "95/952d62b85f84e6cdd6d1c30839b469032fa5085c1a545457103844ee5329d3dc.blob",
"createdAt": "2026-11-03T16:03:27.864Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/fc5be6e2-20a6-4d33-8d3d-6935e206945f.txt"
},
{
"id": "ee812673-93f5-4fd2-986b-562c60ff4934",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "context-group",
"mediaType": "application/json",
"sha256": "29480d466e81a22ac3733df06215d3650722f91e9020ca13d645bf1594e831bd",
"bytes": 1587,
"relative": "29/29480d466e81a22ac3733df06215d3650722f91e9020ca13d645bf1594e831bd.blob",
"createdAt": "2026-11-03T16:03:27.904Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/ee812673-93f5-4fd2-986b-562c60ff4934.txt"
},
{
"id": "c3c591d4-2d2e-4fdd-85dc-d07d03e4f3af",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "context-group",
"mediaType": "application/json",
"sha256": "e91427f653bbd0721b065b5a223d27267541bf9218c0d511b15090acccb9b979",
"bytes": 15454,
"relative": "e9/e91427f653bbd0721b065b5a223d27267541bf9218c0d511b15090acccb9b979.blob",
"createdAt": "2026-11-03T16:03:27.906Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/c3c591d4-2d2e-4fdd-85dc-d07d03e4f3af.txt"
},
{
"id": "82b30b44-a244-4dbc-9876-201a52be5c0d",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "context-history-index",
"mediaType": "application/json",
"sha256": "15c3587dab6135ab5f04560d65df10b4b30de21892b87e8796867c40cd37e3b8",
"bytes": 6058,
"relative": "15/15c3587dab6135ab5f04560d65df10b4b30de21892b87e8796867c40cd37e3b8.blob",
"createdAt": "2026-11-03T16:03:27.908Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/82b30b44-a244-4dbc-9876-201a52be5c0d.txt"
},
{
"id": "d273074f-e1dd-44d3-80ee-703c4248aeec",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "context-latest-tools",
"mediaType": "application/json",
"sha256": "8b792dab1edaaa0cfbb8a3d1033578eebb8c55ad7af61cbfae6d6c0f7599a971",
"bytes": 6141,
"relative": "8b/8b792dab1edaaa0cfbb8a3d1033578eebb8c55ad7af61cbfae6d6c0f7599a971.blob",
"createdAt": "2026-11-03T16:03:27.909Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/d273074f-e1dd-44d3-80ee-703c4248aeec.txt"
},
{
"id": "d4651a7d-3952-4495-99e5-ce471bbd90ec",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "model-request",
"mediaType": "application/json",
"sha256": "ce0456b5a24c90298b823e5ff4ae23df2756cff5eb0ceecde4115562fa6d01a2",
"bytes": 35303,
"relative": "ce/ce0456b5a24c90298b823e5ff4ae23df2756cff5eb0ceecde4115562fa6d01a2.blob",
"createdAt": "2026-11-03T16:03:27.912Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/d4651a7d-3952-4495-99e5-ce471bbd90ec.txt"
},
{
"id": "75b2284b-0796-4fff-bc7a-e84d9faffaa5",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "context-plan",
"mediaType": "application/json",
"sha256": "74c106df2e479ecdbde1b2a26688d4fb7ef21034e7a472df97246924c2774722",
"bytes": 2903,
"relative": "74/74c106df2e479ecdbde1b2a26688d4fb7ef21034e7a472df97246924c2774722.blob",
"createdAt": "2026-11-03T16:03:27.915Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/75b2284b-0796-4fff-bc7a-e84d9faffaa5.txt"
},
{
"id": "07f90a88-3c0d-427b-a2cf-4f4cbfda1cca",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "model-attempt-request",
"mediaType": "application/json",
"sha256": "ce0456b5a24c90298b823e5ff4ae23df2756cff5eb0ceecde4115562fa6d01a2",
"bytes": 35303,
"relative": "ce/ce0456b5a24c90298b823e5ff4ae23df2756cff5eb0ceecde4115562fa6d01a2.blob",
"createdAt": "2026-11-03T16:03:27.921Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/07f90a88-3c0d-427b-a2cf-4f4cbfda1cca.txt"
},
{
"id": "98156d56-2efe-4c60-bf92-b2cea508017f",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "model-http-response",
"mediaType": "text/plain",
"sha256": "6f11b37eb2ad7f0dce60eee13c084d851814cda6c9ea23cb1da51f1f39f86485",
"bytes": 844,
"relative": "6f/6f11b37eb2ad7f0dce60eee13c084d851814cda6c9ea23cb1da51f1f39f86485.blob",
"createdAt": "2026-11-03T16:04:35.562Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/98156d56-2efe-4c60-bf92-b2cea508017f.txt"
},
{
"id": "2f7a8793-ddc6-4f5e-8c03-20f388477df2",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "tool-result",
"mediaType": "application/json",
"sha256": "97a1466a183c119ef656ff43ed50e198ed623d1054ad368a651b4b9c1eb1b126",
"bytes": 869,
"relative": "97/97a1466a183c119ef656ff43ed50e198ed623d1054ad368a651b4b9c1eb1b126.blob",
"createdAt": "2026-11-03T16:04:35.600Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/2f7a8793-ddc6-4f5e-8c03-20f388477df2.txt"
},
{
"id": "aef90f94-cb66-46a0-8e61-bfafaee56d84",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "context-history-index",
"mediaType": "application/json",
"sha256": "f038f204ff596accb4304c74f1048b92d03cced4f4894146ce6828da78085a25",
"bytes": 6848,
"relative": "f0/f038f204ff596accb4304c74f1048b92d03cced4f4894146ce6828da78085a25.blob",
"createdAt": "2026-11-03T16:04:35.634Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/aef90f94-cb66-46a0-8e61-bfafaee56d84.txt"
},
{
"id": "0f7d4a29-9fc8-459d-a5e8-a33230bd5f1f",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "context-working-set",
"mediaType": "application/json",
"sha256": "467c9be261bd6c6acb596a4ff37a1c88930291d6e885d12562e472a9a5f01377",
"bytes": 3171,
"relative": "46/467c9be261bd6c6acb596a4ff37a1c88930291d6e885d12562e472a9a5f01377.blob",
"createdAt": "2026-11-03T16:04:35.635Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/0f7d4a29-9fc8-459d-a5e8-a33230bd5f1f.txt"
},
{
"id": "58e0e3b0-9637-426a-9e24-963030578fa7",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "model-request",
"mediaType": "application/json",
"sha256": "d9d29499817b20d3eea662b1a0dfa554e4a2294e67699d3991cfaa14d92791cf",
"bytes": 35191,
"relative": "d9/d9d29499817b20d3eea662b1a0dfa554e4a2294e67699d3991cfaa14d92791cf.blob",
"createdAt": "2026-11-03T16:04:35.638Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/58e0e3b0-9637-426a-9e24-963030578fa7.txt"
},
{
"id": "647ab922-e2c1-45c3-b6ea-695bf0165eb5",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "context-plan",
"mediaType": "application/json",
"sha256": "fd1e3cd3689c9d71c393244a5880fcf09b5e9b79790d2939b3584c7d29d50930",
"bytes": 3105,
"relative": "fd/fd1e3cd3689c9d71c393244a5880fcf09b5e9b79790d2939b3584c7d29d50930.blob",
"createdAt": "2026-11-03T16:04:35.641Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/647ab922-e2c1-45c3-b6ea-695bf0165eb5.txt"
},
{
"id": "44a37251-3a9a-4edb-8d29-dc0e7233aa70",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "model-attempt-request",
"mediaType": "application/json",
"sha256": "d9d29499817b20d3eea662b1a0dfa554e4a2294e67699d3991cfaa14d92791cf",
"bytes": 35191,
"relative": "d9/d9d29499817b20d3eea662b1a0dfa554e4a2294e67699d3991cfaa14d92791cf.blob",
"createdAt": "2026-11-03T16:04:35.647Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/44a37251-3a9a-4edb-8d29-dc0e7233aa70.txt"
},
{
"id": "ac7ccec4-04b8-44b0-8c59-53426f821746",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "model-http-response",
"mediaType": "text/plain",
"sha256": "81122976b73e350e26e16a6a8235a70a8ca407ea1a6f10c13aa23923d8606d88",
"bytes": 596,
"relative": "81/81122976b73e350e26e16a6a8235a70a8ca407ea1a6f10c13aa23923d8606d88.blob",
"createdAt": "2026-11-03T16:04:41.194Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/ac7ccec4-04b8-44b0-8c59-53426f821746.txt"
},
{
"id": "edf696bb-a422-480f-8bb7-9e26a3e617cf",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "tool-result",
"mediaType": "application/json",
"sha256": "bc72011d44f3ca02d4e9c86f81c03ce8a5e5b9fb0d4676cac1b81262a8581d6f",
"bytes": 880,
"relative": "bc/bc72011d44f3ca02d4e9c86f81c03ce8a5e5b9fb0d4676cac1b81262a8581d6f.blob",
"createdAt": "2026-11-03T16:04:41.232Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/edf696bb-a422-480f-8bb7-9e26a3e617cf.txt"
},
{
"id": "c0429e6a-022a-4d1b-8b3c-de181cf54e46",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "context-group",
"mediaType": "application/json",
"sha256": "86c5e31a8edbffa1c6e44bd4a4c71fcd8735ec79c10c3575b0f14b6b59d42e13",
"bytes": 1470,
"relative": "86/86c5e31a8edbffa1c6e44bd4a4c71fcd8735ec79c10c3575b0f14b6b59d42e13.blob",
"createdAt": "2026-11-03T16:04:41.266Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/c0429e6a-022a-4d1b-8b3c-de181cf54e46.txt"
},
{
"id": "b573c384-4209-4601-b52f-a48c05f91e9b",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "context-history-index",
"mediaType": "application/json",
"sha256": "8576989a99a24d177bb821739cc072ea8cefee82555cab8ec1da282ce071eb3b",
"bytes": 7778,
"relative": "85/8576989a99a24d177bb821739cc072ea8cefee82555cab8ec1da282ce071eb3b.blob",
"createdAt": "2026-11-03T16:04:41.268Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/b573c384-4209-4601-b52f-a48c05f91e9b.txt"
},
{
"id": "f7b44e79-c416-407f-99ee-a52b1bc57324",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "context-working-set",
"mediaType": "application/json",
"sha256": "9290a183c13ae309ce111944b014854e870484256bf7081872b806e6079a8089",
"bytes": 4264,
"relative": "92/9290a183c13ae309ce111944b014854e870484256bf7081872b806e6079a8089.blob",
"createdAt": "2026-11-03T16:04:41.269Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/f7b44e79-c416-407f-99ee-a52b1bc57324.txt"
},
{
"id": "5e794717-dccf-4d67-b820-e68c618f8e79",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "model-request",
"mediaType": "application/json",
"sha256": "6b583d65aeabf5dc7280ed36d3b7536d27dba154dc2369ca3b78a5c0acd36d75",
"bytes": 35808,
"relative": "6b/6b583d65aeabf5dc7280ed36d3b7536d27dba154dc2369ca3b78a5c0acd36d75.blob",
"createdAt": "2026-11-03T16:04:41.272Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/5e794717-dccf-4d67-b820-e68c618f8e79.txt"
},
{
"id": "6e92be61-972c-4d0a-a8ab-f99e44e3f729",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "context-plan",
"mediaType": "application/json",
"sha256": "d82b940c92e6d90af7cf0aaf530514758219c16201e5cc39a948a9c262c89f59",
"bytes": 3302,
"relative": "d8/d82b940c92e6d90af7cf0aaf530514758219c16201e5cc39a948a9c262c89f59.blob",
"createdAt": "2026-11-03T16:04:41.274Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/6e92be61-972c-4d0a-a8ab-f99e44e3f729.txt"
},
{
"id": "e9bff77e-9417-4ecc-91cf-7994127e51b9",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "model-attempt-request",
"mediaType": "application/json",
"sha256": "6b583d65aeabf5dc7280ed36d3b7536d27dba154dc2369ca3b78a5c0acd36d75",
"bytes": 35808,
"relative": "6b/6b583d65aeabf5dc7280ed36d3b7536d27dba154dc2369ca3b78a5c0acd36d75.blob",
"createdAt": "2026-11-03T16:04:41.281Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/e9bff77e-9417-4ecc-91cf-7994127e51b9.txt"
},
{
"id": "f285f468-e077-44e5-b2e7-9d79515e3844",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "model-http-response",
"mediaType": "text/plain",
"sha256": "8c39c2a86cedd3edfb8ff2612bc7c9f347d6984242d7bf030f5b1a47964f3304",
"bytes": 722,
"relative": "8c/8c39c2a86cedd3edfb8ff2612bc7c9f347d6984242d7bf030f5b1a47964f3304.blob",
"createdAt": "2026-11-03T16:04:47.745Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/f285f468-e077-44e5-b2e7-9d79515e3844.txt"
},
{
"id": "10b394db-47e8-43b7-8622-274660e3bbec",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "tool-result",
"mediaType": "application/json",
"sha256": "aae0745c80c0a0eb7489c0a23e29e829c6d896852a3df709415e8cd8af784174",
"bytes": 878,
"relative": "aa/aae0745c80c0a0eb7489c0a23e29e829c6d896852a3df709415e8cd8af784174.blob",
"createdAt": "2026-11-03T16:04:47.789Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/10b394db-47e8-43b7-8622-274660e3bbec.txt"
},
{
"id": "0df37a5d-c38b-4591-9370-d72d2049a2b3",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "context-group",
"mediaType": "application/json",
"sha256": "1ce43f17b376532dbe71a9a2c0369762cc49568d94859059897776b462920873",
"bytes": 1276,
"relative": "1c/1ce43f17b376532dbe71a9a2c0369762cc49568d94859059897776b462920873.blob",
"createdAt": "2026-11-03T16:04:47.826Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/0df37a5d-c38b-4591-9370-d72d2049a2b3.txt"
},
{
"id": "f16a9f47-5c55-4364-bc48-bc27292d3a94",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "context-history-index",
"mediaType": "application/json",
"sha256": "b02b5e6866524127baee14cfa0a6afa01b7e954a61e890014a780bd5b379595e",
"bytes": 8709,
"relative": "b0/b02b5e6866524127baee14cfa0a6afa01b7e954a61e890014a780bd5b379595e.blob",
"createdAt": "2026-11-03T16:04:47.827Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/f16a9f47-5c55-4364-bc48-bc27292d3a94.txt"
},
{
"id": "303695ff-de3d-495e-a106-1eb2d1c25288",
"sessionId": "966d83cb-d1d7-44b7-be53-9d850270e34e",
"projectId": "45aa4368-bd4f-4a43-8785-3853fe0c9eb1",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"kind": "context-working-set",
"mediaType": "application/json",
"sha256": "1aae4739def15905e327991c651d8ee49231c081fad9af4d41fe4456d2824689",
"bytes": 4132,
"relative": "1a/1aae4739def15905e327991c651d8ee49231c081fad9af4d41fe4456d2824689.blob",
"createdAt": "2026-11-03T16:04:47.829Z",
"status": "stored",
"capturedPath": "analysis/artifacts/966d83cb-d1d7-44b7-be53-9d850270e34e/303695ff-de3d-495e-a106-1eb2d1c25288.txt"
}
],
"scope": "Every owned artifact record, fetched read-only through the original API and checked against its original SHA and bytes; no old/user artifact contents exported."
}
@@ -0,0 +1 @@
{"model":"gpt-6.1-sol","messages":[{"role":"system","content":"This is a connection identity preflight. Reply to the user exactly. No tools are available. Do not perform any project work."},{"role":"user","content":"这是独立GPT连接身份预检,不是工程任务。只回复 OK 9b29c97d-d23b-4781-8066-c597e53b3253,不要调用工具、读写文件或执行命令。"}],"tools":[],"tool_choice":"auto","max_tokens":256,"stream":false}
@@ -0,0 +1 @@
{"id":"resp_0d0d12a5ac6b9eb7016aea057347248196bd0a5f4fce51e9fc","object":"chat.completion","created":1793721716,"model":"gpt-6.1-sol","choices":[{"index":0,"message":{"role":"assistant","content":"OK 9b29c97d-d23b-4781-8066-c597e53b3253"},"finish_reason":"stop"}],"usage":{"prompt_tokens":4464,"completion_tokens":28,"total_tokens":4492},"service_tier":"default"}
@@ -0,0 +1 @@
{"schemaVersion":1,"id":"96525581-2613-46f8-b31e-26da56e502b2","sessionId":"927220f9-449f-476f-b847-0bd58916f204","projectId":"5ca4d319-8ff7-4d8c-a49f-94641a16b777","taskId":"4bef8a00-e894-44c7-a8f1-16278404a090","runId":"fd74d64f-ceae-4f32-877b-6d432bdee38e","stepId":"a4003c4a-ebd3-449c-a038-38005664c812","requestIndex":1,"status":"prepared","createdAt":"2026-11-03T16:01:51.945Z","finishedAt":null,"requestSha256":"c86b749f624bde38a2dda8a67423a41ca46b2d0cfa82b94783f6f2453dd93e7a","requestBytes":444,"estimatedInputTokens":164,"requestArtifactId":"5f66a4c0-4b8e-47b0-92e3-460690aac391","tokenReservation":{"schemaVersion":1,"method":"observed-route-max-v1","overheadTokens":0,"reservedTokens":420,"routes":[{"connectionId":"5b4daed9-b2f7-4de0-b949-573eba70c7b3","model":"gpt-6.1-sol","protocol":"chat-completions","endpoint":"https://jojocode.com/v1","localInputTokens":164,"outputReservation":256,"inputRatio":1,"observedOutputTokens":256,"observedTotalFloor":0,"reservedTokens":420,"sources":[]}]},"maxBudgetAttempts":8,"estimateMethod":"utf8-third-plus-framing-v1","beforeInputTokens":164,"beforeBytes":444,"budget":{"contextLimit":16000,"outputReservation":256,"safetyTokens":1600,"inputBudget":14144,"targetInputTokens":14144,"runRemainingTokens":16000,"taskRemainingTokens":16000,"limitingReason":"context_limit"},"mandatoryInputTokens":164,"nextReadFixedInputTokens":164,"workingRetentionTokens":0,"workingRetentionPolicyVersion":1,"originalMessages":1,"retainedMessages":1,"archivedGroups":0,"retainedGroups":[0],"historyIndexArtifactId":null,"historyIndexSha256":null,"actualUsage":null,"workingSetArtifactId":null,"workingSetSha256":null,"workingSetEntries":0,"workingSetViewVersion":2,"latestToolsArtifactId":null,"latestToolsSha256":null,"latestToolsEntries":0,"projectMemoryArtifactId":null,"projectMemorySha256":null,"projectMemoryEntries":0,"skillCatalogArtifactId":null,"skillCatalogSha256":null,"skillCatalogEntries":0,"mcpCatalogArtifactId":null,"mcpCatalogSha256":null,"mcpCatalogEntries":0,"requestAttempts":0,"responseSha256":null,"source":"workbench"}
@@ -0,0 +1 @@
{"model":"gpt-6.1-sol","messages":[{"role":"system","content":"This is a connection identity preflight. Reply to the user exactly. No tools are available. Do not perform any project work."},{"role":"user","content":"这是独立GPT连接身份预检,不是工程任务。只回复 OK 9b29c97d-d23b-4781-8066-c597e53b3253,不要调用工具、读写文件或执行命令。"}],"tools":[],"tool_choice":"auto","max_tokens":256,"stream":false}
@@ -0,0 +1 @@
{"path":"test/expense.test.mjs","start_line":1,"end_line":9,"total_lines":38,"content":"import test from 'node:test';\nimport assert from 'node:assert/strict';\nimport { amountToCents } from '../src/amount.mjs';\nimport { summarize } from '../src/summary.mjs';\nimport { formatReport } from '../src/report.mjs';\ntest('decimal strings become exact cents including zero and refunds',()=>{\n for(const [input,expected] of [['0',0],[' 12.34 ',1234],['+2.5',250],['-1.05',-105],['-0.00',0],['0009.10',910]]) assert.equal(amountToCents(input),expected);\n});\ntest('finite ","sha256":"0bcda551dbaeafad9a6e3df8024492ab67d7c09956f4676c393b78249ab44839","bom":false,"truncated":true,"range_start_line":1,"range_end_line":38,"offset":0,"next_offset":473,"total_characters":2584,"returned_characters":473,"requested_offset":0,"next_start_line":null,"budget_limited":true,"maximum_message_bytes":1024}
@@ -0,0 +1 @@
[{"role":"assistant","content":"","tool_calls":[{"id":"call_af5be81749ee49dca7da85970eb44792","type":"function","function":{"name":"read_file","arguments":"{\"path\":\"test/expense.test.mjs\",\"start_line\":1,\"end_line\":38,\"offset\":473,\"limit\":16000}"}}]},{"role":"tool","tool_call_id":"call_af5be81749ee49dca7da85970eb44792","content":"{\"path\":\"test/expense.test.mjs\",\"start_line\":9,\"end_line\":13,\"total_lines\":38,\"content\":\"decimal numbers use the same cents contract',()=>{\\n for(const [input,expected] of [[0,0],[1.01,101],[2.5,250],[-4.32,-432]]) assert.equal(amountToCents(input),expected);\\n});\\ntest('malformed overprecision nonfinite and unsafe amounts are rejected',()=>{\\n for(const input of ['',null,undefined,true,{},'1e2','1,000','.50','1.234',1.234,NaN,Infinity,'900719925474099.99']) assert.throws(()=>amountToCent\",\"sha256\":\"0bcda551dbaeafad9a6e3df8024492ab67d7c09956f4676c393b78249ab44839\",\"bom\":false,\"truncated\":true,\"range_start_line\":1,\"range_end_line\":38,\"offset\":473,\"next_offset\":875,\"total_characters\":2584,\"returned_characters\":402,\"requested_offset\":473,\"next_start_line\":null,\"budget_limited\":true,\"maximum_message_bytes\":949,\"tool_invocation_id\":\"4f23d490-0097-4f20-ba50-55dc9397f5b1\"}"}]
@@ -0,0 +1 @@
{"schemaVersion":1,"kind":"task-working-set","sessionId":"966d83cb-d1d7-44b7-be53-9d850270e34e","projectId":"45aa4368-bd4f-4a43-8785-3853fe0c9eb1","taskId":"e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4","semantics":"recorded-tool-observations; file hashes identify observed revisions, not current filesystem guarantees","entries":[{"source":{"call_id":"call_f176269371cb43cb8e84405827e371da","invocation_id":"1eb74fbb-f596-4cee-bf20-454faaa88f43","tool":"read_file","run_id":"cf10d58a-d3af-4b03-9bef-77fb54837878","group_index":3,"group_sha256":"e91427f653bbd0721b065b5a223d27267541bf9218c0d511b15090acccb9b979","result_artifact_id":"d3ac2079-98b6-4ca4-a1d7-07187d38e71b","result_sha256":"08b6595803497876c0745e6f72fab5d5a5233864e2f6447608b51adc2b7ddcf1","observed_at":"2026-11-03T16:03:27.805Z"},"observation":{"kind":"file","path":"src/amount.mjs","sha256":"84cb647328ec52dad27d288f3a6127ff3e1ad87274ae2d227ad44daa49cbb2ed","start_line":1,"end_line":2,"offset":0,"next_offset":51,"range_start_line":1,"range_end_line":2},"content":"export function amountToCents(value) { return 0; }\n","content_offset":0,"next_content_offset":51,"total_content_characters":51,"truncated":false,"content_sha256":"84cb647328ec52dad27d288f3a6127ff3e1ad87274ae2d227ad44daa49cbb2ed"},{"source":{"call_id":"call_9dd4b7eae754462ba817cb0f9aa3279e","invocation_id":"225e9bb2-288a-4a85-8280-9e1f18ba9c72","tool":"read_file","run_id":"cf10d58a-d3af-4b03-9bef-77fb54837878","group_index":3,"group_sha256":"e91427f653bbd0721b065b5a223d27267541bf9218c0d511b15090acccb9b979","result_artifact_id":"4f5dd2b2-b8f2-450a-8857-64ace056701a","result_sha256":"4cdaf349f368e66ecb05754fd3146c6b097426dee6f0d9b363480b79fbde897d","observed_at":"2026-11-03T16:03:27.835Z"},"observation":{"kind":"file","path":"src/report.mjs","sha256":"ba0a014e6e9df710d66e255a3a6f970f4e1c8af48accc81f33627029dcded7c0","start_line":1,"end_line":2,"offset":0,"next_offset":52,"range_start_line":1,"range_end_line":2},"content":"export function formatReport(groups) { return ''; }\n","content_offset":0,"next_content_offset":52,"total_content_characters":52,"truncated":false,"content_sha256":"ba0a014e6e9df710d66e255a3a6f970f4e1c8af48accc81f33627029dcded7c0"},{"source":{"call_id":"call_1785559bc022498c8f40a605cb7a3197","invocation_id":"0544be23-adeb-42ab-852b-eeefb7058421","tool":"read_file","run_id":"cf10d58a-d3af-4b03-9bef-77fb54837878","group_index":3,"group_sha256":"e91427f653bbd0721b065b5a223d27267541bf9218c0d511b15090acccb9b979","result_artifact_id":"80102911-4a35-4cd0-a016-1a018f48f8ab","result_sha256":"17ea0f01e00d78ced1813dd906e6ef4b14de864d14467d17538674fda3be87af","observed_at":"2026-11-03T16:03:27.820Z"},"observation":{"kind":"file","path":"src/summary.mjs","sha256":"48829850c11ca0cd0ab5e86bbac69a0c5f90297292168c1ba6dc338e2eae6ee7","start_line":1,"end_line":3,"offset":0,"next_offset":93,"range_start_line":1,"range_end_line":3},"content":"import { amountToCents } from './amount.mjs';\nexport function summarize(rows) { return []; }\n","content_offset":0,"next_content_offset":93,"total_content_characters":93,"truncated":false,"content_sha256":"48829850c11ca0cd0ab5e86bbac69a0c5f90297292168c1ba6dc338e2eae6ee7"}]}
@@ -0,0 +1 @@
{"path":"test/expense.test.mjs","start_line":13,"end_line":19,"total_lines":38,"content":"s(input),TypeError,String(input));\n});\ntest('independent currencies are sorted and summed without floating point loss',()=>{\n assert.deepEqual(summarize([{currency:'usd',amount:'0.10'},{currency:' CNY ',amount:3},{currency:'USD',amount:'0.20'}]),[\n {currency:'CNY',cents:300,count:1},{currency:'USD',cents:30,count:2}]);\n});\ntest('refunds cancel totals while counting every original record',(","sha256":"0bcda551dbaeafad9a6e3df8024492ab67d7c09956f4676c393b78249ab44839","bom":false,"truncated":true,"range_start_line":1,"range_end_line":38,"offset":875,"next_offset":1271,"total_characters":2584,"returned_characters":396,"requested_offset":875,"next_start_line":null,"budget_limited":true,"maximum_message_bytes":949,"tool_invocation_id":"12807636-04f3-4687-803d-e53897d0550e"}
@@ -0,0 +1,5 @@
> build
> node scripts/build.mjs
All three business modules compile.
@@ -0,0 +1 @@
{"artifact_id":"08ef671d-dbda-4a53-846e-6d14b1a15b3d","kind":"tool-result","sha256":"55a48762ac74d0be73e09fb91c59e28a649b93a0802a016d31cd99a8bee0514e","content":"{\"path\":\"test/expense.test.mjs\",\"start_line\":1,\"end_line\":9,\"total_lines\":38,\"content\":\"import test from 'node:test';\\nimport assert from 'node:assert/strict';\\nimport { amountToCents } from '../src/amount.mjs';\\nimport { summarize } from '../src/summary.mjs';\\nimport { formatReport } from '../src/report.mjs';\\ntest('decimal strings become exact cents including zero and refunds',()=>{\\n for(const [input,expected] of [['0',0],[' 12.34 ',1234],['+2.5',250],['-1.05',-105],['-0.00',0],['0009.1","offset":0,"next_offset":495,"returned_characters":495,"total_characters":891,"truncated":true,"requested_offset":0,"requested_limit":16000,"budget_limited":true,"maximum_message_bytes":1024}
@@ -0,0 +1 @@
{"schemaVersion":1,"kind":"task-working-set","sessionId":"966d83cb-d1d7-44b7-be53-9d850270e34e","projectId":"45aa4368-bd4f-4a43-8785-3853fe0c9eb1","taskId":"e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4","semantics":"recorded-tool-observations; file hashes identify observed revisions, not current filesystem guarantees","entries":[{"source":{"call_id":"call_f176269371cb43cb8e84405827e371da","invocation_id":"1eb74fbb-f596-4cee-bf20-454faaa88f43","tool":"read_file","run_id":"cf10d58a-d3af-4b03-9bef-77fb54837878","group_index":3,"group_sha256":"e91427f653bbd0721b065b5a223d27267541bf9218c0d511b15090acccb9b979","result_artifact_id":"d3ac2079-98b6-4ca4-a1d7-07187d38e71b","result_sha256":"08b6595803497876c0745e6f72fab5d5a5233864e2f6447608b51adc2b7ddcf1","observed_at":"2026-11-03T16:03:27.805Z"},"observation":{"kind":"file","path":"src/amount.mjs","sha256":"84cb647328ec52dad27d288f3a6127ff3e1ad87274ae2d227ad44daa49cbb2ed","start_line":1,"end_line":2,"offset":0,"next_offset":51,"range_start_line":1,"range_end_line":2},"content":"export function amountToCents(value) { return 0; }\n","content_offset":0,"next_content_offset":51,"total_content_characters":51,"truncated":false,"content_sha256":"84cb647328ec52dad27d288f3a6127ff3e1ad87274ae2d227ad44daa49cbb2ed"},{"source":{"call_id":"call_9dd4b7eae754462ba817cb0f9aa3279e","invocation_id":"225e9bb2-288a-4a85-8280-9e1f18ba9c72","tool":"read_file","run_id":"cf10d58a-d3af-4b03-9bef-77fb54837878","group_index":3,"group_sha256":"e91427f653bbd0721b065b5a223d27267541bf9218c0d511b15090acccb9b979","result_artifact_id":"4f5dd2b2-b8f2-450a-8857-64ace056701a","result_sha256":"4cdaf349f368e66ecb05754fd3146c6b097426dee6f0d9b363480b79fbde897d","observed_at":"2026-11-03T16:03:27.835Z"},"observation":{"kind":"file","path":"src/report.mjs","sha256":"ba0a014e6e9df710d66e255a3a6f970f4e1c8af48accc81f33627029dcded7c0","start_line":1,"end_line":2,"offset":0,"next_offset":52,"range_start_line":1,"range_end_line":2},"content":"export function formatReport(groups) { return ''; }\n","content_offset":0,"next_content_offset":52,"total_content_characters":52,"truncated":false,"content_sha256":"ba0a014e6e9df710d66e255a3a6f970f4e1c8af48accc81f33627029dcded7c0"},{"source":{"call_id":"call_1785559bc022498c8f40a605cb7a3197","invocation_id":"0544be23-adeb-42ab-852b-eeefb7058421","tool":"read_file","run_id":"cf10d58a-d3af-4b03-9bef-77fb54837878","group_index":3,"group_sha256":"e91427f653bbd0721b065b5a223d27267541bf9218c0d511b15090acccb9b979","result_artifact_id":"80102911-4a35-4cd0-a016-1a018f48f8ab","result_sha256":"17ea0f01e00d78ced1813dd906e6ef4b14de864d14467d17538674fda3be87af","observed_at":"2026-11-03T16:03:27.820Z"},"observation":{"kind":"file","path":"src/summary.mjs","sha256":"48829850c11ca0cd0ab5e86bbac69a0c5f90297292168c1ba6dc338e2eae6ee7","start_line":1,"end_line":3,"offset":0,"next_offset":93,"range_start_line":1,"range_end_line":3},"content":"import { amountToCents } from './amount.mjs';\nexport function summarize(rows) { return []; }\n","content_offset":0,"next_content_offset":93,"total_content_characters":93,"truncated":false,"content_sha256":"48829850c11ca0cd0ab5e86bbac69a0c5f90297292168c1ba6dc338e2eae6ee7"},{"source":{"call_id":"call_157515febdb04454bb6c27a759fe9268","invocation_id":"e0c32321-99f2-48ad-8746-f548cf372ada","tool":"read_file","run_id":"cf10d58a-d3af-4b03-9bef-77fb54837878","group_index":3,"group_sha256":"e91427f653bbd0721b065b5a223d27267541bf9218c0d511b15090acccb9b979","result_artifact_id":"08ef671d-dbda-4a53-846e-6d14b1a15b3d","result_sha256":"55a48762ac74d0be73e09fb91c59e28a649b93a0802a016d31cd99a8bee0514e","observed_at":"2026-11-03T16:03:27.790Z"},"observation":{"kind":"file","path":"test/expense.test.mjs","sha256":"0bcda551dbaeafad9a6e3df8024492ab67d7c09956f4676c393b78249ab44839","start_line":1,"end_line":9,"offset":0,"next_offset":473,"range_start_line":1,"range_end_line":38},"content":"import test from 'node:test';\nimport assert from 'node:assert/strict'","content_offset":0,"next_content_offset":69,"total_content_characters":473,"truncated":true,"content_sha256":"2af1ff8d3923832203e70d5a3b23670dc2f97021eb7ec1e15cc209f872b0b9f6"}]}
@@ -0,0 +1 @@
{"schemaVersion":1,"id":"37fc50ae-d4f3-44ae-89d4-a697d61c033b","sessionId":"966d83cb-d1d7-44b7-be53-9d850270e34e","projectId":"45aa4368-bd4f-4a43-8785-3853fe0c9eb1","taskId":"e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4","runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","stepId":"5430d094-e16f-42f0-8bf4-37eb99189d0f","requestIndex":2,"status":"prepared","createdAt":"2026-11-03T16:03:01.439Z","finishedAt":null,"requestSha256":"26d9dad553840ab18b7ec8d51a3f871bfef10bac5b16ca8422438c30943b2a25","requestBytes":25899,"estimatedInputTokens":9033,"requestArtifactId":"535ca4ec-b28e-4b90-af68-aa27192a5b1b","tokenReservation":{"schemaVersion":1,"method":"observed-route-max-v1","overheadTokens":0,"reservedTokens":11081,"routes":[{"connectionId":"5b4daed9-b2f7-4de0-b949-573eba70c7b3","model":"gpt-6.1-sol","protocol":"chat-completions","endpoint":"https://jojocode.com/v1","localInputTokens":9033,"outputReservation":2048,"inputRatio":1,"observedOutputTokens":2048,"observedTotalFloor":4834,"reservedTokens":11081,"sources":[{"runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","attemptId":"dcb342bf-a983-4124-8f3a-9dd84fbf40a5","localInputTokens":8093,"reportedInputTokens":4820,"reportedOutputTokens":14,"totalTokens":4834}]}]},"maxBudgetAttempts":7,"estimateMethod":"utf8-third-plus-framing-v1","beforeInputTokens":9033,"beforeBytes":25899,"budget":{"contextLimit":16000,"outputReservation":2048,"safetyTokens":1600,"inputBudget":12352,"targetInputTokens":12352,"runRemainingTokens":85166,"taskRemainingTokens":85166,"limitingReason":"context_limit"},"mandatoryInputTokens":9077,"nextReadFixedInputTokens":8762,"workingRetentionTokens":0,"workingRetentionPolicyVersion":1,"originalMessages":3,"retainedMessages":3,"archivedGroups":0,"retainedGroups":[0,1],"historyIndexArtifactId":null,"historyIndexSha256":null,"actualUsage":null,"workingSetArtifactId":null,"workingSetSha256":null,"workingSetEntries":0,"workingSetViewVersion":2,"latestToolsArtifactId":null,"latestToolsSha256":null,"latestToolsEntries":0,"projectMemoryArtifactId":null,"projectMemorySha256":null,"projectMemoryEntries":0,"skillCatalogArtifactId":null,"skillCatalogSha256":null,"skillCatalogEntries":0,"mcpCatalogArtifactId":null,"mcpCatalogSha256":null,"mcpCatalogEntries":0,"requestAttempts":0,"responseSha256":null,"source":"workbench"}
@@ -0,0 +1 @@
{"path":"src/report.mjs","start_line":1,"end_line":2,"total_lines":2,"content":"export function formatReport(groups) { return ''; }\n","sha256":"ba0a014e6e9df710d66e255a3a6f970f4e1c8af48accc81f33627029dcded7c0","bom":false,"truncated":false,"range_start_line":1,"range_end_line":2,"offset":0,"next_offset":52,"total_characters":52,"returned_characters":52,"requested_offset":0,"next_start_line":null,"budget_limited":false,"maximum_message_bytes":1024}
@@ -0,0 +1 @@
{"schemaVersion":1,"id":"ab87c61f-1d9a-4f59-95cd-f773ad611777","sessionId":"966d83cb-d1d7-44b7-be53-9d850270e34e","projectId":"45aa4368-bd4f-4a43-8785-3853fe0c9eb1","taskId":"e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4","runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","stepId":"77a14e4a-8a49-4139-95b9-87c7d0eb3b39","requestIndex":5,"status":"prepared","createdAt":"2026-11-03T16:04:35.638Z","finishedAt":null,"requestSha256":"d9d29499817b20d3eea662b1a0dfa554e4a2294e67699d3991cfaa14d92791cf","requestBytes":35191,"estimatedInputTokens":12147,"requestArtifactId":"58e0e3b0-9637-426a-9e24-963030578fa7","tokenReservation":{"schemaVersion":1,"method":"observed-route-max-v1","overheadTokens":0,"reservedTokens":29166,"routes":[{"connectionId":"5b4daed9-b2f7-4de0-b949-573eba70c7b3","model":"gpt-6.1-sol","protocol":"chat-completions","endpoint":"https://jojocode.com/v1","localInputTokens":12147,"outputReservation":2048,"inputRatio":2.23241288625904,"observedOutputTokens":2048,"observedTotalFloor":27467,"reservedTokens":29166,"sources":[{"runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","attemptId":"dcb342bf-a983-4124-8f3a-9dd84fbf40a5","localInputTokens":8093,"reportedInputTokens":4820,"reportedOutputTokens":14,"totalTokens":4834},{"runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","attemptId":"19f33d0d-9344-4b27-a6b9-556bb8a3797d","localInputTokens":9033,"reportedInputTokens":6661,"reportedOutputTokens":49,"totalTokens":6710},{"runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","attemptId":"53337890-31fe-4261-9604-c9ffff6139c3","localInputTokens":10626,"reportedInputTokens":11387,"reportedOutputTokens":387,"totalTokens":11774},{"runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","attemptId":"23226d1c-9ad6-4daa-81f5-1b44f0d57ecc","localInputTokens":12168,"reportedInputTokens":27164,"reportedOutputTokens":303,"totalTokens":27467}]}]},"maxBudgetAttempts":1,"estimateMethod":"utf8-third-plus-framing-v1","beforeInputTokens":19864,"beforeBytes":58103,"budget":{"contextLimit":16000,"outputReservation":2048,"safetyTokens":1600,"inputBudget":12352,"targetInputTokens":12352,"runRemainingTokens":39215,"taskRemainingTokens":39215,"limitingReason":"context_limit"},"mandatoryInputTokens":11246,"nextReadFixedInputTokens":10710,"workingRetentionTokens":931,"workingRetentionPolicyVersion":1,"originalMessages":15,"retainedMessages":3,"archivedGroups":3,"retainedGroups":[0,4],"historyIndexArtifactId":"aef90f94-cb66-46a0-8e61-bfafaee56d84","historyIndexSha256":"f038f204ff596accb4304c74f1048b92d03cced4f4894146ce6828da78085a25","actualUsage":null,"workingSetArtifactId":"0f7d4a29-9fc8-459d-a5e8-a33230bd5f1f","workingSetSha256":"467c9be261bd6c6acb596a4ff37a1c88930291d6e885d12562e472a9a5f01377","workingSetEntries":3,"workingSetViewVersion":2,"latestToolsArtifactId":null,"latestToolsSha256":null,"latestToolsEntries":0,"projectMemoryArtifactId":null,"projectMemorySha256":null,"projectMemoryEntries":0,"skillCatalogArtifactId":null,"skillCatalogSha256":null,"skillCatalogEntries":0,"mcpCatalogArtifactId":null,"mcpCatalogSha256":null,"mcpCatalogEntries":0,"requestAttempts":0,"responseSha256":null,"source":"workbench"}
@@ -0,0 +1 @@
{"schemaVersion":1,"id":"81bda9ce-e1a2-4580-99a5-e7b43fd4d22a","sessionId":"966d83cb-d1d7-44b7-be53-9d850270e34e","projectId":"45aa4368-bd4f-4a43-8785-3853fe0c9eb1","taskId":"e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4","runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","stepId":"6737cf39-2da9-4fbc-b71a-3e95837790e4","requestIndex":6,"status":"prepared","createdAt":"2026-11-03T16:04:41.272Z","finishedAt":null,"requestSha256":"6b583d65aeabf5dc7280ed36d3b7536d27dba154dc2369ca3b78a5c0acd36d75","requestBytes":35808,"estimatedInputTokens":12352,"requestArtifactId":"5e794717-dccf-4d67-b820-e68c618f8e79","tokenReservation":{"schemaVersion":1,"method":"observed-route-max-v1","overheadTokens":0,"reservedTokens":29623,"routes":[{"connectionId":"5b4daed9-b2f7-4de0-b949-573eba70c7b3","model":"gpt-6.1-sol","protocol":"chat-completions","endpoint":"https://jojocode.com/v1","localInputTokens":12352,"outputReservation":2048,"inputRatio":2.23241288625904,"observedOutputTokens":2048,"observedTotalFloor":27467,"reservedTokens":29623,"sources":[{"runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","attemptId":"dcb342bf-a983-4124-8f3a-9dd84fbf40a5","localInputTokens":8093,"reportedInputTokens":4820,"reportedOutputTokens":14,"totalTokens":4834},{"runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","attemptId":"19f33d0d-9344-4b27-a6b9-556bb8a3797d","localInputTokens":9033,"reportedInputTokens":6661,"reportedOutputTokens":49,"totalTokens":6710},{"runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","attemptId":"53337890-31fe-4261-9604-c9ffff6139c3","localInputTokens":10626,"reportedInputTokens":11387,"reportedOutputTokens":387,"totalTokens":11774},{"runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","attemptId":"23226d1c-9ad6-4daa-81f5-1b44f0d57ecc","localInputTokens":12168,"reportedInputTokens":27164,"reportedOutputTokens":303,"totalTokens":27467},{"runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","attemptId":"4ed9deb8-58e1-47e0-9585-48c4e644e68f","localInputTokens":12147,"reportedInputTokens":8619,"reportedOutputTokens":60,"totalTokens":8679}]}]},"maxBudgetAttempts":1,"estimateMethod":"utf8-third-plus-framing-v1","beforeInputTokens":20317,"beforeBytes":59415,"budget":{"contextLimit":16000,"outputReservation":2048,"safetyTokens":1600,"inputBudget":12352,"targetInputTokens":12352,"runRemainingTokens":30536,"taskRemainingTokens":30536,"limitingReason":"context_limit"},"mandatoryInputTokens":11247,"nextReadFixedInputTokens":10722,"workingRetentionTokens":931,"workingRetentionPolicyVersion":1,"originalMessages":17,"retainedMessages":3,"archivedGroups":4,"retainedGroups":[0,5],"historyIndexArtifactId":"b573c384-4209-4601-b52f-a48c05f91e9b","historyIndexSha256":"8576989a99a24d177bb821739cc072ea8cefee82555cab8ec1da282ce071eb3b","actualUsage":null,"workingSetArtifactId":"f7b44e79-c416-407f-99ee-a52b1bc57324","workingSetSha256":"9290a183c13ae309ce111944b014854e870484256bf7081872b806e6079a8089","workingSetEntries":4,"workingSetViewVersion":2,"latestToolsArtifactId":null,"latestToolsSha256":null,"latestToolsEntries":0,"projectMemoryArtifactId":null,"projectMemorySha256":null,"projectMemoryEntries":0,"skillCatalogArtifactId":null,"skillCatalogSha256":null,"skillCatalogEntries":0,"mcpCatalogArtifactId":null,"mcpCatalogSha256":null,"mcpCatalogEntries":0,"requestAttempts":0,"responseSha256":null,"source":"workbench"}
@@ -0,0 +1 @@
{"schemaVersion":1,"kind":"task-plan-contract","id":"92314189-a49f-45d4-903d-fbc45a704632","sessionId":"966d83cb-d1d7-44b7-be53-9d850270e34e","projectId":"45aa4368-bd4f-4a43-8785-3853fe0c9eb1","taskId":"e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4","runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","revision":1,"parentPlanId":null,"createdAt":"2026-11-03T16:03:27.857Z","requirements":{"goal":"修复这个Node费用报表工程的amount、summary、report三个模块。金额用精确分单位处理,接受测试约定的十进制字符串/有限数字、退款、0及空白;拒绝格式错误、超精度和不安全金额。按独立币种规范化/排序汇总并保留原数组,计数准确、安全求和,报表两位小数含负分金额。以原九项测试为完整契约。先inspect_project,再plan_checks选择[\"test\",\"build\"]并run_checks保留真实基线失败,读取原测试和相关源码。只允许修改src/amount.mjs、src/summary.mjs、src/report.mjs;不改测试、配置、README、构建脚本、owner文件或原暂存,不使用run_command,不直接提交Git。propose_file/propose_patch准备完整三个模块后,用prepare_change_set一次封存全部三文件,等待审查应用。应用后继续同一个Task,重新plan_checks/run_checks,通过原9项测试和build后,用plan_delivery为三个文件准备本地Git预览并等待确认。模型必须自己实现,禁止用口头完成替代检查。预算最多8次模型请求、90000tokens,输出2048,上下文16K,请合并独立工具调用并避免重复观察。","instructions":[],"constraints":[],"acceptance":[],"workspace":{"kind":"local-project","projectId":"45aa4368-bd4f-4a43-8785-3853fe0c9eb1","root":"D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\live-delivery-r\\node\\expense-project"}},"requirementsSha256":"d1077f9a4814698bc9e2079610ecc2d79bda290bd120106226c119916770a5d9","steps":[{"key":"contract","title":"读取原始测试及三个模块","criterion":"读取原九项测试和amount、summary、report源码,明确金额、汇总与输出契约","kind":"analysis","depends_on":[],"tools":["read_file"]},{"key":"fix","title":"三个模块统一审查应用","criterion":"仅三个授权模块的修复经统一批次审核应用","kind":"changes","depends_on":["contract"],"paths":["src/amount.mjs","src/report.mjs","src/summary.mjs"]},{"key":"validate","title":"验证九项测试及构建","criterion":"当前源码原9项测试全部通过且build成功","kind":"checks","depends_on":["fix"],"checks":["build","test"]}]}
@@ -0,0 +1 @@
{"schemaVersion":1,"id":"41ba3440-652b-4a3c-b75d-9ebfa3fb149a","sessionId":"966d83cb-d1d7-44b7-be53-9d850270e34e","projectId":"45aa4368-bd4f-4a43-8785-3853fe0c9eb1","taskId":"e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4","runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","stepId":"478cf392-22d1-4e4d-aaa6-7c56b72ce21a","requestIndex":1,"status":"prepared","createdAt":"2026-11-03T16:02:55.220Z","finishedAt":null,"requestSha256":"784af768d46b395d3ae42438f16027d9dafd82da9434aa7107052a9ab26483bb","requestBytes":23127,"estimatedInputTokens":8093,"requestArtifactId":"8f10c14b-d41b-46d6-a665-5ee780c7302e","tokenReservation":{"schemaVersion":1,"method":"observed-route-max-v1","overheadTokens":0,"reservedTokens":10141,"routes":[{"connectionId":"5b4daed9-b2f7-4de0-b949-573eba70c7b3","model":"gpt-6.1-sol","protocol":"chat-completions","endpoint":"https://jojocode.com/v1","localInputTokens":8093,"outputReservation":2048,"inputRatio":1,"observedOutputTokens":2048,"observedTotalFloor":0,"reservedTokens":10141,"sources":[]}]},"maxBudgetAttempts":8,"estimateMethod":"utf8-third-plus-framing-v1","beforeInputTokens":8093,"beforeBytes":23127,"budget":{"contextLimit":16000,"outputReservation":2048,"safetyTokens":1600,"inputBudget":12352,"targetInputTokens":12352,"runRemainingTokens":90000,"taskRemainingTokens":90000,"limitingReason":"context_limit"},"mandatoryInputTokens":8093,"nextReadFixedInputTokens":8093,"workingRetentionTokens":0,"workingRetentionPolicyVersion":1,"originalMessages":1,"retainedMessages":1,"archivedGroups":0,"retainedGroups":[0],"historyIndexArtifactId":null,"historyIndexSha256":null,"actualUsage":null,"workingSetArtifactId":null,"workingSetSha256":null,"workingSetEntries":0,"workingSetViewVersion":2,"latestToolsArtifactId":null,"latestToolsSha256":null,"latestToolsEntries":0,"projectMemoryArtifactId":null,"projectMemorySha256":null,"projectMemoryEntries":0,"skillCatalogArtifactId":null,"skillCatalogSha256":null,"skillCatalogEntries":0,"mcpCatalogArtifactId":null,"mcpCatalogSha256":null,"mcpCatalogEntries":0,"requestAttempts":0,"responseSha256":null,"source":"workbench"}
@@ -0,0 +1 @@
{"schemaVersion":1,"id":"c71f0cd0-48a0-4355-9190-8a618a94c193","sessionId":"966d83cb-d1d7-44b7-be53-9d850270e34e","projectId":"45aa4368-bd4f-4a43-8785-3853fe0c9eb1","taskId":"e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4","runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","stepId":"d5e5ed86-79a0-4a14-899e-de04f27827c0","requestIndex":4,"status":"prepared","createdAt":"2026-11-03T16:03:27.912Z","finishedAt":null,"requestSha256":"ce0456b5a24c90298b823e5ff4ae23df2756cff5eb0ceecde4115562fa6d01a2","requestBytes":35303,"estimatedInputTokens":12168,"requestArtifactId":"d4651a7d-3952-4495-99e5-ce471bbd90ec","tokenReservation":{"schemaVersion":1,"method":"observed-route-max-v1","overheadTokens":0,"reservedTokens":15088,"routes":[{"connectionId":"5b4daed9-b2f7-4de0-b949-573eba70c7b3","model":"gpt-6.1-sol","protocol":"chat-completions","endpoint":"https://jojocode.com/v1","localInputTokens":12168,"outputReservation":2048,"inputRatio":1.0716167890080934,"observedOutputTokens":2048,"observedTotalFloor":11774,"reservedTokens":15088,"sources":[{"runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","attemptId":"dcb342bf-a983-4124-8f3a-9dd84fbf40a5","localInputTokens":8093,"reportedInputTokens":4820,"reportedOutputTokens":14,"totalTokens":4834},{"runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","attemptId":"19f33d0d-9344-4b27-a6b9-556bb8a3797d","localInputTokens":9033,"reportedInputTokens":6661,"reportedOutputTokens":49,"totalTokens":6710},{"runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","attemptId":"53337890-31fe-4261-9604-c9ffff6139c3","localInputTokens":10626,"reportedInputTokens":11387,"reportedOutputTokens":387,"totalTokens":11774}]}]},"maxBudgetAttempts":4,"estimateMethod":"utf8-third-plus-framing-v1","beforeInputTokens":19279,"beforeBytes":56396,"budget":{"contextLimit":16000,"outputReservation":2048,"safetyTokens":1600,"inputBudget":12352,"targetInputTokens":12352,"runRemainingTokens":66682,"taskRemainingTokens":66682,"limitingReason":"context_limit"},"mandatoryInputTokens":12168,"nextReadFixedInputTokens":10585,"workingRetentionTokens":0,"workingRetentionPolicyVersion":1,"originalMessages":13,"retainedMessages":1,"archivedGroups":3,"retainedGroups":[0],"historyIndexArtifactId":"82b30b44-a244-4dbc-9876-201a52be5c0d","historyIndexSha256":"15c3587dab6135ab5f04560d65df10b4b30de21892b87e8796867c40cd37e3b8","actualUsage":null,"workingSetArtifactId":null,"workingSetSha256":null,"workingSetEntries":0,"workingSetViewVersion":2,"latestToolsArtifactId":"d273074f-e1dd-44d3-80ee-703c4248aeec","latestToolsSha256":"8b792dab1edaaa0cfbb8a3d1033578eebb8c55ad7af61cbfae6d6c0f7599a971","latestToolsEntries":6,"projectMemoryArtifactId":null,"projectMemorySha256":null,"projectMemoryEntries":0,"skillCatalogArtifactId":null,"skillCatalogSha256":null,"skillCatalogEntries":0,"mcpCatalogArtifactId":null,"mcpCatalogSha256":null,"mcpCatalogEntries":0,"requestAttempts":0,"responseSha256":null,"source":"workbench"}
@@ -0,0 +1,235 @@
> test
> node --test test/expense.test.mjs
✖ decimal strings become exact cents including zero and refunds (0.8847ms)
✖ finite decimal numbers use the same cents contract (0.1491ms)
✖ malformed overprecision nonfinite and unsafe amounts are rejected (0.1637ms)
✖ independent currencies are sorted and summed without floating point loss (0.6721ms)
✖ refunds cancel totals while counting every original record (0.1674ms)
✖ summarizing retains caller rows and handles an empty list (0.1437ms)
✖ invalid rows currency and unsafe aggregate totals are rejected (0.0987ms)
✖ reports use two decimals and render negative subunit amounts (0.1497ms)
✖ complete expense flow preserves exact decimal sums (0.1307ms)
ℹ tests 9
ℹ suites 0
ℹ pass 0
ℹ fail 9
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 60.4722
✖ failing tests:
test at test\expense.test.mjs:6:1
✖ decimal strings become exact cents including zero and refunds (0.8847ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
0 !== 1234
at TestContext.<anonymous> (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/.qa/live-delivery-r/node/expense-project/test/expense.test.mjs:7:124)
at Test.runInAsyncScope (node:async_hooks:227:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.start (node:internal/test_runner/test:1262:17)
at startSubtestAfterBootstrap (node:internal/test_runner/harness:387:17) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 0,
expected: 1234,
operator: 'strictEqual',
diff: 'simple'
}
test at test\expense.test.mjs:9:1
✖ finite decimal numbers use the same cents contract (0.1491ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
0 !== 101
at TestContext.<anonymous> (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/.qa/live-delivery-r/node/expense-project/test/expense.test.mjs:10:83)
at Test.runInAsyncScope (node:async_hooks:227:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 0,
expected: 101,
operator: 'strictEqual',
diff: 'simple'
}
test at test\expense.test.mjs:12:1
✖ malformed overprecision nonfinite and unsafe amounts are rejected (0.1637ms)
AssertionError [ERR_ASSERTION]: Missing expected exception (TypeError).
at TestContext.<anonymous> (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/.qa/live-delivery-r/node/expense-project/test/expense.test.mjs:13:126)
at Test.runInAsyncScope (node:async_hooks:227:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
operator: 'throws',
diff: 'simple'
}
test at test\expense.test.mjs:15:1
✖ independent currencies are sorted and summed without floating point loss (0.6721ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
+ []
- [
- {
- cents: 300,
- count: 1,
- currency: 'CNY'
- },
- {
- cents: 30,
- count: 2,
- currency: 'USD'
- }
- ]
at TestContext.<anonymous> (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/.qa/live-delivery-r/node/expense-project/test/expense.test.mjs:16:10)
at Test.runInAsyncScope (node:async_hooks:227:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: [],
expected: [ { currency: 'CNY', cents: 300, count: 1 }, { currency: 'USD', cents: 30, count: 2 } ],
operator: 'deepStrictEqual',
diff: 'simple'
}
test at test\expense.test.mjs:19:1
✖ refunds cancel totals while counting every original record (0.1674ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
+ []
- [
- {
- cents: 0,
- count: 2,
- currency: 'EUR'
- }
- ]
at TestContext.<anonymous> (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/.qa/live-delivery-r/node/expense-project/test/expense.test.mjs:20:10)
at Test.runInAsyncScope (node:async_hooks:227:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: [],
expected: [ { currency: 'EUR', cents: 0, count: 2 } ],
operator: 'deepStrictEqual',
diff: 'simple'
}
test at test\expense.test.mjs:22:1
✖ summarizing retains caller rows and handles an empty list (0.1437ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
+ []
- [
- {
- cents: 200,
- count: 1,
- currency: 'USD'
- }
- ]
at TestContext.<anonymous> (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/.qa/live-delivery-r/node/expense-project/test/expense.test.mjs:24:10)
at Test.runInAsyncScope (node:async_hooks:227:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: [],
expected: [ { currency: 'USD', cents: 200, count: 1 } ],
operator: 'deepStrictEqual',
diff: 'simple'
}
test at test\expense.test.mjs:26:1
✖ invalid rows currency and unsafe aggregate totals are rejected (0.0987ms)
AssertionError [ERR_ASSERTION]: Missing expected exception (TypeError).
at TestContext.<anonymous> (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/.qa/live-delivery-r/node/expense-project/test/expense.test.mjs:28:91)
at Test.runInAsyncScope (node:async_hooks:227:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
operator: 'throws',
diff: 'simple'
}
test at test\expense.test.mjs:30:1
✖ reports use two decimals and render negative subunit amounts (0.1497ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
+ ''
- 'CNY 3.00 (2)\nUSD -1.05 (1)'
at TestContext.<anonymous> (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/.qa/live-delivery-r/node/expense-project/test/expense.test.mjs:31:10)
at Test.runInAsyncScope (node:async_hooks:227:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: '',
expected: 'CNY 3.00 (2)\nUSD -1.05 (1)',
operator: 'strictEqual',
diff: 'simple'
}
test at test\expense.test.mjs:34:1
✖ complete expense flow preserves exact decimal sums (0.1307ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
+ ''
- 'CNY 10.50 (1)\nUSD -0.01 (2)'
at TestContext.<anonymous> (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/.qa/live-delivery-r/node/expense-project/test/expense.test.mjs:35:10)
at Test.runInAsyncScope (node:async_hooks:227:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: '',
expected: 'CNY 10.50 (1)\nUSD -0.01 (2)',
operator: 'strictEqual',
diff: 'simple'
}
@@ -0,0 +1 @@
{"schemaVersion":1,"kind":"request-history-index","sessionId":"966d83cb-d1d7-44b7-be53-9d850270e34e","projectId":"45aa4368-bd4f-4a43-8785-3853fe0c9eb1","taskId":"e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4","history_sha256":"4ba68c6bf7c29d37ce05785e46058c0be247fd397cebf332e955529f8c168040","historyMessages":6,"retainedGroups":[{"index":0,"startMessage":0,"endMessage":0,"sha256":"5c44198af338c103e162a9de85e9af5cd3ff2d795889183df2ae40c8e45d4575","roles":["user"]},{"index":1,"startMessage":1,"endMessage":2,"sha256":"29480d466e81a22ac3733df06215d3650722f91e9020ca13d645bf1594e831bd","roles":["assistant","tool"],"tools":[{"call_id":"call_6bdaf5af8f76412faead5f06ad36eb15","name":"inspect_project","input":{},"result":{"fingerprint":"7a448d7a374c6bc18cbb10ff00fc0d0ca69e16615feaa71262facdf7ba3b395f"},"invocation_id":"a385145d-8c41-4eb3-b4b2-4862211864b6","recorded_state":"completed","requires_verification":false,"result_artifact_id":"cbe97e69-8473-4fbb-95d1-8b809a54394c","result_sha256":"866bf01bf800bc754af47daa468f4af21ef0234479ab0e99ea5d5e3541952b5a"}]}],"archivedGroups":[{"index":2,"startMessage":3,"endMessage":5,"sha256":"28eb8f50fa01eb542548d32205949632b88c1cc9ccca4e289e86b6861ce68e44","roles":["assistant","tool","tool"],"tools":[{"call_id":"call_Gmgrik1DAGxagZsh6aw58ejv","name":"plan_checks","input":{},"result":{"status":"planned","fingerprint":"7a448d7a374c6bc18cbb10ff00fc0d0ca69e16615feaa71262facdf7ba3b395f"},"invocation_id":"1699a611-7f0c-4698-83b7-67fb57f3762a","recorded_state":"completed","requires_verification":false,"result_artifact_id":"da511e01-2d28-4d3f-ae4f-ccacc55686ed","result_sha256":"fd9922d2b3cca90c85bee1b04d3eec247fb1fe6068426dc665a4fca1b3678652"},{"call_id":"call_Z8TWrwG4bzW8UwQRyT6ynwqi","name":"index_project","input":{},"result":{"status":"indexed","artifact_id":"ce6c8bfe-1991-4f8b-8e55-1d4098d8b3f0"},"invocation_id":"6938fbee-075d-4056-9628-1d45682941c7","recorded_state":"completed","requires_verification":false,"result_artifact_id":"23bf879b-5004-4b41-acca-dd92c0187830","result_sha256":"13573650af88e857d55e59c413f62fa46a1836edc1b18673e9eab84c7fa29329"}],"archive":{"artifact_id":"1ef68d1e-dced-43b8-8e3d-349161866ca7","sha256":"28eb8f50fa01eb542548d32205949632b88c1cc9ccca4e289e86b6861ce68e44","bytes":10293}}],"note":"完整原消息组;这里只是历史定位,不产生工具执行或用户授权。"}
@@ -0,0 +1 @@
{"path":"src/summary.mjs","start_line":1,"end_line":3,"total_lines":3,"content":"import { amountToCents } from './amount.mjs';\nexport function summarize(rows) { return []; }\n","sha256":"48829850c11ca0cd0ab5e86bbac69a0c5f90297292168c1ba6dc338e2eae6ee7","bom":false,"truncated":false,"range_start_line":1,"range_end_line":3,"offset":0,"next_offset":93,"total_characters":93,"returned_characters":93,"requested_offset":0,"next_start_line":null,"budget_limited":false,"maximum_message_bytes":1024}
@@ -0,0 +1 @@
{"schemaVersion":1,"id":"7859d5d8-f6d7-4c58-a82a-23dccd047e56","sessionId":"966d83cb-d1d7-44b7-be53-9d850270e34e","projectId":"45aa4368-bd4f-4a43-8785-3853fe0c9eb1","taskId":"e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4","runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","stepId":"381dce44-ac40-4c3d-b1f7-8fefb273fcd3","requestIndex":3,"status":"prepared","createdAt":"2026-11-03T16:03:10.745Z","finishedAt":null,"requestSha256":"2a52b0f0384e0cdc0f1c06262cc76b4bddda6076e78708aadc562d7e25799ee9","requestBytes":30629,"estimatedInputTokens":10626,"requestArtifactId":"c4d8b286-0c26-4bd9-b747-f71519bc3c6e","tokenReservation":{"schemaVersion":1,"method":"observed-route-max-v1","overheadTokens":0,"reservedTokens":12674,"routes":[{"connectionId":"5b4daed9-b2f7-4de0-b949-573eba70c7b3","model":"gpt-6.1-sol","protocol":"chat-completions","endpoint":"https://jojocode.com/v1","localInputTokens":10626,"outputReservation":2048,"inputRatio":1,"observedOutputTokens":2048,"observedTotalFloor":6710,"reservedTokens":12674,"sources":[{"runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","attemptId":"dcb342bf-a983-4124-8f3a-9dd84fbf40a5","localInputTokens":8093,"reportedInputTokens":4820,"reportedOutputTokens":14,"totalTokens":4834},{"runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","attemptId":"19f33d0d-9344-4b27-a6b9-556bb8a3797d","localInputTokens":9033,"reportedInputTokens":6661,"reportedOutputTokens":49,"totalTokens":6710}]}]},"maxBudgetAttempts":6,"estimateMethod":"utf8-third-plus-framing-v1","beforeInputTokens":13077,"beforeBytes":37957,"budget":{"contextLimit":16000,"outputReservation":2048,"safetyTokens":1600,"inputBudget":12352,"targetInputTokens":12352,"runRemainingTokens":78456,"taskRemainingTokens":78456,"limitingReason":"context_limit"},"mandatoryInputTokens":10138,"nextReadFixedInputTokens":9407,"workingRetentionTokens":0,"workingRetentionPolicyVersion":1,"originalMessages":6,"retainedMessages":3,"archivedGroups":1,"retainedGroups":[0,1],"historyIndexArtifactId":"7e7f3fc2-c661-4072-9637-68d0540fabb0","historyIndexSha256":"2cbdaf534193066939d3a08205f4d44cab56435f72d363225afabfc78d544ffc","actualUsage":null,"workingSetArtifactId":null,"workingSetSha256":null,"workingSetEntries":0,"workingSetViewVersion":2,"latestToolsArtifactId":"b18ba7c4-27c5-4adf-b3ef-ac84887f2b1f","latestToolsSha256":"5d58c9731e1decd0ade94f62366624493f1ba19e06f97bced111d7c17219aefc","latestToolsEntries":2,"projectMemoryArtifactId":null,"projectMemorySha256":null,"projectMemoryEntries":0,"skillCatalogArtifactId":null,"skillCatalogSha256":null,"skillCatalogEntries":0,"mcpCatalogArtifactId":null,"mcpCatalogSha256":null,"mcpCatalogEntries":0,"requestAttempts":0,"responseSha256":null,"source":"workbench"}
@@ -0,0 +1 @@
{"id":"resp_ft_95c84cf3187eb383e75fa2d636b79b42","object":"chat.completion","created":1793721789,"model":"gpt-6.1-sol","choices":[{"index":0,"message":{"role":"assistant","content":" ","tool_calls":[{"id":"call_Gmgrik1DAGxagZsh6aw58ejv","type":"function","function":{"name":"plan_checks","arguments":"{\"names\":[\"test\",\"build\"]}"}},{"id":"call_Z8TWrwG4bzW8UwQRyT6ynwqi","type":"function","function":{"name":"index_project","arguments":"{}"}}]},"finish_reason":"tool_calls"}],"usage":{"prompt_tokens":6661,"completion_tokens":49,"total_tokens":6710},"service_tier":"default"}
@@ -0,0 +1 @@
{"id":"resp_05dac64cefd12b54016aea0601d47c81999198b1b752f88574","object":"chat.completion","created":1793721874,"model":"gpt-6.1-sol","choices":[{"index":0,"message":{"role":"assistant","content":"基线结果已保留:原九项测试全部失败,构建通过。现在补齐原测试的完整契约内容,并据此准备三个模块的完整提案;提案阶段不会写入文件。","tool_calls":[{"id":"call_8912e150dbc94e26883085d752252361","type":"function","function":{"name":"read_artifact","arguments":"{\"artifact_id\":\"08ef671d-dbda-4a53-846e-6d14b1a15b3d\",\"limit\":16000,\"offset\":0}"}}]},"finish_reason":"tool_calls"}],"usage":{"prompt_tokens":27164,"completion_tokens":303,"total_tokens":27467,"prompt_tokens_details":{"cached_tokens":24192},"completion_tokens_details":{"reasoning_tokens":195}},"service_tier":"default"}
@@ -0,0 +1 @@
{"id":"resp_00061fbd7e1a57c1016aea05b37efc8195a4121dc131aad03e","object":"chat.completion","created":1793721780,"model":"gpt-6.1-sol","choices":[{"index":0,"message":{"role":"assistant","tool_calls":[{"id":"call_6bdaf5af8f76412faead5f06ad36eb15","type":"function","function":{"name":"inspect_project","arguments":"{}"}}]},"finish_reason":"tool_calls"}],"usage":{"prompt_tokens":4820,"completion_tokens":14,"total_tokens":4834},"service_tier":"default"}
@@ -0,0 +1 @@
{"id":"resp_0d459a73fc1c2943016aea061670bc81979df1295de0976f62","object":"chat.completion","created":1793721880,"model":"gpt-6.1-sol","choices":[{"index":0,"message":{"role":"assistant","tool_calls":[{"id":"call_af5be81749ee49dca7da85970eb44792","type":"function","function":{"name":"read_file","arguments":"{\"path\":\"test/expense.test.mjs\",\"start_line\":1,\"end_line\":38,\"offset\":473,\"limit\":16000}"}}]},"finish_reason":"tool_calls"}],"usage":{"prompt_tokens":8619,"completion_tokens":60,"total_tokens":8679,"completion_tokens_details":{"reasoning_tokens":16}},"service_tier":"default"}
@@ -0,0 +1 @@
{"schemaVersion":1,"kind":"latest-tool-feedback","sessionId":"966d83cb-d1d7-44b7-be53-9d850270e34e","projectId":"45aa4368-bd4f-4a43-8785-3853fe0c9eb1","taskId":"e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4","runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","group_index":2,"group_sha256":"28eb8f50fa01eb542548d32205949632b88c1cc9ccca4e289e86b6861ce68e44","entries":[{"tool":"plan_checks","source":{"call_id":"call_Gmgrik1DAGxagZsh6aw58ejv","invocation_id":"1699a611-7f0c-4698-83b7-67fb57f3762a","run_id":"cf10d58a-d3af-4b03-9bef-77fb54837878","result_artifact_id":"da511e01-2d28-4d3f-ae4f-ccacc55686ed","result_sha256":"fd9922d2b3cca90c85bee1b04d3eec247fb1fe6068426dc665a4fca1b3678652","arguments_sha256":"59c17c25d83866b89d8a61eebf0cdbb3e7f21cb736a4349a025bce238e20cb0f","recorded_state":"completed","requires_verification":false},"result":{"id":"01a987e4-d67a-44b6-be0c-75798d88f874","status":"planned","taskId":"e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4","runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","fingerprint":"7a448d7a374c6bc18cbb10ff00fc0d0ca69e16615feaa71262facdf7ba3b395f","project":{"name":"owned-live-expense-report"},"checks":[{"id":"21aac9b8-ea22-4c89-a288-87ccc7aba4df","name":"test","kind":"test","framework":"node","command":"npm run test","scriptSha256":"6abfdc78a8bf83041c6e28fc91e247889e48161d6d5683b020d622d264c6348d","scriptExcerpt":"node --test test/expense.test.mjs"},{"id":"b49052d9-4b98-4c16-bced-9ca4f69c39e8","name":"build","kind":"build","framework":null,"command":"npm run build","scriptSha256":"41b13ec32c24e85c9490c7117efdf5b4dd28075e51de063047128a471ca4ac60","scriptExcerpt":"node scripts/build.mjs"}]},"original_characters":3530,"view":"selected-original-fields"},{"tool":"index_project","source":{"call_id":"call_Z8TWrwG4bzW8UwQRyT6ynwqi","invocation_id":"6938fbee-075d-4056-9628-1d45682941c7","run_id":"cf10d58a-d3af-4b03-9bef-77fb54837878","result_artifact_id":"23bf879b-5004-4b41-acca-dd92c0187830","result_sha256":"13573650af88e857d55e59c413f62fa46a1836edc1b18673e9eab84c7fa29329","arguments_sha256":"44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a","recorded_state":"completed","requires_verification":false},"result":{"status":"indexed","artifact_id":"ce6c8bfe-1991-4f8b-8e55-1d4098d8b3f0","note":"完整索引在本Task的工件中。定位后读取实际行;文件SHA256用于精确补丁,索引不等同于运行验证。"},"original_characters":4959,"view":"selected-original-fields"}]}
@@ -0,0 +1 @@
[{"role":"assistant","content":"基线结果已保留:原九项测试全部失败,构建通过。现在补齐原测试的完整契约内容,并据此准备三个模块的完整提案;提案阶段不会写入文件。","tool_calls":[{"id":"call_8912e150dbc94e26883085d752252361","type":"function","function":{"name":"read_artifact","arguments":"{\"artifact_id\":\"08ef671d-dbda-4a53-846e-6d14b1a15b3d\",\"limit\":16000,\"offset\":0}"}}]},{"role":"tool","tool_call_id":"call_8912e150dbc94e26883085d752252361","content":"{\"artifact_id\":\"08ef671d-dbda-4a53-846e-6d14b1a15b3d\",\"kind\":\"tool-result\",\"sha256\":\"55a48762ac74d0be73e09fb91c59e28a649b93a0802a016d31cd99a8bee0514e\",\"content\":\"{\\\"path\\\":\\\"test/expense.test.mjs\\\",\\\"start_line\\\":1,\\\"end_line\\\":9,\\\"total_lines\\\":38,\\\"content\\\":\\\"import test from 'node:test';\\\\nimport assert from 'node:assert/strict';\\\\nimport { amountToCents } from '../src/amount.mjs';\\\\nimport { summarize } from '../src/summary.mjs';\\\\nimport { formatReport } from '../src/report.mjs';\\\\ntest('decimal strings become exact cents including zero and refunds',()=>{\\\\n for(const [input,expected] of [['0',0],[' 12.34 ',1234],['+2.5',250],['-1.05',-105],['-0.00',0],['0009.1\",\"offset\":0,\"next_offset\":495,\"returned_characters\":495,\"total_characters\":891,\"truncated\":true,\"requested_offset\":0,\"requested_limit\":16000,\"budget_limited\":true,\"maximum_message_bytes\":1024}"}]
@@ -0,0 +1 @@
{"projectId":"45aa4368-bd4f-4a43-8785-3853fe0c9eb1","name":"owned-live-expense-report","languages":["JavaScript"],"packageManager":"npm","scripts":[{"name":"test","script":"node --test test/expense.test.mjs","kind":"test","framework":"node","lifecycle":[]},{"name":"build","script":"node scripts/build.mjs","kind":"build","framework":null,"lifecycle":[]}],"rules":[],"declarations":{},"entryPoints":[],"git":{"available":true,"head":"009dbe63e764513d82559509524867986e561dbe","branch":"main","dirty":true,"status":"MM owner-staged.txt\n M owner-unstaged.txt\n?? owner-untracked.txt\n","statusSha256":"c37d286f0cb5f771a6c51831f1f8b5bcd903169e4f64fb4cd3b15cddeaa7eaa8","complete":true,"contentFilters":"disabled-for-inspection","submoduleWorktrees":"not-inspected"},"fingerprint":"7a448d7a374c6bc18cbb10ff00fc0d0ca69e16615feaa71262facdf7ba3b395f","sourceFingerprint":"74976f560d7ced554046d2b7f21d557c925db47d1d40e9fd02d800c3151987b8","inspectedAt":"2026-11-03T16:03:01.423Z","scope":{"complete":true,"scannedFiles":11,"bytes":3691,"excludedFiles":0,"maximumFiles":1000,"maximumBytes":16777216,"note":"有界快照;Git工程遵循ignore并包含未跟踪源码,跳过依赖、链接和常见凭据路径。"}}
@@ -0,0 +1 @@
{"path":"src/amount.mjs","start_line":1,"end_line":2,"total_lines":2,"content":"export function amountToCents(value) { return 0; }\n","sha256":"84cb647328ec52dad27d288f3a6127ff3e1ad87274ae2d227ad44daa49cbb2ed","bom":false,"truncated":false,"range_start_line":1,"range_end_line":2,"offset":0,"next_offset":51,"total_characters":51,"returned_characters":51,"requested_offset":0,"next_start_line":null,"budget_limited":false,"maximum_message_bytes":1024}
@@ -0,0 +1 @@
{"id":"01a987e4-d67a-44b6-be0c-75798d88f874","sessionId":"966d83cb-d1d7-44b7-be53-9d850270e34e","projectId":"45aa4368-bd4f-4a43-8785-3853fe0c9eb1","taskId":"e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4","runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","status":"planned","createdAt":"2026-11-03T16:03:10.424Z","fingerprint":"7a448d7a374c6bc18cbb10ff00fc0d0ca69e16615feaa71262facdf7ba3b395f","sourceFingerprint":"74976f560d7ced554046d2b7f21d557c925db47d1d40e9fd02d800c3151987b8","project":{"projectId":"45aa4368-bd4f-4a43-8785-3853fe0c9eb1","name":"owned-live-expense-report","languages":["JavaScript"],"packageManager":"npm","scripts":[{"name":"test","script":"node --test test/expense.test.mjs","kind":"test","framework":"node","lifecycle":[]},{"name":"build","script":"node scripts/build.mjs","kind":"build","framework":null,"lifecycle":[]}],"rules":[],"declarations":{},"entryPoints":[],"git":{"available":true,"head":"009dbe63e764513d82559509524867986e561dbe","branch":"main","dirty":true,"status":"MM owner-staged.txt\n M owner-unstaged.txt\n?? owner-untracked.txt\n","statusSha256":"c37d286f0cb5f771a6c51831f1f8b5bcd903169e4f64fb4cd3b15cddeaa7eaa8","complete":true,"contentFilters":"disabled-for-inspection","submoduleWorktrees":"not-inspected"},"fingerprint":"7a448d7a374c6bc18cbb10ff00fc0d0ca69e16615feaa71262facdf7ba3b395f","sourceFingerprint":"74976f560d7ced554046d2b7f21d557c925db47d1d40e9fd02d800c3151987b8","inspectedAt":"2026-11-03T16:03:10.423Z","scope":{"complete":true,"scannedFiles":11,"bytes":3691,"excludedFiles":0,"maximumFiles":1000,"maximumBytes":16777216,"note":"有界快照;Git工程遵循ignore并包含未跟踪源码,跳过依赖、链接和常见凭据路径。"}},"artifactId":"ebcdb39b-3362-4e90-b895-bd4e7365de56","checks":[{"id":"21aac9b8-ea22-4c89-a288-87ccc7aba4df","name":"test","script":"node --test test/expense.test.mjs","kind":"test","framework":"node","lifecycle":[],"command":"npm run test"},{"id":"b49052d9-4b98-4c16-bced-9ca4f69c39e8","name":"build","script":"node scripts/build.mjs","kind":"build","framework":null,"lifecycle":[],"command":"npm run build"}],"environment":{"kind":"node","identity":"763ff24d4261313f875f64bf467a3450ba2453629f0b0244555f7469a3d7831d","dependencyInputs":"5fd535fc8dbf59ebd0cf7f974775ebb86c47c0b3bf779ce3ec404bcaec3b3092","status":"ready","installed":{"status":"missing","files":0,"bytes":0,"sha256":null},"declarations":[{"path":"D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\live-delivery-r\\node\\expense-project\\package.json","sha256":"6ad63026b2fe9de7513a4f6704c372a86108ee3d018a1f04883dc0a409ea4c24","bytes":188}],"runtime":{"status":"available","node":{"path":"D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.14.0-win-x64-20261030235440461\\runtime\\node.exe","sha256":"d702daa815eabbff763c7d3808e235cf031cf2ca70211b56847bc72f51e240e5","bytes":93915464,"version":"v24.22.1"},"npm":{"path":"C:\\Users\\wangy\\AppData\\Local\\Programs\\AgentWorkbench\\versions\\Agent-Workbench-1.24.6-win-x64-20261103151145294\\runtime\\node_modules\\npm\\bin\\npm-cli.js","sha256":"3ce7cba6f5128dd5f54c98b6a5036b0f850496878cc2e21044b675fe3c594e3e","bytes":56,"version":"11.19.1","manifest":{"path":"C:\\Users\\wangy\\AppData\\Local\\Programs\\AgentWorkbench\\versions\\Agent-Workbench-1.24.6-win-x64-20261103151145294\\runtime\\node_modules\\npm\\package.json","sha256":"d5b859b88af16e893fbc2d28819db601a8543b241f8c80459f70898be2777c12","bytes":6856}}},"preparation":null},"contractArtifactId":"e1885cbf-9a62-4550-adc6-bc8624d939da","contractSha256":"dfc459e323a15ec8ffa1633be1cb5b3ec5995a6117e83f49cac4e3ad9f2f4e25"}
@@ -0,0 +1 @@
{"schemaVersion":1,"kind":"sealed-check-plan","id":"01a987e4-d67a-44b6-be0c-75798d88f874","sessionId":"966d83cb-d1d7-44b7-be53-9d850270e34e","projectId":"45aa4368-bd4f-4a43-8785-3853fe0c9eb1","taskId":"e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4","runId":"cf10d58a-d3af-4b03-9bef-77fb54837878","fingerprint":"7a448d7a374c6bc18cbb10ff00fc0d0ca69e16615feaa71262facdf7ba3b395f","sourceFingerprint":"74976f560d7ced554046d2b7f21d557c925db47d1d40e9fd02d800c3151987b8","checks":[{"id":"21aac9b8-ea22-4c89-a288-87ccc7aba4df","name":"test","script":"node --test test/expense.test.mjs","kind":"test","framework":"node","lifecycle":[],"command":"npm run test"},{"id":"b49052d9-4b98-4c16-bced-9ca4f69c39e8","name":"build","script":"node scripts/build.mjs","kind":"build","framework":null,"lifecycle":[],"command":"npm run build"}],"environment":{"kind":"node","identity":"763ff24d4261313f875f64bf467a3450ba2453629f0b0244555f7469a3d7831d","dependencyInputs":"5fd535fc8dbf59ebd0cf7f974775ebb86c47c0b3bf779ce3ec404bcaec3b3092","status":"ready","installed":{"status":"missing","files":0,"bytes":0,"sha256":null},"declarations":[{"path":"D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\live-delivery-r\\node\\expense-project\\package.json","sha256":"6ad63026b2fe9de7513a4f6704c372a86108ee3d018a1f04883dc0a409ea4c24","bytes":188}],"runtime":{"status":"available","node":{"path":"D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.14.0-win-x64-20261030235440461\\runtime\\node.exe","sha256":"d702daa815eabbff763c7d3808e235cf031cf2ca70211b56847bc72f51e240e5","bytes":93915464,"version":"v24.22.1"},"npm":{"path":"C:\\Users\\wangy\\AppData\\Local\\Programs\\AgentWorkbench\\versions\\Agent-Workbench-1.24.6-win-x64-20261103151145294\\runtime\\node_modules\\npm\\bin\\npm-cli.js","sha256":"3ce7cba6f5128dd5f54c98b6a5036b0f850496878cc2e21044b675fe3c594e3e","bytes":56,"version":"11.19.1","manifest":{"path":"C:\\Users\\wangy\\AppData\\Local\\Programs\\AgentWorkbench\\versions\\Agent-Workbench-1.24.6-win-x64-20261103151145294\\runtime\\node_modules\\npm\\package.json","sha256":"d5b859b88af16e893fbc2d28819db601a8543b241f8c80459f70898be2777c12","bytes":6856}}},"preparation":null}}
@@ -0,0 +1 @@
{"projectId":"45aa4368-bd4f-4a43-8785-3853fe0c9eb1","name":"owned-live-expense-report","languages":["JavaScript"],"packageManager":"npm","scripts":[{"name":"test","script":"node --test test/expense.test.mjs","kind":"test","framework":"node","lifecycle":[]},{"name":"build","script":"node scripts/build.mjs","kind":"build","framework":null,"lifecycle":[]}],"rules":[],"declarations":{},"entryPoints":[],"git":{"available":true,"head":"009dbe63e764513d82559509524867986e561dbe","branch":"main","dirty":true,"status":"MM owner-staged.txt\n M owner-unstaged.txt\n?? owner-untracked.txt\n","statusSha256":"c37d286f0cb5f771a6c51831f1f8b5bcd903169e4f64fb4cd3b15cddeaa7eaa8","complete":true,"contentFilters":"disabled-for-inspection","submoduleWorktrees":"not-inspected"},"fingerprint":"7a448d7a374c6bc18cbb10ff00fc0d0ca69e16615feaa71262facdf7ba3b395f","sourceFingerprint":"74976f560d7ced554046d2b7f21d557c925db47d1d40e9fd02d800c3151987b8","inspectedAt":"2026-11-03T16:03:10.423Z","scope":{"complete":true,"scannedFiles":11,"bytes":3691,"excludedFiles":0,"maximumFiles":1000,"maximumBytes":16777216,"note":"有界快照;Git工程遵循ignore并包含未跟踪源码,跳过依赖、链接和常见凭据路径。"}}
@@ -0,0 +1 @@
{"path":"test/expense.test.mjs","start_line":9,"end_line":13,"total_lines":38,"content":"decimal numbers use the same cents contract',()=>{\n for(const [input,expected] of [[0,0],[1.01,101],[2.5,250],[-4.32,-432]]) assert.equal(amountToCents(input),expected);\n});\ntest('malformed overprecision nonfinite and unsafe amounts are rejected',()=>{\n for(const input of ['',null,undefined,true,{},'1e2','1,000','.50','1.234',1.234,NaN,Infinity,'900719925474099.99']) assert.throws(()=>amountToCent","sha256":"0bcda551dbaeafad9a6e3df8024492ab67d7c09956f4676c393b78249ab44839","bom":false,"truncated":true,"range_start_line":1,"range_end_line":38,"offset":473,"next_offset":875,"total_characters":2584,"returned_characters":402,"requested_offset":473,"next_start_line":null,"budget_limited":true,"maximum_message_bytes":949,"tool_invocation_id":"4f23d490-0097-4f20-ba50-55dc9397f5b1"}
@@ -0,0 +1 @@
[{"role":"assistant","content":"","tool_calls":[{"id":"call_6bdaf5af8f76412faead5f06ad36eb15","type":"function","function":{"name":"inspect_project","arguments":"{}"}}]},{"role":"tool","tool_call_id":"call_6bdaf5af8f76412faead5f06ad36eb15","content":"{\"projectId\":\"45aa4368-bd4f-4a43-8785-3853fe0c9eb1\",\"name\":\"owned-live-expense-report\",\"languages\":[\"JavaScript\"],\"packageManager\":\"npm\",\"scripts\":[{\"name\":\"test\",\"script\":\"node --test test/expense.test.mjs\",\"kind\":\"test\",\"framework\":\"node\",\"lifecycle\":[]},{\"name\":\"build\",\"script\":\"node scripts/build.mjs\",\"kind\":\"build\",\"framework\":null,\"lifecycle\":[]}],\"rules\":[],\"declarations\":{},\"entryPoints\":[],\"git\":{\"available\":true,\"head\":\"009dbe63e764513d82559509524867986e561dbe\",\"branch\":\"main\",\"dirty\":true,\"status\":\"MM owner-staged.txt\\n M owner-unstaged.txt\\n?? owner-untracked.txt\\n\",\"statusSha256\":\"c37d286f0cb5f771a6c51831f1f8b5bcd903169e4f64fb4cd3b15cddeaa7eaa8\",\"complete\":true,\"contentFilters\":\"disabled-for-inspection\",\"submoduleWorktrees\":\"not-inspected\"},\"fingerprint\":\"7a448d7a374c6bc18cbb10ff00fc0d0ca69e16615feaa71262facdf7ba3b395f\",\"sourceFingerprint\":\"74976f560d7ced554046d2b7f21d557c925db47d1d40e9fd02d800c3151987b8\",\"inspectedAt\":\"2026-11-03T16:03:01.423Z\",\"scope\":{\"complete\":true,\"scannedFiles\":11,\"bytes\":3691,\"excludedFiles\":0,\"maximumFiles\":1000,\"maximumBytes\":16777216,\"note\":\"有界快照;Git工程遵循ignore并包含未跟踪源码,跳过依赖、链接和常见凭据路径。\"}}"}]
@@ -0,0 +1 @@
{"id":"resp_0a918bb2fa072833016aea061b39b8819a8adc1c599df1866e","object":"chat.completion","created":1793721887,"model":"gpt-6.1-sol","choices":[{"index":0,"message":{"role":"assistant","content":"我会接着已有读取和基线记录推进,补齐测试契约后准备三个模块的统一审查批次。","tool_calls":[{"id":"call_efdd8f669d474aee82d0c103a5dcfd8e","type":"function","function":{"name":"read_file","arguments":"{\"path\":\"test/expense.test.mjs\",\"start_line\":1,\"end_line\":38,\"offset\":875,\"limit\":16000}"}}]},"finish_reason":"tool_calls"}],"usage":{"prompt_tokens":13012,"completion_tokens":95,"total_tokens":13107,"completion_tokens_details":{"reasoning_tokens":16}},"service_tier":"default"}
@@ -0,0 +1 @@
{"schemaVersion":1,"kind":"task-working-set","sessionId":"966d83cb-d1d7-44b7-be53-9d850270e34e","projectId":"45aa4368-bd4f-4a43-8785-3853fe0c9eb1","taskId":"e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4","semantics":"recorded-tool-observations; file hashes identify observed revisions, not current filesystem guarantees","entries":[{"source":{"call_id":"call_f176269371cb43cb8e84405827e371da","invocation_id":"1eb74fbb-f596-4cee-bf20-454faaa88f43","tool":"read_file","run_id":"cf10d58a-d3af-4b03-9bef-77fb54837878","group_index":3,"group_sha256":"e91427f653bbd0721b065b5a223d27267541bf9218c0d511b15090acccb9b979","result_artifact_id":"d3ac2079-98b6-4ca4-a1d7-07187d38e71b","result_sha256":"08b6595803497876c0745e6f72fab5d5a5233864e2f6447608b51adc2b7ddcf1","observed_at":"2026-11-03T16:03:27.805Z"},"observation":{"kind":"file","path":"src/amount.mjs","sha256":"84cb647328ec52dad27d288f3a6127ff3e1ad87274ae2d227ad44daa49cbb2ed","start_line":1,"end_line":2,"offset":0,"next_offset":51,"range_start_line":1,"range_end_line":2},"content":"export function amountToCents(value) { return 0; }\n","content_offset":0,"next_content_offset":51,"total_content_characters":51,"truncated":false,"content_sha256":"84cb647328ec52dad27d288f3a6127ff3e1ad87274ae2d227ad44daa49cbb2ed"},{"source":{"call_id":"call_9dd4b7eae754462ba817cb0f9aa3279e","invocation_id":"225e9bb2-288a-4a85-8280-9e1f18ba9c72","tool":"read_file","run_id":"cf10d58a-d3af-4b03-9bef-77fb54837878","group_index":3,"group_sha256":"e91427f653bbd0721b065b5a223d27267541bf9218c0d511b15090acccb9b979","result_artifact_id":"4f5dd2b2-b8f2-450a-8857-64ace056701a","result_sha256":"4cdaf349f368e66ecb05754fd3146c6b097426dee6f0d9b363480b79fbde897d","observed_at":"2026-11-03T16:03:27.835Z"},"observation":{"kind":"file","path":"src/report.mjs","sha256":"ba0a014e6e9df710d66e255a3a6f970f4e1c8af48accc81f33627029dcded7c0","start_line":1,"end_line":2,"offset":0,"next_offset":52,"range_start_line":1,"range_end_line":2},"content":"export function formatReport(groups) { return ''; }\n","content_offset":0,"next_content_offset":52,"total_content_characters":52,"truncated":false,"content_sha256":"ba0a014e6e9df710d66e255a3a6f970f4e1c8af48accc81f33627029dcded7c0"},{"source":{"call_id":"call_1785559bc022498c8f40a605cb7a3197","invocation_id":"0544be23-adeb-42ab-852b-eeefb7058421","tool":"read_file","run_id":"cf10d58a-d3af-4b03-9bef-77fb54837878","group_index":3,"group_sha256":"e91427f653bbd0721b065b5a223d27267541bf9218c0d511b15090acccb9b979","result_artifact_id":"80102911-4a35-4cd0-a016-1a018f48f8ab","result_sha256":"17ea0f01e00d78ced1813dd906e6ef4b14de864d14467d17538674fda3be87af","observed_at":"2026-11-03T16:03:27.820Z"},"observation":{"kind":"file","path":"src/summary.mjs","sha256":"48829850c11ca0cd0ab5e86bbac69a0c5f90297292168c1ba6dc338e2eae6ee7","start_line":1,"end_line":3,"offset":0,"next_offset":93,"range_start_line":1,"range_end_line":3},"content":"import { amountToCents } from './amount.mjs';\nexport function summarize(rows) { return []; }\n","content_offset":0,"next_content_offset":93,"total_content_characters":93,"truncated":false,"content_sha256":"48829850c11ca0cd0ab5e86bbac69a0c5f90297292168c1ba6dc338e2eae6ee7"},{"source":{"call_id":"call_157515febdb04454bb6c27a759fe9268","invocation_id":"e0c32321-99f2-48ad-8746-f548cf372ada","tool":"read_file","run_id":"cf10d58a-d3af-4b03-9bef-77fb54837878","group_index":3,"group_sha256":"e91427f653bbd0721b065b5a223d27267541bf9218c0d511b15090acccb9b979","result_artifact_id":"08ef671d-dbda-4a53-846e-6d14b1a15b3d","result_sha256":"55a48762ac74d0be73e09fb91c59e28a649b93a0802a016d31cd99a8bee0514e","observed_at":"2026-11-03T16:03:27.790Z"},"observation":{"kind":"file","path":"test/expense.test.mjs","sha256":"0bcda551dbaeafad9a6e3df8024492ab67d7c09956f4676c393b78249ab44839","start_line":1,"end_line":9,"offset":0,"next_offset":473,"range_start_line":1,"range_end_line":38},"content":"import test from 'node:test';\nimport assert from 'node:assert/strict';\nimport { amountToCents } from '../src/amount.mjs';\nimport { summarize } from '../src/summary.mjs';\nimport { formatReport } fro","content_offset":0,"next_content_offset":197,"total_content_characters":473,"truncated":true,"content_sha256":"5aa8f7934c15057659012406be4fe28862b4c5b4b3862586f60bba0f0c5f93ad"}]}
@@ -0,0 +1 @@
{"status":"planned","plan_id":"92314189-a49f-45d4-903d-fbc45a704632","revision":1,"steps":[{"key":"contract","title":"读取原始测试及三个模块","criterion":"读取原九项测试和amount、summary、report源码,明确金额、汇总与输出契约","kind":"analysis","depends_on":[],"tools":["read_file"]},{"key":"fix","title":"三个模块统一审查应用","criterion":"仅三个授权模块的修复经统一批次审核应用","kind":"changes","depends_on":["contract"],"paths":["src/amount.mjs","src/report.mjs","src/summary.mjs"]},{"key":"validate","title":"验证九项测试及构建","criterion":"当前源码原9项测试全部通过且build成功","kind":"checks","depends_on":["fix"],"checks":["build","test"]}],"contract_artifact_id":"70bce812-4050-431c-b36d-8886381b5018","note":"计划已保存,步骤尚未核验;保留原目标和通过条件,按原工具结果核验,不直接标记完成。"}
@@ -0,0 +1 @@
{"id":"resp_036f4075595c82f4016aea05c386188199be82e4538a790db8","object":"chat.completion","created":1793721804,"model":"gpt-6.1-sol","choices":[{"index":0,"message":{"role":"assistant","content":"已识别到 `test` 和 `build` 脚本,Git 中已有 owner 文件改动。接下来运行已准备的基线检查,并读取原九项测试及三个模块,以测试契约确定修复内容。\n","tool_calls":[{"id":"call_ea0fdc4342c9414cb97c042376cd32c4","type":"function","function":{"name":"run_checks","arguments":"{\"plan_id\": \"01a987e4-d67a-44b6-be0c-75798d88f874\"}"}},{"id":"call_157515febdb04454bb6c27a759fe9268","type":"function","function":{"name":"read_file","arguments":"{\"path\": \"test/expense.test.mjs\"}"}},{"id":"call_f176269371cb43cb8e84405827e371da","type":"function","function":{"name":"read_file","arguments":"{\"path\": \"src/amount.mjs\"}"}},{"id":"call_1785559bc022498c8f40a605cb7a3197","type":"function","function":{"name":"read_file","arguments":"{\"path\": \"src/summary.mjs\"}"}},{"id":"call_9dd4b7eae754462ba817cb0f9aa3279e","type":"function","function":{"name":"read_file","arguments":"{\"path\": \"src/report.mjs\"}"}},{"id":"call_4b576a8c88a74b9fb60f377bdd4c9a60","type":"function","function":{"name":"plan_task","arguments":"{\"expected_revision\": 0, \"steps\": [{\"key\": \"contract\", \"title\": \"读取原始测试及三个模块\", \"kind\": \"analysis\", \"tools\": [\"read_file\"], \"criterion\": \"读取原九项测试和amount、summary、report源码,明确金额、汇总与输出契约\"}, {\"key\": \"fix\", \"title\": \"三个模块统一审查应用\", \"kind\": \"changes\", \"paths\": [\"src/amount.mjs\", \"src/summary.mjs\", \"src/report.mjs\"], \"depends_on\": [\"contract\"], \"criterion\": \"仅三个授权模块的修复经统一批次审核应用\"}, {\"key\": \"validate\", \"title\": \"验证九项测试及构建\", \"kind\": \"checks\", \"checks\": [\"test\", \"build\"], \"depends_on\": [\"fix\"], \"criterion\": \"当前源码原9项测试全部通过且build成功\"}]}"}}]},"finish_reason":"tool_calls"}],"usage":{"prompt_tokens":11387,"completion_tokens":387,"total_tokens":11774,"completion_tokens_details":{"reasoning_tokens":26}},"service_tier":"default"}
@@ -0,0 +1,262 @@
{
"pause": {
"schema": 1,
"reason": "token_limit",
"createdAt": "2026-11-03T16:04:47.832Z",
"taskId": "e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4",
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"contextLimit": 16000,
"outputReservation": 2048,
"safetyTokens": 1600,
"inputBudget": 12352,
"targetInputTokens": 12352,
"runRemainingTokens": 17429,
"taskRemainingTokens": 17429,
"limitingReason": "token_limit",
"tokenReservation": {
"schemaVersion": 1,
"method": "observed-route-max-v1",
"overheadTokens": 0,
"reservedTokens": 29623,
"routes": [
{
"connectionId": "5b4daed9-b2f7-4de0-b949-573eba70c7b3",
"model": "gpt-6.1-sol",
"protocol": "chat-completions",
"endpoint": "https://jojocode.com/v1",
"localInputTokens": 12352,
"outputReservation": 2048,
"inputRatio": 2.23241288625904,
"observedOutputTokens": 2048,
"observedTotalFloor": 27467,
"reservedTokens": 29623,
"sources": [
{
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"attemptId": "dcb342bf-a983-4124-8f3a-9dd84fbf40a5",
"localInputTokens": 8093,
"reportedInputTokens": 4820,
"reportedOutputTokens": 14,
"totalTokens": 4834
},
{
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"attemptId": "19f33d0d-9344-4b27-a6b9-556bb8a3797d",
"localInputTokens": 9033,
"reportedInputTokens": 6661,
"reportedOutputTokens": 49,
"totalTokens": 6710
},
{
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"attemptId": "53337890-31fe-4261-9604-c9ffff6139c3",
"localInputTokens": 10626,
"reportedInputTokens": 11387,
"reportedOutputTokens": 387,
"totalTokens": 11774
},
{
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"attemptId": "23226d1c-9ad6-4daa-81f5-1b44f0d57ecc",
"localInputTokens": 12168,
"reportedInputTokens": 27164,
"reportedOutputTokens": 303,
"totalTokens": 27467
},
{
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"attemptId": "4ed9deb8-58e1-47e0-9585-48c4e644e68f",
"localInputTokens": 12147,
"reportedInputTokens": 8619,
"reportedOutputTokens": 60,
"totalTokens": 8679
},
{
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"attemptId": "704d88f7-fbef-4507-9597-22cf79481961",
"localInputTokens": 12352,
"reportedInputTokens": 13012,
"reportedOutputTokens": 95,
"totalTokens": 13107
}
]
}
]
},
"remainingTokens": 17429,
"requiredInputTokens": 12352,
"imageReservationTokens": 0,
"imageEstimate": null,
"breakdown": {
"transportAndImageFramingTokens": 34,
"goalAndContextTextTokens": 5151,
"toolDefinitionTokens": 4571,
"historyAndEvidenceTokens": 2596,
"imageReservationTokens": 0
},
"runUsage": {
"requests": 6,
"inputTokens": 71663,
"outputTokens": 908,
"totalTokens": 72571,
"unknownRequests": 0,
"estimatedUnknownTokens": 0
},
"taskUsage": {
"requests": 6,
"inputTokens": 71663,
"outputTokens": 908,
"totalTokens": 72571,
"unknownRequests": 0,
"estimatedUnknownTokens": 0
},
"tokenAccounting": {
"schemaVersion": 1,
"singleInFlightResponseMayExceed": true,
"run": {
"maximumTokens": 90000,
"reportedTokens": 72571,
"unknownRequests": 0,
"estimatedUnknownTokens": 0,
"accountedTokens": 72571,
"remainingTokens": 17429,
"exceededTokens": 0
},
"task": {
"maximumTokens": 90000,
"reportedTokens": 72571,
"unknownRequests": 0,
"estimatedUnknownTokens": 0,
"accountedTokens": 72571,
"remainingTokens": 17429,
"exceededTokens": 0
}
},
"runBudget": {
"maxSteps": 8,
"maxDurationMs": 600000,
"maxTokens": 90000,
"maxTaskTokens": 90000
},
"taskBudget": {
"maxTokens": 90000
},
"note": "本地预留与上游报告用量分开记录。单个在途响应可能超过预估;超额后停止后续请求,未知用量保持未知。"
},
"pageSizing": [
{
"request": 1,
"readMessageBytes": 4893,
"nextFixed": 8093,
"retention": 0,
"assistantCalls": 1
},
{
"request": 2,
"readMessageBytes": 1360,
"nextFixed": 8762,
"retention": 0,
"assistantCalls": 2
},
{
"request": 3,
"readMessageBytes": 1024,
"nextFixed": 9407,
"retention": 0,
"assistantCalls": 6
},
{
"request": 4,
"readMessageBytes": 1024,
"nextFixed": 10585,
"retention": 0,
"assistantCalls": 1
},
{
"request": 5,
"readMessageBytes": 1024,
"nextFixed": 10710,
"retention": 931,
"assistantCalls": 1
},
{
"request": 6,
"readMessageBytes": 1024,
"nextFixed": 10722,
"retention": 931,
"assistantCalls": 1
}
],
"sourceCommit": "54dbe3d6fc7b068e37010222a09cff244975b2c0",
"sourceInputs": [
{
"path": "src/core/context/read-budget.mjs",
"capturedPath": "analysis/source-inputs/src/core/context/read-budget.mjs.txt",
"sha256": "8bf309d662240a89f952a3f70260301868c8976593f92696f46e64acc3e15307",
"bytes": 13897
},
{
"path": "src/core/context/request-plan.mjs",
"capturedPath": "analysis/source-inputs/src/core/context/request-plan.mjs.txt",
"sha256": "0525beddf1ca05d84d780972e9a97c013f48de69e716a77be1c86ff3a2952e7d",
"bytes": 40633
},
{
"path": "src/core/context/working-set.mjs",
"capturedPath": "analysis/source-inputs/src/core/context/working-set.mjs.txt",
"sha256": "a8e9183321c3b5bc2afb7955a6daf496ff72d3e938be9b9ec514eaacfa7352be",
"bytes": 11071
},
{
"path": "src/core/context/tool-feedback.mjs",
"capturedPath": "analysis/source-inputs/src/core/context/tool-feedback.mjs.txt",
"sha256": "a6c6350cd5b708624176c7b588b00a64358ec69ab6ab9447caedf7c482f4c817",
"bytes": 9640
},
{
"path": "src/server/provider.mjs",
"capturedPath": "analysis/source-inputs/src/server/provider.mjs.txt",
"sha256": "0f90fbe160396ac341b9235ed428f8469affd9e1f4ccd74626e10d541a08be51",
"bytes": 42923
},
{
"path": "src/server/runtime.mjs",
"capturedPath": "analysis/source-inputs/src/server/runtime.mjs.txt",
"sha256": "b8ef89b2f356496504190b08ed5c7362cf06358731139f7fc73a8ba46242e0d5",
"bytes": 89124
},
{
"path": "src/shared/contracts/model-request.mjs",
"capturedPath": "analysis/source-inputs/src/shared/contracts/model-request.mjs.txt",
"sha256": "c4846621c0405a6d89f09a611049579b2846e3fa2c2ef589fdb1abb1599e60a2",
"bytes": 7952
},
{
"path": "src/shared/contracts/model-reservation.mjs",
"capturedPath": "analysis/source-inputs/src/shared/contracts/model-reservation.mjs.txt",
"sha256": "7f3e0f21720dc19efd5c675ae65e4eeed96dffb41c42a3d460fcc9f0b6473c6c",
"bytes": 6741
}
],
"fileCoverage": {
"path": "test/expense.test.mjs",
"totalCharacters": 2584,
"contiguousReturnedCharacters": 1271,
"ranges": [
[
0,
473
],
[
473,
875
],
[
875,
1271
]
],
"missingCharacters": 1313
},
"conclusion": "The seventh send was rejected because the observed-route reservation 29623 exceeds remaining 17429, while local required input 12352 fits its context input budget. This is not a new context_limit or network failure. Tool paging used the 1024-byte floor; metadata reduced later effective pages to949. No budget or reservation guard was disabled."
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,413 @@
{
"stopReason": "token_limit",
"finalUsage": {
"requests": 6,
"inputTokens": 71663,
"outputTokens": 908,
"totalTokens": 72571,
"unknownRequests": 0,
"estimatedUnknownTokens": 0
},
"contextBudget": null,
"budgetNotice": [
"任务目标、完整追加要求与必需请求开销超过剩余token预算。完整历史已保留;请核对模型上下文或任务预算后继续。"
],
"pages": [
{
"artifactId": "08ef671d-dbda-4a53-846e-6d14b1a15b3d",
"artifactSha256": "55a48762ac74d0be73e09fb91c59e28a649b93a0802a016d31cd99a8bee0514e",
"path": "test/expense.test.mjs",
"start_line": 1,
"end_line": 9,
"total_lines": 38,
"content": "import test from 'node:test';\nimport assert from 'node:assert/strict';\nimport { amountToCents } from '../src/amount.mjs';\nimport { summarize } from '../src/summary.mjs';\nimport { formatReport } from '../src/report.mjs';\ntest('decimal strings become exact cents including zero and refunds',()=>{\n for(const [input,expected] of [['0',0],[' 12.34 ',1234],['+2.5',250],['-1.05',-105],['-0.00',0],['0009.10',910]]) assert.equal(amountToCents(input),expected);\n});\ntest('finite ",
"sha256": "0bcda551dbaeafad9a6e3df8024492ab67d7c09956f4676c393b78249ab44839",
"bom": false,
"truncated": true,
"range_start_line": 1,
"range_end_line": 38,
"offset": 0,
"next_offset": 473,
"total_characters": 2584,
"returned_characters": 473,
"requested_offset": 0,
"next_start_line": null,
"budget_limited": true,
"maximum_message_bytes": 1024
},
{
"artifactId": "d3ac2079-98b6-4ca4-a1d7-07187d38e71b",
"artifactSha256": "08b6595803497876c0745e6f72fab5d5a5233864e2f6447608b51adc2b7ddcf1",
"path": "src/amount.mjs",
"start_line": 1,
"end_line": 2,
"total_lines": 2,
"content": "export function amountToCents(value) { return 0; }\n",
"sha256": "84cb647328ec52dad27d288f3a6127ff3e1ad87274ae2d227ad44daa49cbb2ed",
"bom": false,
"truncated": false,
"range_start_line": 1,
"range_end_line": 2,
"offset": 0,
"next_offset": 51,
"total_characters": 51,
"returned_characters": 51,
"requested_offset": 0,
"next_start_line": null,
"budget_limited": false,
"maximum_message_bytes": 1024
},
{
"artifactId": "80102911-4a35-4cd0-a016-1a018f48f8ab",
"artifactSha256": "17ea0f01e00d78ced1813dd906e6ef4b14de864d14467d17538674fda3be87af",
"path": "src/summary.mjs",
"start_line": 1,
"end_line": 3,
"total_lines": 3,
"content": "import { amountToCents } from './amount.mjs';\nexport function summarize(rows) { return []; }\n",
"sha256": "48829850c11ca0cd0ab5e86bbac69a0c5f90297292168c1ba6dc338e2eae6ee7",
"bom": false,
"truncated": false,
"range_start_line": 1,
"range_end_line": 3,
"offset": 0,
"next_offset": 93,
"total_characters": 93,
"returned_characters": 93,
"requested_offset": 0,
"next_start_line": null,
"budget_limited": false,
"maximum_message_bytes": 1024
},
{
"artifactId": "4f5dd2b2-b8f2-450a-8857-64ace056701a",
"artifactSha256": "4cdaf349f368e66ecb05754fd3146c6b097426dee6f0d9b363480b79fbde897d",
"path": "src/report.mjs",
"start_line": 1,
"end_line": 2,
"total_lines": 2,
"content": "export function formatReport(groups) { return ''; }\n",
"sha256": "ba0a014e6e9df710d66e255a3a6f970f4e1c8af48accc81f33627029dcded7c0",
"bom": false,
"truncated": false,
"range_start_line": 1,
"range_end_line": 2,
"offset": 0,
"next_offset": 52,
"total_characters": 52,
"returned_characters": 52,
"requested_offset": 0,
"next_start_line": null,
"budget_limited": false,
"maximum_message_bytes": 1024
},
{
"artifactId": "2f7a8793-ddc6-4f5e-8c03-20f388477df2",
"artifactSha256": "97a1466a183c119ef656ff43ed50e198ed623d1054ad368a651b4b9c1eb1b126",
"artifact_id": "08ef671d-dbda-4a53-846e-6d14b1a15b3d",
"kind": "tool-result",
"sha256": "55a48762ac74d0be73e09fb91c59e28a649b93a0802a016d31cd99a8bee0514e",
"content": "{\"path\":\"test/expense.test.mjs\",\"start_line\":1,\"end_line\":9,\"total_lines\":38,\"content\":\"import test from 'node:test';\\nimport assert from 'node:assert/strict';\\nimport { amountToCents } from '../src/amount.mjs';\\nimport { summarize } from '../src/summary.mjs';\\nimport { formatReport } from '../src/report.mjs';\\ntest('decimal strings become exact cents including zero and refunds',()=>{\\n for(const [input,expected] of [['0',0],[' 12.34 ',1234],['+2.5',250],['-1.05',-105],['-0.00',0],['0009.1",
"offset": 0,
"next_offset": 495,
"returned_characters": 495,
"total_characters": 891,
"truncated": true,
"requested_offset": 0,
"requested_limit": 16000,
"budget_limited": true,
"maximum_message_bytes": 1024
},
{
"artifactId": "edf696bb-a422-480f-8bb7-9e26a3e617cf",
"artifactSha256": "bc72011d44f3ca02d4e9c86f81c03ce8a5e5b9fb0d4676cac1b81262a8581d6f",
"path": "test/expense.test.mjs",
"start_line": 9,
"end_line": 13,
"total_lines": 38,
"content": "decimal numbers use the same cents contract',()=>{\n for(const [input,expected] of [[0,0],[1.01,101],[2.5,250],[-4.32,-432]]) assert.equal(amountToCents(input),expected);\n});\ntest('malformed overprecision nonfinite and unsafe amounts are rejected',()=>{\n for(const input of ['',null,undefined,true,{},'1e2','1,000','.50','1.234',1.234,NaN,Infinity,'900719925474099.99']) assert.throws(()=>amountToCent",
"sha256": "0bcda551dbaeafad9a6e3df8024492ab67d7c09956f4676c393b78249ab44839",
"bom": false,
"truncated": true,
"range_start_line": 1,
"range_end_line": 38,
"offset": 473,
"next_offset": 875,
"total_characters": 2584,
"returned_characters": 402,
"requested_offset": 473,
"next_start_line": null,
"budget_limited": true,
"maximum_message_bytes": 949,
"tool_invocation_id": "4f23d490-0097-4f20-ba50-55dc9397f5b1"
},
{
"artifactId": "10b394db-47e8-43b7-8622-274660e3bbec",
"artifactSha256": "aae0745c80c0a0eb7489c0a23e29e829c6d896852a3df709415e8cd8af784174",
"path": "test/expense.test.mjs",
"start_line": 13,
"end_line": 19,
"total_lines": 38,
"content": "s(input),TypeError,String(input));\n});\ntest('independent currencies are sorted and summed without floating point loss',()=>{\n assert.deepEqual(summarize([{currency:'usd',amount:'0.10'},{currency:' CNY ',amount:3},{currency:'USD',amount:'0.20'}]),[\n {currency:'CNY',cents:300,count:1},{currency:'USD',cents:30,count:2}]);\n});\ntest('refunds cancel totals while counting every original record',(",
"sha256": "0bcda551dbaeafad9a6e3df8024492ab67d7c09956f4676c393b78249ab44839",
"bom": false,
"truncated": true,
"range_start_line": 1,
"range_end_line": 38,
"offset": 875,
"next_offset": 1271,
"total_characters": 2584,
"returned_characters": 396,
"requested_offset": 875,
"next_start_line": null,
"budget_limited": true,
"maximum_message_bytes": 949,
"tool_invocation_id": "12807636-04f3-4687-803d-e53897d0550e"
}
],
"sizing": [
{
"id": "41ba3440-652b-4a3c-b75d-9ebfa3fb149a",
"mandatoryInputTokens": 8093,
"nextReadFixedInputTokens": 8093,
"workingRetentionTokens": 0,
"inputBudget": 12352,
"estimatedInputTokens": 8093,
"requestBytes": 23127,
"reservation": 10141,
"observedInputRatio": 1
},
{
"id": "37fc50ae-d4f3-44ae-89d4-a697d61c033b",
"mandatoryInputTokens": 9077,
"nextReadFixedInputTokens": 8762,
"workingRetentionTokens": 0,
"inputBudget": 12352,
"estimatedInputTokens": 9033,
"requestBytes": 25899,
"reservation": 11081,
"observedInputRatio": 1
},
{
"id": "7859d5d8-f6d7-4c58-a82a-23dccd047e56",
"mandatoryInputTokens": 10138,
"nextReadFixedInputTokens": 9407,
"workingRetentionTokens": 0,
"inputBudget": 12352,
"estimatedInputTokens": 10626,
"requestBytes": 30629,
"reservation": 12674,
"observedInputRatio": 1
},
{
"id": "c71f0cd0-48a0-4355-9190-8a618a94c193",
"mandatoryInputTokens": 12168,
"nextReadFixedInputTokens": 10585,
"workingRetentionTokens": 0,
"inputBudget": 12352,
"estimatedInputTokens": 12168,
"requestBytes": 35303,
"reservation": 15088,
"observedInputRatio": 1.0716167890080934
},
{
"id": "ab87c61f-1d9a-4f59-95cd-f773ad611777",
"mandatoryInputTokens": 11246,
"nextReadFixedInputTokens": 10710,
"workingRetentionTokens": 931,
"inputBudget": 12352,
"estimatedInputTokens": 12147,
"requestBytes": 35191,
"reservation": 29166,
"observedInputRatio": 2.23241288625904
},
{
"id": "81bda9ce-e1a2-4580-99a5-e7b43fd4d22a",
"mandatoryInputTokens": 11247,
"nextReadFixedInputTokens": 10722,
"workingRetentionTokens": 931,
"inputBudget": 12352,
"estimatedInputTokens": 12352,
"requestBytes": 35808,
"reservation": 29623,
"observedInputRatio": 2.23241288625904
}
],
"upstreamUsage": [
{
"n": 1,
"localRequestBytes": 23127,
"prompt_tokens": 4820,
"completion_tokens": 14,
"total_tokens": 4834
},
{
"n": 2,
"localRequestBytes": 25899,
"prompt_tokens": 6661,
"completion_tokens": 49,
"total_tokens": 6710
},
{
"n": 3,
"localRequestBytes": 30629,
"prompt_tokens": 11387,
"completion_tokens": 387,
"total_tokens": 11774,
"completion_tokens_details": {
"reasoning_tokens": 26
}
},
{
"n": 4,
"localRequestBytes": 35303,
"prompt_tokens": 27164,
"completion_tokens": 303,
"total_tokens": 27467,
"prompt_tokens_details": {
"cached_tokens": 24192
},
"completion_tokens_details": {
"reasoning_tokens": 195
}
},
{
"n": 5,
"localRequestBytes": 35191,
"prompt_tokens": 8619,
"completion_tokens": 60,
"total_tokens": 8679,
"completion_tokens_details": {
"reasoning_tokens": 16
}
},
{
"n": 6,
"localRequestBytes": 35808,
"prompt_tokens": 13012,
"completion_tokens": 95,
"total_tokens": 13107,
"completion_tokens_details": {
"reasoning_tokens": 16
}
}
],
"readCoverage": {
"schemaVersion": 1,
"reads": [
{
"identity": "file:test/expense.test.mjs:1:38:0bcda551dbaeafad9a6e3df8024492ab67d7c09956f4676c393b78249ab44839",
"kind": "project-file",
"ranges": [
[
0,
1271
]
]
},
{
"identity": "file:src/amount.mjs:1:2:84cb647328ec52dad27d288f3a6127ff3e1ad87274ae2d227ad44daa49cbb2ed",
"kind": "project-file",
"ranges": [
[
0,
51
]
]
},
{
"identity": "file:src/summary.mjs:1:3:48829850c11ca0cd0ab5e86bbac69a0c5f90297292168c1ba6dc338e2eae6ee7",
"kind": "project-file",
"ranges": [
[
0,
93
]
]
},
{
"identity": "file:src/report.mjs:1:2:ba0a014e6e9df710d66e255a3a6f970f4e1c8af48accc81f33627029dcded7c0",
"kind": "project-file",
"ranges": [
[
0,
52
]
]
},
{
"identity": "08ef671d-dbda-4a53-846e-6d14b1a15b3d:55a48762ac74d0be73e09fb91c59e28a649b93a0802a016d31cd99a8bee0514e",
"kind": "tool-result",
"ranges": [
[
0,
495
]
]
}
],
"repeated": 0,
"changingIndexes": [],
"warning": null,
"pause": false,
"readWindow": {
"runId": "cf10d58a-d3af-4b03-9bef-77fb54837878",
"reads": [
{
"identity": "file:test/expense.test.mjs:1:38:0bcda551dbaeafad9a6e3df8024492ab67d7c09956f4676c393b78249ab44839",
"ranges": [
[
0,
1271
]
]
},
{
"identity": "file:src/amount.mjs:1:2:84cb647328ec52dad27d288f3a6127ff3e1ad87274ae2d227ad44daa49cbb2ed",
"ranges": [
[
0,
51
]
]
},
{
"identity": "file:src/summary.mjs:1:3:48829850c11ca0cd0ab5e86bbac69a0c5f90297292168c1ba6dc338e2eae6ee7",
"ranges": [
[
0,
93
]
]
},
{
"identity": "file:src/report.mjs:1:2:ba0a014e6e9df710d66e255a3a6f970f4e1c8af48accc81f33627029dcded7c0",
"ranges": [
[
0,
52
]
]
},
{
"identity": "08ef671d-dbda-4a53-846e-6d14b1a15b3d:55a48762ac74d0be73e09fb91c59e28a649b93a0802a016d31cd99a8bee0514e",
"ranges": [
[
0,
495
]
]
}
]
},
"last": {
"artifactId": "file:test/expense.test.mjs:1:38",
"sha256": "0bcda551dbaeafad9a6e3df8024492ab67d7c09956f4676c393b78249ab44839",
"offset": 875,
"nextOffset": 1271,
"invocationId": "12807636-04f3-4687-803d-e53897d0550e",
"contentSha256": "733734829fa55c9b9b1d3a7747fdba59cacd22a1d7ccc8c9df8b95b8267960b3"
}
},
"observation": "Read pages advanced; this is not the same-range retry/no-progress guard. Upstream usage is retained as reported, not replaced by local byte estimates. Reading throughput and wrapper selection need bounded offline reproduction before any product fix."
}
@@ -0,0 +1,182 @@
import { createHash } from 'node:crypto';
const messageBytes = (result, callId) => Buffer.byteLength(JSON.stringify({ role: 'tool', tool_call_id: callId, content: JSON.stringify(result) }), 'utf8');
export const BROWSER_READ_HINT = '当前Run已经返回此页面结果区间,请使用已返回的实际字段或按next_offset读取新段;页面失败后准备修正的新计划。';
export const readMetadataReserve = metadata => Object.keys(metadata).length
? Buffer.byteLength(JSON.stringify(JSON.stringify(metadata)), 'utf8') + 8 : 0;
const boundary = (text, end) => end > 0 && end < text.length && /[\uD800-\uDBFF]/.test(text[end - 1]) ? end - 1 : end;
// This is the actual tool page, not a rewrite of a historical result. Count
// the escaped JSON tool message which will be present in the next request.
export function artifactPage(artifact, text, args, { maximumMessageBytes = 16000, callId = '' } = {}) {
const requestedOffset = args.offset ?? 0, requestedLimit = args.limit ?? 2000;
let offset = Math.min(requestedOffset, text.length);
if (offset > 0 && /[\uDC00-\uDFFF]/.test(text[offset]) && /[\uD800-\uDBFF]/.test(text[offset - 1])) offset--;
let maximumEnd = boundary(text, Math.min(offset + requestedLimit, text.length));
if (maximumEnd === offset && offset < text.length) maximumEnd = boundary(text, Math.min(offset + 2, text.length));
const make = end => ({ artifact_id: artifact.id, kind: artifact.kind, sha256: artifact.sha256,
content: text.slice(offset, end), offset, next_offset: end, returned_characters: end - offset,
total_characters: text.length, truncated: end < text.length, requested_offset: requestedOffset, requested_limit: requestedLimit,
budget_limited: end < maximumEnd, maximum_message_bytes: maximumMessageBytes });
let low = offset, high = maximumEnd;
if (messageBytes(make(low), callId) > maximumMessageBytes) throw new Error('当前请求预算无法容纳工件读取元数据,请先核对任务预算。');
while (low < high) {
const middle = Math.ceil((low + high) / 2), end = boundary(text, middle);
if (messageBytes(make(end), callId) <= maximumMessageBytes) low = middle; else high = middle - 1;
}
const end = boundary(text, low), result = make(end);
if (offset < maximumEnd && end <= offset) throw new Error('当前请求预算无法容纳下一个完整字符,请先核对任务预算。');
return result;
}
export function readMessageBudget(plan, message) {
const calls = message.tool_calls?.length ?? 1;
const assistantTokens = Math.ceil(Buffer.byteLength(JSON.stringify(message), 'utf8') / 3) + 8;
// Reserve space for the current call's framing and the next state/notice.
// The next request also gains bounded read coverage and route observations.
// Reserve their growth before returning a page, rather than dropping that
// new page or enlarging the request budget afterwards.
const tokens = plan.budget.inputBudget - (plan.nextReadFixedInputTokens ?? plan.mandatoryInputTokens) - (plan.workingRetentionTokens ?? 0) - assistantTokens - calls * 8 - 512 - 2048;
return Math.max(1024, Math.floor(tokens * 3 / calls));
}
export function filePage(file, args, { maximumMessageBytes = 16000, callId = '' } = {}) {
const text = file.content, requestedOffset = args.offset ?? 0;
let offset = Math.min(requestedOffset, text.length);
if (offset > 0 && /[\uDC00-\uDFFF]/.test(text[offset]) && /[\uD800-\uDBFF]/.test(text[offset - 1])) offset--;
let maximumEnd = boundary(text, Math.min(text.length, offset + (args.limit ?? text.length)));
if (maximumEnd === offset && offset < text.length) maximumEnd = boundary(text, Math.min(offset + 2, text.length));
const newlineCount = value => value.split('\n').length - 1;
const startLine = file.start_line + newlineCount(text.slice(0, offset));
const make = end => ({ ...file, content: text.slice(offset, end),
range_start_line: file.start_line, range_end_line: file.end_line,
start_line: startLine, end_line: Math.min(file.end_line, file.start_line + newlineCount(text.slice(0, end))),
offset, next_offset: end, total_characters: text.length, returned_characters: end - offset,
requested_offset: requestedOffset, next_start_line: end < text.length ? null : file.end_line < file.total_lines ? file.end_line + 1 : null,
truncated: file.truncated || offset > 0 || end < text.length, budget_limited: end < maximumEnd,
maximum_message_bytes: maximumMessageBytes });
let low = offset, high = maximumEnd;
if (messageBytes(make(low), callId) > maximumMessageBytes) throw new Error('当前请求预算无法容纳文件读取元数据,请先核对任务预算。');
while (low < high) {
const middle = Math.ceil((low + high) / 2), end = boundary(text, middle);
if (messageBytes(make(end), callId) <= maximumMessageBytes) low = middle; else high = middle - 1;
}
const end = boundary(text, low);
if (offset < maximumEnd && end <= offset) throw new Error('当前请求预算无法容纳下一个完整字符,请先核对任务预算。');
return make(end);
}
export function recordArtifactRead(task, artifact, result, invocationId, runId = task.activeRunId ?? null) {
const progress = task.readProgress ??= { schemaVersion: 1, reads: [], repeated: 0, changingIndexes: [], warning: null, pause: false };
const identity = artifact.id + ':' + (artifact.section ? artifact.section + ':' : '') + artifact.sha256, start = result.offset, end = result.next_offset;
let read = progress.reads.find(value => value.identity === identity);
if (!read) { read = { identity, kind: artifact.kind, ranges: [] }; progress.reads.push(read); if (progress.reads.length > 128) progress.reads.shift(); }
// Historical coverage is an audit of returned pages, not proof that a new
// Run received them in its bounded request. Re-reading different old pages
// in a continuation must not accumulate as three semantic repeats.
if (!progress.readWindow || progress.readWindow.runId !== runId) progress.readWindow = { runId, reads: [] };
let window = progress.readWindow.reads.find(value => value.identity === identity);
if (!window) { window = { identity, ranges: [] }; progress.readWindow.reads.push(window); if (progress.readWindow.reads.length > 128) progress.readWindow.reads.shift(); }
const covered = window.ranges.some(range => start >= range[0] && end <= range[1]);
progress.repeated = covered ? progress.repeated + 1 : 0;
const merge = ranges => {
ranges.sort((a, b) => a[0] - b[0]); const merged = [];
for (const range of ranges) { const previous = merged.at(-1); if (previous && range[0] <= previous[1]) previous[1] = Math.max(previous[1], range[1]); else merged.push(range); }
return merged.slice(-64);
};
if (!covered) window.ranges = merge([...window.ranges, [start, end]]);
if (!read.ranges.some(range => start >= range[0] && end <= range[1])) read.ranges = merge([...read.ranges, [start, end]]);
if (artifact.kind === 'context-history-index') {
if (!progress.changingIndexes.includes(identity)) progress.changingIndexes.push(identity);
progress.changingIndexes = progress.changingIndexes.slice(-8);
} else progress.changingIndexes = [];
progress.warning = progress.repeated >= 1 ? '本次运行已经返回该工件区间,请使用已返回内容,或按next_offset读取新的区间。'
: progress.changingIndexes.length >= 3 ? '连续读取更新的历史索引没有推进工程;请直接读取实际结果或项目文件,依据已有信息继续任务。' : null;
progress.pause = progress.checkPause === true || progress.noopPause === true || progress.repeated >= 3 || progress.changingIndexes.length >= 6;
progress.last = { artifactId: artifact.id, sha256: artifact.sha256, offset: start, nextOffset: end, invocationId,
contentSha256: createHash('sha256').update(result.content, 'utf8').digest('hex') };
return progress;
}
export function clearReadStreak(task) {
if (!task.readProgress) return;
task.readProgress.repeated = 0; task.readProgress.changingIndexes = []; task.readProgress.warning = null; task.readProgress.pause = false;
task.readProgress.sessionInspection = null;
task.readProgress.observations = [];
task.readProgress.checkPause = false;
task.readProgress.noopPause = false;
task.readProgress.resultRepeats = 0;
}
export function recordFileRead(task, result, invocationId, runId) {
return recordArtifactRead(task, { id: 'file:' + result.path + ':' + result.range_start_line + ':' + result.range_end_line,
sha256: result.sha256, kind: 'project-file' }, result, invocationId, runId);
}
export function recordUnchangedCheck(task, job, runId) {
const progress = task.readProgress ??= { schemaVersion: 1, reads: [], repeated: 0, changingIndexes: [], warning: null, pause: false };
const observations = progress.observations ??= [];
let value = observations.find(value => value.runId === runId && value.key === 'check:' + job.inputIdentity);
if (!value) { value = { runId, key: 'check:' + job.inputIdentity, count: 0 }; observations.push(value); if (observations.length > 64) observations.shift(); }
value.count++;
progress.warning = '所选检查的已记录输入未变化,已返回原检查日志,没有再次执行。请依据失败修复源码;确需重跑可由用户在工程检查中确认。';
progress.checkPause ||= value.count >= 2;
progress.pause ||= progress.checkPause;
return progress;
}
export function recordBrowserRead(task, result, invocationId, runId = task.activeRunId ?? null) {
const progress = recordArtifactRead(task, { id: result.source_artifact_id, sha256: result.view_sha256, kind: 'browser-result-view', section: result.section }, result, invocationId, runId);
progress.last.section = result.section; progress.last.sourceSha256 = result.source_sha256;
result.repeated_read_count = progress.repeated;
if (progress.warning) result.reading_hint = BROWSER_READ_HINT;
return progress;
}
export function recordSessionInspection(task, result) {
const progress = task.readProgress ??= { schemaVersion: 1, reads: [], repeated: 0, changingIndexes: [], warning: null, pause: false };
const execution = result.execution ?? {};
// Revision, request usage and tool counters change merely by inspecting.
// They must not make identical engineering state appear to be progress.
const state = { sessionId: result.session?.id,
lastFailure: result.lastFailure, changes: result.changes, approvals: result.pendingApprovals,
verification: execution.task?.verification && { status: execution.task.verification.status, sourceFingerprint: execution.task.verification.sourceFingerprint },
taskPlanId: execution.task?.currentTaskPlanId,
taskProofs: execution.taskProofs?.map(proof => ({ id: proof.id, planId: proof.planId, stepKey: proof.stepKey, status: proof.status })),
browserJobs: execution.browserJobs?.map(job => ({ id: job.id, planId: job.planId, status: job.status, resultSha256: job.resultSha256, assertions: job.assertions })),
needsVerification: execution.progress?.requiresVerification,
checks: execution.checks?.map(job => ({ inputIdentity: job.inputIdentity, fingerprint: job.fingerprint, status: job.status, stale: job.stale,
results: job.results.map(check => ({ name: check.name, status: check.status, exitCode: check.exitCode, tests: check.tests })) })),
changeSets: execution.changeSets?.map(set => ({ id: set.id, status: set.status, requiresVerification: set.requiresVerification })),
deliveries: execution.deliveries?.map(job => ({ id: job.id, status: job.status, commit: job.commit })) };
const signature = createHash('sha256').update(JSON.stringify(state)).digest('hex');
const previous = progress.sessionInspection;
const consecutive = previous?.signature === signature ? previous.consecutive + 1 : 1;
progress.sessionInspection = { signature, consecutive };
progress.warning = consecutive >= 2 ? '连续核对的工程状态没有变化,请使用已经返回的状态与源码推进当前任务。' : null;
progress.pause = progress.checkPause === true || progress.noopPause === true || consecutive >= 3 || progress.repeated >= 3;
return progress;
}
export function recordUnchangedAction(task,tool,result,runId){
const progress=task.readProgress??={schemaVersion:1,reads:[],repeated:0,changingIndexes:[],warning:null,pause:false};
const observations=progress.observations??=[];
const key=JSON.stringify(['unchanged-action',tool,result.proof_id??result.path]);
let entry=observations.find(value=>value.runId===runId&&value.key===key);
if(!entry){entry={runId,key,count:0};observations.push(entry);if(observations.length>64)observations.shift();}
entry.count++;
progress.warning='本次操作没有新增文件修改或步骤证明;请使用原结果推进任务,重复核验或相同内容提案不会恢复进展计数。';
progress.noopPause ||= entry.count>=3;progress.pause ||= progress.noopPause;
return entry.count;
}
export function readCoverageContext(task,runId){
const progress=task.readProgress,window=progress?.readWindow;
if(!window||window.runId!==runId||!window.reads.length)return null;
const snapshot={schemaVersion:1,run_id:runId,semantics:'ranges_returned_by_tools_in_this_run_not_a_guarantee_all_content_is_in_this_request',
covered:window.reads.slice(-6).map(value=>({identity:value.identity,ranges:value.ranges.slice(-4)})),
total_sources:window.reads.length,truncated:window.reads.length>6||window.reads.some(value=>value.ranges.length>4),
note:'相同SHA的已返回区间可以使用当前工作依据,缺失内容仍可必要重读;新分页、新SHA或新的实际检查分别核对,不重放旧工具。'};
while(snapshot.covered.length&&Buffer.byteLength(JSON.stringify(snapshot),'utf8')>2000){snapshot.covered.shift();snapshot.truncated=true;}
return snapshot;
}
@@ -0,0 +1,501 @@
import { createHash, randomUUID } from 'node:crypto';
import { BudgetExceeded, accountedTokens } from '../../shared/contracts/execution.mjs';
import { completionBody, requestMetrics, requestVariants, requestHistory, outputReservation, requestImages } from '../../shared/contracts/model-request.mjs';
import { workingCandidates, workingDocument, workingEntry, workingMessage, verifyWorkingDocument } from './working-set.mjs';
import { latestToolDocument, latestToolMessage, verifyLatestToolDocument } from './tool-feedback.mjs';
import { projectMemoryMessage, MEMORY_CONTEXT_LIMITS } from '../memory/project-memory.mjs';
import { skillCatalogMessage, SKILL_LIMITS } from '../skills/skill-registry.mjs';
import { mcpCatalogMessage, MCP_LIMITS } from '../tools/mcp-contract.mjs';
import { modelReservation,taskConsumption,verifyModelReservation } from '../../shared/contracts/model-reservation.mjs';
const hash = value => createHash('sha256').update(typeof value === 'string' ? value : JSON.stringify(value), 'utf8').digest('hex');
const PLACEHOLDER_ID = '00000000-0000-0000-0000-000000000000';
const PLACEHOLDER_SHA = '0'.repeat(64);
const ARCHIVE_CHARACTERS = 1_000_000;
function protocolError(message) {
const error = new Error('请求上下文协议需要核对:' + message);
error.diagnostic = { source: 'workbench', stage: 'context_plan', kind: 'protocol', title: '上下文消息配对无效',
message: error.message, retryable: false, occurredAt: new Date().toISOString() };
return error;
}
export function historyGroups(messages) {
if (!Array.isArray(messages)) throw protocolError('历史不是消息数组。');
const groups = [], seen = new Set();
for (let index = 0; index < messages.length; index++) {
const start = index, message = messages[index];
if (!message || !['system', 'user', 'assistant'].includes(message.role)) throw protocolError('发现孤立工具结果或未知消息角色。');
const calls = message.tool_calls;
if (calls !== undefined && (!Array.isArray(calls) || message.role !== 'assistant')) throw protocolError('工具调用必须来自assistant消息。');
if (calls?.length) {
const expected = new Set();
for (const call of calls) {
if (typeof call?.id !== 'string' || !call.id || seen.has(call.id) || expected.has(call.id)
|| call.type !== 'function' || typeof call.function?.name !== 'string' || typeof call.function?.arguments !== 'string') throw protocolError('工具调用身份重复或格式无效。');
expected.add(call.id); seen.add(call.id);
}
for (let count = 0; count < calls.length; count++) {
const result = messages[++index];
if (result?.role !== 'tool' || typeof result.content !== 'string' || !expected.delete(result.tool_call_id)) throw protocolError('缺少、重复或错配的工具结果。');
}
if (expected.size || messages[index + 1]?.role === 'tool') throw protocolError('工具结果数量不匹配。');
}
const items = messages.slice(start, index + 1);
const serialized = JSON.stringify(items);
groups.push({ index: groups.length, startMessage: start, endMessage: index, messages: items, sha256: hash(serialized),
contributionTokens: Math.ceil(Buffer.byteLength(serialized, 'utf8') / 3) + items.length * 8 });
}
return groups;
}
export function budgetFor(config, run, task, transportReservationTokens = 0) {
const outputReservation = config.maxOutputTokens;
const safetyTokens = Math.max(512, Math.ceil(Math.min(config.contextLimit, 24000) * 0.1));
const remaining = (maximum, usage) => maximum > 0 ? Math.max(0, maximum - accountedTokens(usage)) : null;
const runRemainingTokens = remaining(run?.budget?.maxTokens, run?.usage);
const taskRemainingTokens = remaining(task?.budget?.maxTokens, task?.usage);
let limit = config.contextLimit, reason = 'context_limit';
if (runRemainingTokens !== null && runRemainingTokens < limit) { limit = runRemainingTokens; reason = 'token_limit'; }
if (taskRemainingTokens !== null && taskRemainingTokens < limit) { limit = taskRemainingTokens; reason = 'task_token_limit'; }
if(!Number.isSafeInteger(transportReservationTokens)||transportReservationTokens<0)throw new Error('请求封装预留无效。');
const inputBudget = limit - outputReservation - safetyTokens - transportReservationTokens;
return { contextLimit: config.contextLimit, outputReservation, safetyTokens, ...(transportReservationTokens?{transportReservationTokens}:{}), inputBudget, targetInputTokens: Math.min(16000, inputBudget),
runRemainingTokens, taskRemainingTokens, limitingReason: reason };
}
function compactResult(result) {
let value;
try { value = JSON.parse(result.content); } catch { return { format: 'text' }; }
if (!value || typeof value !== 'object' || Array.isArray(value)) return { format: 'json-value' };
const selected = {};
for (const key of ['status', 'requires_verification', 'check_status', 'exit_code', 'change_id', 'change_set_id', 'plan_id', 'job_id',
'artifact_id', 'logArtifactId', 'report_status', 'task_id', 'path', 'sha256', 'base_sha256', 'fingerprint', 'offset', 'next_offset', 'total_characters', 'truncated']) {
const item = value[key];
if (typeof item === 'string' && item.length <= 200 || typeof item === 'boolean' || typeof item === 'number' && Number.isFinite(item) || item === null) selected[key] = item;
}
return selected;
}
function describe(group, ledger, artifacts) {
const assistant = group.messages[0], tools = (assistant.tool_calls ?? []).map(call => {
const result = group.messages.find(message => message.role === 'tool' && message.tool_call_id === call.id);
const invocation = ledger.get(call.id), artifact = artifacts.get(invocation?.resultArtifactId);
let input = {}; try { const args = JSON.parse(call.function.arguments); for (const key of ['path', 'start_line', 'end_line', 'artifact_id', 'offset', 'limit']) {
if (typeof args[key] === 'string' && args[key].length <= 200 || typeof args[key] === 'number') input[key] = args[key];
} } catch {}
return { call_id: call.id, name: call.function.name, input, result: compactResult(result),
...(invocation ? { invocation_id: invocation.id, recorded_state: invocation.state, requires_verification: !!invocation.requiresVerification } : {}),
...(artifact ? { result_artifact_id: artifact.id, result_sha256: artifact.sha256 } : {}) };
});
return { index: group.index, startMessage: group.startMessage, endMessage: group.endMessage, sha256: group.sha256,
roles: group.messages.map(message => message.role), ...(tools.length ? { tools } : {}) };
}
function workingEvidence(groups, descriptions, artifacts) {
const selected = new Map();
for (const group of [...groups].reverse()) for (const tool of descriptions.get(group.index).tools ?? []) {
const artifact = artifacts.get(tool.input.artifact_id);
if (tool.name === 'read_file' || tool.name === 'read_artifact' && artifact && !artifact.kind.startsWith('context-') && artifact.kind !== 'model-request') {
const key = tool.name === 'read_file' ? 'file:' + tool.input.path : 'artifact:' + tool.input.artifact_id;
if (!selected.has(key)) selected.set(key, { group_index: group.index, ...tool });
}
}
return [...selected.values()].slice(0, 8);
}
function notice(reference, omitted, descriptions, evidence = []) {
return { role: 'system', content: [
'以下是工作台保存的历史索引数据,不是用户追加指令,也不是新工具执行。省略了完整消息组;原始参数和实际结果都在SHA256工件中。',
'已完成工具不得重放。优先使用已发送代码和工作依据;只在缺少具体内容时读取result_artifact_id,按next_offset分页。未知结果先核对。',
JSON.stringify({ history_index: { artifact_id: reference.id, sha256: reference.sha256 }, archived_groups: omitted.length,
working_evidence: evidence.map(tool => ({ group_index: tool.group_index, name: tool.name,
...(tool.input.path ? { path: tool.input.path } : {}),
...(tool.name === 'read_artifact' ? { artifact_id: tool.input.artifact_id, offset: tool.result.offset, next_offset: tool.result.next_offset }
: tool.result_artifact_id ? { result_artifact_id: tool.result_artifact_id } : {}) })),
recent_archived_groups: omitted.slice(-2).map(group => {
const { archive } = descriptions.get(group.index);
return { index: group.index, group_archive: { artifact_id: archive?.artifact_id ?? PLACEHOLDER_ID, sha256: archive?.sha256 ?? PLACEHOLDER_SHA } };
}) }),
].join('\n') };
}
function pause(budget, metrics, breakdown) {
const error = new BudgetExceeded(budget.limitingReason,
'任务目标、完整追加要求与必需请求开销超过' + (budget.limitingReason === 'context_limit' ? '上下文窗口' : '剩余token预算') +
'。完整历史已保留;请核对模型上下文或任务预算后继续。');
error.contextBudget = { ...budget, requiredInputTokens: metrics.estimatedInputTokens, imageReservationTokens:metrics.imageReservationTokens??0,
imageEstimate:metrics.imageEstimate??null,breakdown:breakdown(metrics) };
return error;
}
export class RequestPlanner {
constructor(store) { this.store = store; }
artifact(session, run, value, kind) {
const serialized = typeof value === 'string' ? value : JSON.stringify(value), sha256 = hash(serialized);
const existing = [...this.store.core.artifact.values()].find(artifact => artifact.sessionId === session.id
&& artifact.projectId === session.projectId && artifact.sha256 === sha256 && artifact.kind === kind);
if (existing) { this.store.artifactStore.read(existing); return existing; }
const artifact = this.store.artifactStore.write(session, run, serialized, { kind, mediaType: kind === 'context-group-chunk' ? 'text/plain' : 'application/json' });
this.store.core.artifact.set(artifact.id, artifact); return artifact;
}
archive(session, run, group) {
const text = JSON.stringify(group.messages);
if (Buffer.byteLength(text, 'utf8') <= 7 * 1024 * 1024) {
const artifact = this.artifact(session, run, text, 'context-group');
return { artifact_id: artifact.id, sha256: artifact.sha256, bytes: artifact.bytes };
}
const chunks = [];
for (let offset = 0; offset < text.length;) {
let end = Math.min(offset + ARCHIVE_CHARACTERS, text.length);
if (end < text.length && /[\uD800-\uDBFF]/.test(text[end - 1])) end--;
const artifact = this.artifact(session, run, text.slice(offset, end), 'context-group-chunk');
chunks.push({ artifact_id: artifact.id, sha256: artifact.sha256, bytes: artifact.bytes, offset, characters: end - offset }); offset = end;
}
const artifact = this.artifact(session, run, { schemaVersion: 1, kind: 'context-group-chunks', group_sha256: group.sha256,
characters: text.length, bytes: Buffer.byteLength(text, 'utf8'), chunks }, 'context-group-manifest');
return { artifact_id: artifact.id, sha256: artifact.sha256, group_sha256: group.sha256, bytes: Buffer.byteLength(text, 'utf8'), chunks: chunks.length };
}
prepare(session, run, config, { system, tools, stepId, projectMemory = null, skillCatalog = null, mcpCatalog = null, transportReservationTokens = 0,engineStepOnly=false }) {
const task = this.store.owned('task', run.taskId, session.id);
this.store.owned('run', run.id, session.id);
const groups = historyGroups(session.providerMessages), budget = budgetFor(config, run, task, transportReservationTokens);
const lastUser = groups.findLast(group => group.messages[0].role === 'user');
const fixed = { role: 'system', content: system };
const breakdown = metrics => {
const empty=requestMetrics(completionBody(config,[],[])).estimatedInputTokens;
const fixedText=requestMetrics(completionBody(config,[fixed],[])).estimatedInputTokens;
const fixedTools=requestMetrics(completionBody(config,[fixed],tools)).estimatedInputTokens;
return {transportAndImageFramingTokens:empty-(metrics.imageReservationTokens??0),goalAndContextTextTokens:fixedText-empty,
toolDefinitionTokens:fixedTools-fixedText,historyAndEvidenceTokens:metrics.estimatedInputTokens-fixedTools,
imageReservationTokens:metrics.imageReservationTokens??0};
};
const ledger = new Map([...this.store.core.tool.values()].filter(tool => tool.sessionId === session.id).map(tool => [tool.callId, tool]));
const descriptions = new Map(groups.map(group => [group.index, describe(group, ledger, this.store.core.artifact)]));
const evidence = workingEvidence(groups, descriptions, this.store.core.artifact);
const original = completionBody(config, [fixed, ...session.providerMessages], tools), before = requestMetrics(original);
const selected = new Set(groups.map(group => group.index));
let omitted = [], reference = null, workingReference = null, latestReference = null;
const latestDocument = latestToolDocument(this.store, session, run, groups);
const entries = [];
let retainedSources = [];
const metricsFor = (indices, includeNotice = true, currentEntries = entries, includeLatest = true) => {
const missing = groups.filter(group => !indices.has(group.index));
const messages = [fixed, ...(missing.length && includeNotice ? [notice({ id: PLACEHOLDER_ID, sha256: PLACEHOLDER_SHA }, missing, descriptions, evidence)] : []),
...(includeLatest && latestDocument && !indices.has(latestDocument.group_index) ? [latestToolMessage({ id: PLACEHOLDER_ID, sha256: PLACEHOLDER_SHA }, latestDocument)] : []),
...(currentEntries.length ? [workingMessage({ id: PLACEHOLDER_ID, sha256: PLACEHOLDER_SHA }, workingDocument(session, run, currentEntries))] : []),
...groups.filter(group => indices.has(group.index)).flatMap(group => group.messages)];
return requestMetrics(completionBody(config, messages, tools));
};
if (before.estimatedInputTokens > budget.targetInputTokens) {
selected.clear(); if (lastUser) selected.add(lastUser.index);
const mandatory = metricsFor(selected);
if (mandatory.estimatedInputTokens > budget.inputBudget) throw pause(budget, mandatory, breakdown);
const observed = workingCandidates(this.store, session, run, groups);
// Admit complete small source observations before optional raw history.
// A reservation alone does not keep code in the actual sent request.
const newest = groups.at(-1);
const retentionTarget = budget.inputBudget;
for (const candidate of observed.filter(candidate => candidate.observation.kind === 'file' && candidate.observation.content.length <= 2000)) {
if (entries.length >= 12) break;
const entry = workingEntry(candidate, candidate.observation.content.length);
if (metricsFor(selected, true, [...entries, entry]).estimatedInputTokens <= retentionTarget) entries.push(entry);
}
retainedSources = [...entries];
const newestUseful = newest?.messages.every(message => {
if (message.role !== 'tool') return true;
try { const result = JSON.parse(message.content); return !result.kind?.startsWith('context-') && result.kind !== 'tool-result'; } catch { return true; }
});
if (newestUseful && !selected.has(newest.index) && newest.contributionTokens <= budget.inputBudget) {
selected.add(newest.index);
const remaining = entries.filter(entry => entry.source.group_index !== newest.index);
if (metricsFor(selected, true, remaining).estimatedInputTokens > budget.inputBudget) selected.delete(newest.index);
else entries.splice(0, entries.length, ...remaining);
}
const target = Math.max(budget.targetInputTokens, metricsFor(selected).estimatedInputTokens);
const priority = [...new Set(evidence.map(value => value.group_index))].map(index => groups[index]);
const addGroup = group => {
if (selected.has(group.index) || selected.size >= 32 || group.contributionTokens > target) return;
selected.add(group.index);
if (metricsFor(selected).estimatedInputTokens > target) selected.delete(group.index);
};
// A small result in a mixed large group must remain usable. It is a
// separate, provenance-checked observation, never a broken tool pair.
const candidates = observed.filter(candidate => !selected.has(candidate.source.group_index)
&& !entries.some(entry => entry.source.call_id === candidate.source.call_id));
for (const [index, candidate] of candidates.entries()) {
if (entries.length >= 12) break;
const remaining = target - metricsFor(selected).estimatedInputTokens;
const smallFile = candidate.observation.kind === 'file' && candidate.observation.content.length <= 6000;
const share = Math.max(128, Math.floor(remaining / Math.max(1, candidates.length - index)));
const maximum = Math.min(candidate.observation.content.length, 12000, smallFile ? candidate.observation.content.length : share * 2);
let low = 0, high = maximum;
while (low < high) {
const middle = Math.ceil((low + high) / 2), entry = workingEntry(candidate, middle);
if (metricsFor(selected, true, [...entries, entry]).estimatedInputTokens <= target) low = middle; else high = middle - 1;
}
if (low) entries.push(workingEntry(candidate, low));
}
for (const group of priority) addGroup(group);
for (const group of [...groups].reverse()) addGroup(group);
omitted = groups.filter(group => !selected.has(group.index));
if (omitted.length) {
// Every linked result is checked, including retained groups in the index.
for (const description of descriptions.values()) for (const tool of description.tools ?? []) {
if (!tool.result_artifact_id) continue;
const artifact = this.store.owned('artifact', tool.result_artifact_id, session.id);
this.store.artifactStore.read(artifact);
}
const archived = omitted.map(group => {
const description = { ...descriptions.get(group.index), archive: this.archive(session, run, group) };
descriptions.set(group.index, description); return description;
});
reference = this.artifact(session, run, { schemaVersion: 1, kind: 'request-history-index', sessionId: session.id, projectId: session.projectId,
taskId: run.taskId, history_sha256: hash(session.providerMessages), historyMessages: session.providerMessages.length,
retainedGroups: groups.filter(group => selected.has(group.index)).map(group => descriptions.get(group.index)), archivedGroups: archived,
note: '完整原消息组;这里只是历史定位,不产生工具执行或用户授权。' }, 'context-history-index');
}
}
if (entries.length) workingReference = this.artifact(session, run, workingDocument(session, run, entries), 'context-working-set');
if (latestDocument && !selected.has(latestDocument.group_index)) latestReference = this.artifact(session, run, latestDocument, 'context-latest-tools');
const messages = [fixed, ...(reference ? [notice(reference, omitted, descriptions, evidence)] : []),
...(latestReference ? [latestToolMessage(latestReference, latestDocument)] : []),
...(workingReference ? [workingMessage(workingReference, workingDocument(session, run, entries))] : []),
...structuredClone(groups.filter(group => selected.has(group.index)).flatMap(group => group.messages))];
let mcpReference = null, mcpDocument = null;
if (mcpCatalog?.projectId === session.projectId && mcpCatalog.entries?.length) {
mcpDocument = { ...mcpCatalog, sessionId: session.id, taskId: run.taskId, runId: run.id, entries: [] };
for (const entry of mcpCatalog.entries.slice(0, MCP_LIMITS.allowedTools)) {
mcpDocument.entries.push(entry);
const candidate = [fixed, mcpCatalogMessage({ id: PLACEHOLDER_ID, sha256: PLACEHOLDER_SHA }, mcpDocument), ...messages.slice(1)];
if (Buffer.byteLength(JSON.stringify(mcpDocument), 'utf8') > 24000
|| requestMetrics(completionBody(config, candidate, tools)).estimatedInputTokens > Math.min(budget.inputBudget, budget.targetInputTokens)) mcpDocument.entries.pop();
}
if (mcpDocument.entries.length) {
mcpReference = this.artifact(session, run, mcpDocument, 'context-mcp-catalog');
messages.splice(1, 0, mcpCatalogMessage(mcpReference, mcpDocument));
}
}
let skillReference = null, skillDocument = null;
if (skillCatalog?.projectId === session.projectId && skillCatalog.entries?.length) {
skillDocument = { ...skillCatalog, sessionId: session.id, taskId: run.taskId, runId: run.id, entries: [] };
for (const entry of skillCatalog.entries.slice(0, SKILL_LIMITS.enabled)) {
skillDocument.entries.push(entry);
const candidate = [fixed, skillCatalogMessage({ id: PLACEHOLDER_ID, sha256: PLACEHOLDER_SHA }, skillDocument), ...messages.slice(1)];
if (Buffer.byteLength(JSON.stringify(skillDocument), 'utf8') > SKILL_LIMITS.catalogBytes
|| requestMetrics(completionBody(config, candidate, tools)).estimatedInputTokens > Math.min(budget.inputBudget, budget.targetInputTokens)) skillDocument.entries.pop();
}
if (skillDocument.entries.length) {
skillReference = this.artifact(session, run, skillDocument, 'context-skill-catalog');
messages.splice(1, 0, skillCatalogMessage(skillReference, skillDocument));
}
}
// Optional catalogs and memory use only space left after goals, paired history and current code evidence.
let memoryReference = null, memoryDocument = null;
if (projectMemory?.projectId === session.projectId && projectMemory.entries?.length) {
memoryDocument = { ...projectMemory, sessionId: session.id, taskId: run.taskId, runId: run.id, entries: [] };
const memoryBudget = Math.min(budget.inputBudget, budget.targetInputTokens);
for (const entry of projectMemory.entries.slice(0, MEMORY_CONTEXT_LIMITS.entries)) {
if (entry.sourceFingerprint !== projectMemory.sourceFingerprint) continue;
memoryDocument.entries.push(entry);
const candidate = [fixed, projectMemoryMessage({ id: PLACEHOLDER_ID, sha256: PLACEHOLDER_SHA }, memoryDocument), ...messages.slice(1)];
if (Buffer.byteLength(JSON.stringify(memoryDocument), 'utf8') > MEMORY_CONTEXT_LIMITS.bytes
|| requestMetrics(completionBody(config, candidate, tools)).estimatedInputTokens > memoryBudget) memoryDocument.entries.pop();
}
if (memoryDocument.entries.length) {
memoryReference = this.artifact(session, run, memoryDocument, 'context-project-memory');
messages.splice(1, 0, projectMemoryMessage(memoryReference, memoryDocument));
}
}
const body = completionBody(config, messages, tools), metrics = requestMetrics(body);
if (metrics.estimatedInputTokens > budget.inputBudget) throw pause(budget, metrics, breakdown);
const tokenReservation=engineStepOnly?null:modelReservation(config,body,taskConsumption(this.store,task.id));
const runCredit=budget.runRemainingTokens??Infinity,taskCredit=budget.taskRemainingTokens??Infinity,credit=Math.min(runCredit,taskCredit);
if(tokenReservation&&tokenReservation.reservedTokens>credit)throw pause({...budget,limitingReason:runCredit<=taskCredit?'token_limit':'task_token_limit',
tokenReservation,remainingTokens:credit},metrics,breakdown);
const requestArtifact = this.artifact(session, run, body, 'model-request');
const record = { schemaVersion: 1, id: randomUUID(), sessionId: session.id, projectId: session.projectId, taskId: run.taskId,
runId: run.id, stepId, requestIndex: [...this.store.core.context_plan.values()].filter(plan => plan.runId === run.id).length + 1,
status: 'prepared', createdAt: new Date().toISOString(), finishedAt: null,
requestSha256: metrics.sha256, requestBytes: metrics.bytes, estimatedInputTokens: metrics.estimatedInputTokens,
requestArtifactId: requestArtifact.id,
...(tokenReservation?{tokenReservation,maxBudgetAttempts:Math.min(8,Math.floor(credit/tokenReservation.reservedTokens))}:{engineStepOnly:true}),
estimateMethod: metrics.estimateMethod, beforeInputTokens: before.estimatedInputTokens, beforeBytes: before.bytes, budget,
...(metrics.imageCount?{imageCount:metrics.imageCount,imageReservationTokens:metrics.imageReservationTokens,imageEstimate:metrics.imageEstimate,
inputImages:config.inputImages.map(({dataUrl,...identity})=>identity)}:{}),
mandatoryInputTokens: metricsFor(new Set(lastUser ? [lastUser.index] : []), true, []).estimatedInputTokens,
// The next result replaces the current latest-result feedback. Do not
// reserve both views when sizing that result's actual protocol page.
nextReadFixedInputTokens: metricsFor(new Set(lastUser ? [lastUser.index] : []), true, [], false).estimatedInputTokens,
workingRetentionTokens: Math.max(0, metricsFor(new Set(lastUser ? [lastUser.index] : []), true, retainedSources).estimatedInputTokens
- metricsFor(new Set(lastUser ? [lastUser.index] : []), true, []).estimatedInputTokens),
workingRetentionPolicyVersion: 1,
originalMessages: session.providerMessages.length, retainedMessages: messages.length - 1 - (reference ? 1 : 0) - (workingReference ? 1 : 0) - (latestReference ? 1 : 0) - (memoryReference ? 1 : 0) - (skillReference ? 1 : 0) - (mcpReference ? 1 : 0),
archivedGroups: omitted.length, retainedGroups: groups.filter(group => selected.has(group.index)).map(group => group.index),
historyIndexArtifactId: reference?.id ?? null, historyIndexSha256: reference?.sha256 ?? null, actualUsage: null,
workingSetArtifactId: workingReference?.id ?? null, workingSetSha256: workingReference?.sha256 ?? null, workingSetEntries: entries.length,
workingSetViewVersion: 2,
latestToolsArtifactId: latestReference?.id ?? null, latestToolsSha256: latestReference?.sha256 ?? null, latestToolsEntries: latestReference ? latestDocument.entries.length : 0,
projectMemoryArtifactId: memoryReference?.id ?? null, projectMemorySha256: memoryReference?.sha256 ?? null,
projectMemoryEntries: memoryReference ? memoryDocument.entries.length : 0,
skillCatalogArtifactId: skillReference?.id ?? null, skillCatalogSha256: skillReference?.sha256 ?? null,
skillCatalogEntries: skillReference ? skillDocument.entries.length : 0,
mcpCatalogArtifactId: mcpReference?.id ?? null, mcpCatalogSha256: mcpReference?.sha256 ?? null,
mcpCatalogEntries: mcpReference ? mcpDocument.entries.length : 0,
requestAttempts: 0, responseSha256: null, source: 'workbench' };
const artifact = this.artifact(session, run, record, 'context-plan'); record.artifactId = artifact.id;
run.currentContextPlanId = record.id; session.estimatedTokens = record.estimatedInputTokens;
const step = this.store.core.step.get(stepId); if (step) step.contextPlanId = record.id;
this.store.putRecord('context_plan', session, record, 'context.prepared');
return { messages, body, record };
}
finish(session, record, { response = null, error = null, attempts = 0 } = {}) {
this.store.owned('context_plan', record.id, session.id);
record.status = error ? error.name === 'AbortError' || session.status === 'stopping' ? 'interrupted' : 'failed' : 'completed';
record.finishedAt = new Date().toISOString(); record.actualUsage = response?.usage ?? null;
record.responseSha256 = response?.message ? hash(response.message) : null; record.requestAttempts = attempts;
if (error) record.error = String(error.message ?? error).slice(0, 800);
this.store.save(session, { type: 'context.' + record.status, detail: { recordId: record.id } });
}
}
export function verifyPlanEvidence(store, session, plan, cache = new Map()) {
const get = (id, kind, sha256 = null) => {
const artifact = store.owned('artifact', id, session.id);
if (artifact.kind !== kind || sha256 && artifact.sha256 !== sha256) throw new Error('上下文工件身份不匹配。');
return artifact;
};
const request = get(plan.requestArtifactId, 'model-request', plan.requestSha256);
const body = JSON.parse(store.artifactStore.read(request)), metrics = requestMetrics(body);
if(plan.tokenReservation)verifyModelReservation(store,session,plan.taskId,{...store.owned('run',plan.runId,session.id).model,
modelRouting:store.owned('run',plan.runId,session.id).model.routing},body,plan.tokenReservation);
if (metrics.bytes !== plan.requestBytes || metrics.estimatedInputTokens !== plan.estimatedInputTokens
|| requestVariants(body).some(value => outputReservation(value) !== plan.budget.outputReservation) || metrics.estimatedInputTokens > plan.budget.inputBudget) throw new Error('请求预算与原正文不匹配。');
historyGroups(requestHistory(body));
for (const variant of requestVariants(body)) historyGroups(requestHistory(variant));
const frozen = JSON.parse(store.artifactStore.read(get(plan.artifactId, 'context-plan')));
for(const key of ['tokenReservation','maxBudgetAttempts'])if(JSON.stringify(frozen[key]??null)!==JSON.stringify(plan[key]??null))throw new Error('模型用量预留与发送前封存不一致。');
for(const key of ['imageCount','imageReservationTokens','imageEstimate','inputImages']) {
if(JSON.stringify(frozen[key]??null)!==JSON.stringify(plan[key]??null))throw new Error('图片身份或预算与发送前封存不匹配。');
}
if(metrics.imageCount) {
if(metrics.imageCount!==plan.imageCount||metrics.imageReservationTokens!==plan.imageReservationTokens||metrics.imageEstimate!==plan.imageEstimate
||plan.inputImages?.length!==metrics.imageCount)throw new Error('图片预算与实际正文不匹配。');
for(const variant of requestVariants(body)) {
const images=requestImages(variant);
if(images.length!==plan.inputImages.length)throw new Error('图片请求线路不一致。');
for(const [index,url] of images.entries()) {
const identity=plan.inputImages[index],row=store.owned('input_attachment',identity.id,session.id);
const artifact=get(row.sentArtifactId,'input-image-sent',identity.sha256),bytes=store.artifactStore.readBytes(artifact);
const original=get(row.originalArtifactId,'input-image-original',row.sha256);store.artifactStore.readBytes(original);
if(row.taskId!==plan.taskId||row.status!=='attached'||artifact.taskId!==plan.taskId||artifact.runId!==row.runId
||original.taskId!==plan.taskId||original.runId!==row.runId
||row.sentSha256!==identity.sha256||row.sentWidth!==identity.width||row.sentHeight!==identity.height
||url!=='data:image/png;base64,'+bytes.toString('base64'))throw new Error('图片原字节或任务归属与实际正文不匹配。');
}
}
} else if(plan.imageCount||plan.inputImages?.length)throw new Error('请求缺少封存的图像。');
if (frozen.id !== plan.id || frozen.requestSha256 !== plan.requestSha256 || frozen.requestArtifactId !== plan.requestArtifactId
|| JSON.stringify(frozen.budget) !== JSON.stringify(plan.budget)) throw new Error('请求计划与发送前的封存记录不匹配。');
if ((frozen.workingSetArtifactId ?? null) !== (plan.workingSetArtifactId ?? null)
|| (frozen.workingSetSha256 ?? null) !== (plan.workingSetSha256 ?? null)
|| (frozen.workingSetEntries ?? 0) !== (plan.workingSetEntries ?? 0)) throw new Error('工作依据与发送前的封存记录不匹配。');
if ((frozen.workingSetViewVersion ?? 1) !== (plan.workingSetViewVersion ?? 1)
|| (frozen.workingRetentionTokens ?? 0) !== (plan.workingRetentionTokens ?? 0)
|| (frozen.workingRetentionPolicyVersion ?? 0) !== (plan.workingRetentionPolicyVersion ?? 0)) throw new Error('工作依据视图或保留预算与封存记录不匹配。');
if ((frozen.nextReadFixedInputTokens ?? null) !== (plan.nextReadFixedInputTokens ?? null)) throw new Error('下一工具页的固定预算与封存记录不匹配。');
if ((frozen.latestToolsArtifactId ?? null) !== (plan.latestToolsArtifactId ?? null)
|| (frozen.latestToolsSha256 ?? null) !== (plan.latestToolsSha256 ?? null)
|| (frozen.latestToolsEntries ?? 0) !== (plan.latestToolsEntries ?? 0)) throw new Error('最新工具反馈与发送前的封存记录不匹配。');
if ((frozen.projectMemoryArtifactId ?? null) !== (plan.projectMemoryArtifactId ?? null)
|| (frozen.projectMemorySha256 ?? null) !== (plan.projectMemorySha256 ?? null)
|| (frozen.projectMemoryEntries ?? 0) !== (plan.projectMemoryEntries ?? 0)) throw new Error('项目记忆与发送前的封存记录不匹配。');
if (plan.projectMemoryArtifactId) {
const artifact = get(plan.projectMemoryArtifactId, 'context-project-memory', plan.projectMemorySha256);
const document = JSON.parse(store.artifactStore.read(artifact));
if (artifact.taskId !== plan.taskId || artifact.runId !== plan.runId || document.projectId !== session.projectId
|| document.sessionId !== session.id || document.taskId !== plan.taskId || document.runId !== plan.runId
|| document.kind !== 'source-checked-project-memory' || document.entries.length !== plan.projectMemoryEntries
|| document.entries.length > MEMORY_CONTEXT_LIMITS.entries || Buffer.byteLength(JSON.stringify(document), 'utf8') > MEMORY_CONTEXT_LIMITS.bytes
|| document.entries.some(entry => entry.sourceFingerprint !== document.sourceFingerprint)) throw new Error('项目记忆工件归属或范围不匹配。');
const message = projectMemoryMessage(artifact, document);
if (requestHistory(body).filter(value => value.role === 'system' && value.content === message.content).length !== 1) throw new Error('项目记忆与实际发送内容不匹配。');
}
if ((frozen.skillCatalogArtifactId ?? null) !== (plan.skillCatalogArtifactId ?? null)
|| (frozen.skillCatalogSha256 ?? null) !== (plan.skillCatalogSha256 ?? null)
|| (frozen.skillCatalogEntries ?? 0) !== (plan.skillCatalogEntries ?? 0)) throw new Error('技能目录与发送前的封存记录不匹配。');
if (plan.skillCatalogArtifactId) {
const artifact = get(plan.skillCatalogArtifactId, 'context-skill-catalog', plan.skillCatalogSha256);
const document = JSON.parse(store.artifactStore.read(artifact));
if (artifact.taskId !== plan.taskId || artifact.runId !== plan.runId || document.projectId !== session.projectId
|| document.sessionId !== session.id || document.taskId !== plan.taskId || document.runId !== plan.runId
|| document.kind !== 'registered-skill-catalog' || !Array.isArray(document.entries) || document.entries.length !== plan.skillCatalogEntries
|| document.entries.length > SKILL_LIMITS.enabled || Buffer.byteLength(JSON.stringify(document), 'utf8') > SKILL_LIMITS.catalogBytes
|| new Set(document.entries.map(entry => entry.id)).size !== document.entries.length) throw new Error('技能目录归属或范围不匹配。');
const message = skillCatalogMessage(artifact, document);
if (requestHistory(body).filter(value => value.role === 'system' && value.content === message.content).length !== 1) throw new Error('技能目录与实际发送内容不匹配。');
}
if ((frozen.mcpCatalogArtifactId ?? null) !== (plan.mcpCatalogArtifactId ?? null)
|| (frozen.mcpCatalogSha256 ?? null) !== (plan.mcpCatalogSha256 ?? null)
|| (frozen.mcpCatalogEntries ?? 0) !== (plan.mcpCatalogEntries ?? 0)) throw new Error('MCP目录与发送前的封存记录不匹配。');
if (plan.mcpCatalogArtifactId) {
const artifact = get(plan.mcpCatalogArtifactId, 'context-mcp-catalog', plan.mcpCatalogSha256);
const document = JSON.parse(store.artifactStore.read(artifact));
if (artifact.taskId !== plan.taskId || artifact.runId !== plan.runId || document.projectId !== session.projectId
|| document.sessionId !== session.id || document.taskId !== plan.taskId || document.runId !== plan.runId
|| document.kind !== 'registered-mcp-catalog' || !Array.isArray(document.entries) || document.entries.length !== plan.mcpCatalogEntries
|| document.entries.length > MCP_LIMITS.allowedTools || Buffer.byteLength(JSON.stringify(document), 'utf8') > 24000) throw new Error('MCP目录归属或范围不匹配。');
const message = mcpCatalogMessage(artifact, document);
if (requestHistory(body).filter(value => value.role === 'system' && value.content === message.content).length !== 1) throw new Error('MCP目录与实际发送内容不匹配。');
}
if (plan.latestToolsArtifactId) {
const artifact = get(plan.latestToolsArtifactId, 'context-latest-tools', plan.latestToolsSha256);
const document = JSON.parse(store.artifactStore.read(artifact));
if (artifact.taskId !== plan.taskId) throw new Error('最新工具反馈的工件任务归属不匹配。');
verifyLatestToolDocument(store, session, plan, document, historyGroups(session.providerMessages.slice(0, plan.originalMessages)));
const message = latestToolMessage(artifact, document);
if (requestHistory(body).filter(value => value.role === 'system' && value.content === message.content).length !== 1) throw new Error('最新工具反馈与实际发送内容不匹配。');
}
if (plan.workingSetArtifactId) {
const artifact = get(plan.workingSetArtifactId, 'context-working-set', plan.workingSetSha256);
const document = JSON.parse(store.artifactStore.read(artifact));
if (artifact.taskId !== plan.taskId) throw new Error('工作依据工件任务归属不匹配。');
verifyWorkingDocument(store, session, plan, document, historyGroups(session.providerMessages.slice(0, plan.originalMessages)));
const message = workingMessage(artifact, document, plan.workingSetViewVersion ?? 1);
if (requestHistory(body).filter(value => value.role === 'system' && value.content === message.content).length !== 1) throw new Error('工作依据与实际发送内容不匹配。');
}
if (!plan.historyIndexArtifactId) return;
const index = JSON.parse(store.artifactStore.read(get(plan.historyIndexArtifactId, 'context-history-index', plan.historyIndexSha256)));
if (index.sessionId !== session.id || index.projectId !== session.projectId || index.taskId !== plan.taskId
|| index.kind !== 'request-history-index' || index.archivedGroups.length !== plan.archivedGroups) throw new Error('历史索引身份或范围不匹配。');
for (const group of index.archivedGroups) {
const artifact = store.owned('artifact', group.archive.artifact_id, session.id), key = artifact.id + ':' + artifact.sha256;
if (artifact.sha256 !== group.archive.sha256) throw new Error('原消息组工件身份不匹配。');
if (cache.get(key) !== group.sha256) {
const text = store.artifactStore.read(artifact);
if (artifact.kind === 'context-group') {
if (hash(text) !== group.sha256) throw new Error('原消息组SHA256不匹配。');
historyGroups(JSON.parse(text));
} else if (artifact.kind === 'context-group-manifest') {
const manifest = JSON.parse(text), digest = createHash('sha256'); let characters = 0, bytes = 0;
if (manifest.kind !== 'context-group-chunks' || manifest.group_sha256 !== group.sha256) throw new Error('原消息组分片清单不匹配。');
for (const chunk of manifest.chunks) {
const part = get(chunk.artifact_id, 'context-group-chunk', chunk.sha256), content = store.artifactStore.read(part);
if (chunk.offset !== characters || chunk.characters !== content.length || part.bytes !== chunk.bytes) throw new Error('原消息组分片范围不匹配。');
characters += content.length; bytes += part.bytes; digest.update(content, 'utf8');
}
if (characters !== manifest.characters || bytes !== manifest.bytes || digest.digest('hex') !== group.sha256) throw new Error('原消息组分片内容校验失败。');
} else throw new Error('原消息组工件格式不匹配。');
cache.set(key, group.sha256);
}
for (const tool of group.tools ?? []) {
if (!tool.result_artifact_id) continue;
const result = get(tool.result_artifact_id, 'tool-result', tool.result_sha256), resultKey = result.id + ':' + result.sha256;
if (!cache.has(resultKey)) { store.artifactStore.read(result); cache.set(resultKey, result.sha256); }
}
}
}

Some files were not shown because too many files have changed in this diff Show More