From 01e64f3fcfb062eed92cb6e4260672b16e531146 Mon Sep 17 00:00:00 2001 From: Agent Workbench Dev Date: Fri, 6 Nov 2026 13:41:30 +0800 Subject: [PATCH] test: preserve concurrent client work during frozen native validation --- docs/QA-LIVE-PURGE-AF.md | 2 ++ scripts/live-af/initial.mjs | 10 ++++++++-- scripts/live-af/run.mjs | 4 ++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/QA-LIVE-PURGE-AF.md b/docs/QA-LIVE-PURGE-AF.md index b7f37598..23d3c529 100644 --- a/docs/QA-LIVE-PURGE-AF.md +++ b/docs/QA-LIVE-PURGE-AF.md @@ -10,4 +10,6 @@ 最终af-driver-c6ca1f0f完整四组通过:16自有HTTP、每例原九测试/build与父Git/owner/index、两组真实原版入口/apply/两个原生模块及进程树退出通过。原11行/1导出/原工件保持,新增8父子项目/8会话和16尝试全部自有,原连接1→3/config2→4仅声明修订/显式默认字段,原池/凭据状态恢复,9229关闭。原状态审计809e90c1通过;封存477份19505631字节,逐实际HTTP/模型计划/schema和全部文件SHA核对通过。该合成夹具的输出表中realRequests指16次自有HTTP,顶层driver-result明确realModelRequests=0,不能纳入真实模型分母。 +首次正式freeze在任何HTTP/真实请求之前,因同期外部Orven界面/品牌文件未提交而拒绝;无current.json生成。只读复核改动限src/client、docs/orven、output,正式PID/instance/1.25.8/空闲均保持。冻结器现明确只允许并记录这些不进入已安装Node引擎/驱动/工程的外部路径;任何其它未提交输入仍拒绝。外部改动不覆盖、不代交、不构建或部署;逐组核对正式宿主/版本/配置,外部有效来源漂移即停止本批。 + 全部固定实现仅发给回环自有HTTP,不发真实供应商。上述运行不是自主推理或Purge收益证据。正式current.json即将单次冻结,真实AB/BA结果另附;未执行前收益unknown。 diff --git a/scripts/live-af/initial.mjs b/scripts/live-af/initial.mjs index aa55be94..6f5c8cf6 100644 --- a/scripts/live-af/initial.mjs +++ b/scripts/live-af/initial.mjs @@ -14,7 +14,13 @@ const fixturePath = process.argv[2]; assert.ok(fixturePath, 'The completed open const fixture = JSON.parse(fs.readFileSync(fixturePath)); assert.equal(fixture.success, true); assert.equal(fixture.realModelRequests, 0); assert.equal(fixture.completeSamples, 4); assert.equal(fixture.originalStateAuditPassed, true); assert.equal(fixture.actualBatchDriverExecuted, true); purgeEvidence(); assert.equal(fs.existsSync(root), false, 'Never refreeze AF after observing any real result.'); -assert.equal(execFileSync('git', ['status', '--porcelain'], { encoding: 'utf8', windowsHide: true }).trim(), ''); +const git = args => execFileSync('git', args, { encoding: 'utf8', windowsHide: true }); +const workingChanges = { tracked: git(['diff', '--name-only', 'HEAD', '-z']).split('\0').filter(Boolean), + untracked: git(['ls-files', '--others', '--exclude-standard', '-z']).split('\0').filter(Boolean) }; +for (const name of [...workingChanges.tracked, ...workingChanges.untracked]) + assert.ok(['src/client/', 'docs/orven/', 'output/'].some(prefix => name.startsWith(prefix)), 'An uncommitted effective input may affect AF: ' + name); +// Concurrent client-only design work does not enter the installed Node engine, +// this driver or the isolated benchmark. Preserve it and record paths only. const { api, boot, close } = await client(); try { await inspectorClosed(); const host = await api('/host/status'), center = await api('/model-center'); @@ -28,7 +34,7 @@ try { assert.equal(installation.controlledStatus, 'available'); assert.equal(source.status, 'available'); const baseline = await publicSnapshot('http://127.0.0.1:4318', host.identity.dataRoot); save('current.json', { host, config: boot.config, center, connection, originalProjects: boot.projects, originalPublicMetadata: publicMetadata(host.identity.dataRoot), - baseline, installation, source, order, allowed, goal, purgePrompt, observations, fixturePath, fixture, + baseline, installation, source, order, allowed, goal, purgePrompt, observations, fixturePath, fixture, workingChanges, driverCommit: execFileSync('git', ['rev-parse', 'HEAD'], { encoding: 'utf8', windowsHide: true }).trim() }); console.log(JSON.stringify({ frozen: true, requests: 0, driverCommit: JSON.parse(fs.readFileSync(root + '/current.json')).driverCommit, version: boot.version, pid: host.identity.pid, projects: baseline.projects, sessions: baseline.database.sessionIds.length, diff --git a/scripts/live-af/run.mjs b/scripts/live-af/run.mjs index 60b663f9..0132fd77 100644 --- a/scripts/live-af/run.mjs +++ b/scripts/live-af/run.mjs @@ -85,6 +85,10 @@ try { assert.equal(installation.controlledSha256, frozen.installation.controlledSha256); assert.equal(source.sourceSha256, frozen.source.sourceSha256); assert.equal(source.runtimeSha256, frozen.source.runtimeSha256); const current = await api('/model-center'); + const currentHost = await api('/host/status'), currentBoot = await api('/bootstrap'); + assert.equal(currentHost.identity.pid, frozen.host.identity.pid); assert.equal(currentHost.identity.instanceId, frozen.host.identity.instanceId); + assert.equal(currentHost.identity.runtimeRoot, frozen.host.identity.runtimeRoot); assert.equal(currentBoot.version, '1.25.8'); + compareConfig(read('active-model.json').config, currentBoot.config); assert.deepEqual(connectionDefinition(current.connections.find(row => row.id === original.id)), connectionDefinition(configured)); assert.deepEqual(current.selected, { type: 'connection', id: original.id }); own = prepareNode(path.join(root, prefix), store);