test: preserve legacy request views without modern reservation drift

This commit is contained in:
Agent Workbench Dev
2026-11-02 22:42:53 +08:00
parent 9106655d46
commit d05a741310
5 changed files with 32 additions and 4 deletions
+4
View File
@@ -1,5 +1,9 @@
# 汇总发现
## D 完整回归收口
完整原轮756项751通过/5失败。第五项是历史1.6.1视图测试从当前prepared记录造旧请求时继承了新tokenReservation/maxBudgetAttempts,预留仍绑定当前视图正文。生产校验正确拒绝该混合记录;夹具先断言拒绝,再去掉历史不存在的两字段验证原视图,不放松生产核验。Python环境两项和升级定位两项已有独立15/15、2/2复验。原轮仍记失败。
## D 生产接线(接续 1408e7a)
生产加载进一步发现研究清单只观察 JS/JSON,未覆盖 require-builtin 与 Koffi 两个必需 .node。已用 REA inspect_pe_imports 检查:require-builtin SHA ead441d1… 静态 KERNEL32 / 延迟 node.exe;Koffi SHA eb0587c8… 静态 KERNEL32+ADVAPI32 / 延迟 NODE.EXE。固定两个原生文件,禁用原生缓存,仅允许清单内 dlopen;Koffi.load 只允许已固定 System32 库绝对路径,实际加载收据另记。静态导入表不代表操作系统全部运行依赖或原生 OS 沙箱。
+6
View File
@@ -1,5 +1,11 @@
# 统一执行进度
## D 生产适配收口接续
已提交9106655;完整756项原轮751通过/5失败,第五项历史视图夹具与C用量预留冲突已定位,修正测试并保留混合记录必须拒绝断言。相关回归与封存接续;本轮正式只读、真实模型请求0。一次批读过量与findings标题锚点错误导致多文件补丁原子拒绝,按真实短段重新应用,无部分改动。
最终working-set/request-plan/API/read-budget/model-reservation/budget-resume六文件53/53通过,原现代预留与改写正文不一致继续拒绝。完整原轮仍751/756;独立Python15/15和升级2/2分别保留。证据清单按实际五失败及修正输入谱系封存,不借用夹具作为真实收益。
## 真实执行修复A(开发中)
接续b67b4f2,在fix/live-execution-context-1.24.1实现原生桥有来源的发送视图:原native输入、整组历史索引、精确工具参数/原结果/SHA、固定目标与原提示、完整调用配对和容量拒绝分项。开发轮四原例离线重建及边界7/7通过,controlled-engine/engine-worker/model-protocols相关34/34通过;该轮之后新增状态保留及严格来源校验,最终需按改动复验。未请求真实模型,未改正式宿主或旧六例。
@@ -26,19 +26,31 @@ for(const input of manifest.sourceInputs){
const receipt=name=>fs.readFileSync(inside(manifest.receipts.find(value=>value.name===name).file),'utf8');
assert.match(receipt('full'),new RegExp('tests '+manifest.fullSummary.tests+'\\b'));
assert.match(receipt('full'),new RegExp('pass '+manifest.fullSummary.passed+'\\b'));
assert.match(receipt('full'),/fail 4\b/);assert.equal(manifest.fullSummary.failed,4);
assert.match(receipt('full'),/fail 5\b/);assert.equal(manifest.fullSummary.failed,5);
assert.equal(manifest.fullSummary.tests,manifest.fullSummary.passed+manifest.fullSummary.failed);
// Preserve the original failed whole run. Subsequent evidence is the same
// Python cases with the declared environment and the two repaired migrations.
// Python environment, two repaired migrations and legacy fixture corrections.
assert.deepEqual(manifest.fullSummary.failedNames.slice().sort(),[
'real pytest pass, failure, skip, collection errors and teardown errors use collected case outcomes',
'a missing interpreter and repeated pytest item objects cannot create a false verification pass',
'a directly started compiled host upgrades twice with the same PID, sessions, applied bytes and volatile provider',
'the running 0.1.0 process upgrades in place and retains its project, session, files and volatile model connection'
'the running 0.1.0 process upgrades in place and retains its project, session, files and volatile model connection',
'a 1.6.1 full-provenance sent view remains verifiable after introducing the compact view'
].sort());
for(const [name,count] of [['python-final',15],['upgrade-final',2]]){
assert.deepEqual(manifest.correctedSuites.map(value=>value.name),['python-final','upgrade-final','context-final']);
for(const {name,tests:count,passed,failed} of manifest.correctedSuites){
assert.ok(count>0);assert.equal(passed,count);assert.equal(failed,0);
assert.match(receipt(name),new RegExp('tests '+count+'\\b'));assert.match(receipt(name),new RegExp('pass '+count+'\\b'));assert.match(receipt(name),/fail 0\b/);
}
assert.equal(manifest.correctedSuites[0].tests,15);assert.equal(manifest.correctedSuites[1].tests,2);
const frozen=read(manifest.fullRunInputs),amended=[];
for(const input of frozen.files){const current=manifest.sourceInputs.find(value=>value.path===input.path)??manifest.buildInputs.find(value=>value.path===input.path);
assert.ok(current,input.path);if(current.sha256!==input.sha256)amended.push(input.path);}
assert.deepEqual(amended,manifest.amendedAcceptanceOrUpgradeInputs);
for(const file of amended)assert.ok(['scripts/upgrade-running.mjs','scripts/verify-controlled-projects.mjs','scripts/verify-original-purge-host.mjs','tests/working-set.test.mjs'].includes(file),file);
const preservation=JSON.parse(receipt('formal-preservation'));
assert.equal(preservation.passed,true);assert.equal(preservation.qaRealModelRequests,0);assert.equal(preservation.selectedPoolPreserved,true);
for(const table of Object.values(preservation.originalRows))assert.equal(table.changed,0);
assert.match(receipt('build'),/Server bundle built\./);
const runtime=read(manifest.runtime);assert.equal(runtime.passed,true);assert.equal(runtime.productionAdapter,true);
assert.deepEqual(runtime.cases.map(value=>value.scenario),['completed','failed-no-retry','host-denied-tool']);
+2
View File
@@ -12,6 +12,8 @@
恢复读取时三次批读总输出超过工具上限,截断内容不作为审查依据;后续限制每批总输出和具体短段。
D完整原轮756项751通过/5失败,保持原件:两项Python环境未带pytest、两项热升级handler定位不唯一、另一项1.6.1旧视图夹具错误继承当前请求的用量预留。前四项15/15和2/2分别复验;第五项修正历史夹具,新增混合新预留/旧正文必须拒绝断言,不放松生产预算校验,相关复验后单独记录。正式未升级,E真实请求仍未开始。
本轮原失败保持:host零请求时缺consumption暴露验证器缺陷;原版16K固定指令/工具/余量不适配,0HTTP拒绝,单列32K不修改旧原轮;UI异步导航竞态已等待真实检视区,后续两次UI四功能通过但事件连接断开判失败,不能忽略;实际定位publisher超过2MiB队列时destroy。build第二轮npm脚本子进程误用PATH内Node16失败,第三轮显式前置Node24后通过,不改系统全局配置。
## 当前修复B/C:连接阶段诊断与实际模型身份
+4
View File
@@ -254,6 +254,10 @@ test('a 1.6.1 full-provenance sent view remains verifiable after introducing the
body.messages = body.messages.map(message => message.content === currentMessage.content ? oldMessage : message);
const metrics = requestMetrics(body), request = f.planner.artifact(f.session, f.run, body, 'model-request');
Object.assign(record, { requestSha256: metrics.sha256, requestBytes: metrics.bytes, estimatedInputTokens: metrics.estimatedInputTokens, requestArtifactId: request.id });
// A modern reservation is bound to the actual request body. Rewriting only
// the sent view must fail; genuine 1.6.1 records predate these fields.
assert.throws(() => verifyPlanEvidence(f.store, f.session, record), /模型预算预留与原估算\/用量\/实际线路不一致/);
delete record.tokenReservation; delete record.maxBudgetAttempts;
delete record.workingSetViewVersion; delete record.workingRetentionTokens;
const frozen = f.planner.artifact(f.session, f.run, record, 'context-plan'); record.artifactId = frozen.id;
assert.notEqual(oldMessage.content, currentMessage.content); assert.ok(oldMessage.content.includes('invocation_id'));