test(companion): record real iPhone recovery stop and revocation
This commit is contained in:
@@ -14,6 +14,12 @@ docs/companion-f-local-evidence/**/*.tap binary
|
||||
docs/companion-f-local-evidence/*.tap binary
|
||||
docs/companion-f-local-evidence/**/*.log binary
|
||||
docs/companion-f-local-evidence/*.log binary
|
||||
docs/companion-f-iphone-evidence/** -text
|
||||
docs/companion-f-iphone-evidence/**/*.log binary
|
||||
docs/companion-f-iphone-evidence/*.log binary
|
||||
docs/companion-f-iphone-recovery-evidence/** -text
|
||||
docs/companion-f-iphone-recovery-evidence/**/*.log binary
|
||||
docs/companion-f-iphone-recovery-evidence/*.log binary
|
||||
docs/mobile-companion-*.json -text whitespace=blank-at-eol,blank-at-eof,space-before-tab,cr-at-eol
|
||||
tests/fixtures/legacy-workbench-0.1/dist-server/server.mjs binary
|
||||
docs/workers-*.tap binary
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
/.local/
|
||||
*.log
|
||||
!/docs/companion-f-local-evidence/**/*.log
|
||||
!/docs/companion-f-iphone-evidence/**/*.log
|
||||
!/docs/companion-f-iphone-recovery-evidence/**/*.log
|
||||
*.tmp
|
||||
/.qa/
|
||||
/releases/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Agent Workbench项目执行规范
|
||||
|
||||
1.16在feat/mobile-companion-1.16实施;A/B54/54、C–E新增24/24专项与7组Edge流程通过。来源2ecdfa2当前源码519/519、24类186组历史UI全部通过,313份源码输入和140份原字节证据封存,见docs/QA-1.16.md。版本1.16.0仍为候选;真实iPhone、最终独立源码/完整发行及正式升级仍待完成。独立手机候选使用4320管理与4321 HTTPS、自有示例/数据/Node24;Windows与iPhone通过同局域网Safari/PWA联调,无须Mac,原生iOS分发另议。不能把390px/中继/协议夹具写成真实手机交付。正式1.15宿主保持;不读取原模型Key。手机根证书需用户手动信任,不自动改OS信任或防火墙。
|
||||
1.16在feat/mobile-companion-1.16实施;A/B54/54、C–E新增24/24专项与7组Edge流程通过。来源2ecdfa2当前源码519/519、24类186组历史UI全部通过,313份源码输入和140份原字节证据封存,见docs/QA-1.16.md。真实iPhone核心验收已通过:用户确认信任/审批/摘要/主屏幕/锁屏/切网/停止/撤销,原宿主审计、单次命令和进程/文件另行核对;设备iPhone 14 Pro Max/iOS 27.2为用户提供,无手机截图。版本1.16.0仍为候选,最终独立源码/完整发行及正式升级待完成。独立手机候选使用4320管理与4321 HTTPS、自有示例/数据/Node24;漏npm的旧候选和原失败保留,新1958文件候选同数据重启后4/4工程检查通过。当前48024已恢复demo/无Key,实机设备已撤销,继续体验需新配对。Windows与iPhone通过同局域网Safari/PWA联调,无须Mac,原生iOS分发另议;不把中继验证当实机证据。正式36552/1.15保持,不读取原模型Key,不自动改OS信任或防火墙。
|
||||
|
||||
## 范围与目标
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
产品目标是让用户给出需求后,工作台能保留项目基线,完成定位、计划、修改、检查、必要修复、审查和Git交付,并在停止、故障、断线后明确保留已完成结果。桌面与手机共享同一执行宿主、任务和证据。
|
||||
|
||||
当前接续:1.16 A/B网关与权限、C–E本地手机界面/原审批/停止/断线已实现,24项专项和7组实际Edge流程、当前源码519/519及24类186组历史UI通过。已启动与正式4318隔离的4320/4321 iPhone联调候选;先完成用户手动证书信任、Safari/主屏幕/后台切网/撤销真实验收,再固定完整发行、独立源码/随包与保留状态升级。设备操作说明见[Windows与iPhone联调](IPHONE-COMPANION.md),实时门槛见[QA-1.16](QA-1.16.md)。原宿主继续保留现有项目与连接。
|
||||
当前接续:1.16 A–E完成,24项专项、7组Edge、当前源码519/519及24类186组历史UI通过。真实iPhone核心验收已通过:信任/原审批/摘要/主屏幕/锁屏/切网/停止/撤销由用户确认,原审计/命令/进程/文件另行核对;设备iPhone 14 Pro Max/iOS 27.2为用户提供,无手机截图。4320/4321候选恢复demo无Key,实机设备已撤销。接下来补根mobile.html的发行QA输入覆盖,固定完整不可变发行,完成独立源码/随包/同载荷安装后保留状态升级。设备说明见[Windows与iPhone联调](IPHONE-COMPANION.md),原失败和实际门槛见[QA-1.16](QA-1.16.md);正式36552/1.15保持。
|
||||
|
||||
## 执行顺序与完成门槛
|
||||
|
||||
|
||||
+11
-1
@@ -1,6 +1,6 @@
|
||||
# 1.16 手机伴随端验收
|
||||
|
||||
2026-10-31从06c9fac/正式1.15.0接续。A–F按PLAN-1.16实施,当前尚未完成手机交付。用户指定iPhone,可配合手动证书信任。自有项目、数据和端口用于开发;正式宿主、Provider与已有数据保持,真实模型请求为0。
|
||||
2026-10-31从06c9fac/正式1.15.0接续。A–F按PLAN-1.16实施,A–E及真实iPhone核心验收通过,最终独立源码/完整发行与正式升级尚未完成。自有项目、数据和端口用于开发;正式宿主、Provider与已有数据保持,真实模型请求为0。
|
||||
|
||||
## A/B:网关与权限(本地通过,手机设备仍待验)
|
||||
|
||||
@@ -35,3 +35,13 @@
|
||||
来源`2ecdfa2`的本轮完整源码回归已正常结束,519/519通过,0失败、0取消、0跳过,耗时1247127.7223ms;独立端口/数据的24类历史UI串行全部通过,共186组。完整原TAP、24组原报告/日志和截图、手机候选来源/实际TLS/管理界面及封存器均按原字节保存,共140份、10096575字节,映射和SHA见[封存清单](companion-f-local-evidence/manifest.json)。313份源码输入与候选冻结时的原SHA一致;本轮是当前工作区完整回归,最终完整发行中的独立源码/随包验收仍另外执行。
|
||||
|
||||
首次封存预检误把`inputs`中的PNG图标路径也当截图,并未识别部分旧报告的截图basename,已在创建输出前拒绝。保留[原脚本和失败日志](companion-f-local-evidence/seal-first-failure/original-failure.log),封存器改为按截图字段及原日志EVIDENCE目录定位,先验证原result.json与保存报告原字节相同,再核对自有QA路径和逐文件SHA。产品源码、原通过测试和原证据均未改写,不重跑已通过测试。真实iPhone与正式发行门槛仍保持待验。
|
||||
|
||||
## 真实 iPhone:配对、原审批与恢复已核对
|
||||
|
||||
用户在iPhone手动安装并完全信任原证书,确认进入任务并批准命令。服务器保存设备`eb23f12d-15c7-4ac3-b556-347e970a2384`的原配对和完成审批审计;原Task `b8b756c5-27bd-413e-821c-a19f2e7c009c`显式从超时Run续接到`37a84e03-cb83-44bc-8353-b8333723ca9f`。之前三项读取/提案结果保持,旧命令仍为未执行;新审批对应的`node --version`只完成一次、退出0、输出`v24.22.1`。这是用户实际手机操作与原宿主记录的对应结果;设备iPhone 14 Pro Max/iOS 27.2为用户文本提供,未录制或目视检查手机屏幕。
|
||||
|
||||
准备工程报告时发现独立QA候选只复制Node、漏带npm,原检查`6b07ed59-fc16-4361-a8b4-b8e63228bf8f`因此失败且没有运行测试。原失败、脚本、会话和旧32文件候选均保留。没有修改旧app:新建`D:\AWQA16\iphone-ca3891a9\runtime-repair-e4844a60\app`,原32文件每字节不变,加入固定npm11.19.1的1926文件,共1958文件;逐项SHA核对后,仅停止自有33324并从同一数据目录启动48024。证书指纹、全部设备/审计、原Task/Run/消息/事件/提案/审批/检查/工件均按原值核对保持。正式36552/1.15.0保持。根目录启动/状态/停止脚本已指向新候选,原脚本另行封存。
|
||||
|
||||
新的原Task检查4/4通过,0失败/跳过,报告`da8fb865-64f3-4bbe-a3fb-6740ded44b6a`已生成;原npm失败不改写为成功。用户确认候选重启后原任务能打开,差异及报告均显示SHA-256核对;随后确认主屏幕、锁屏和断Wi-Fi恢复均正常。服务器复核Task/Run、原事件/消息/改动/审批完整SHA和原报告SHA保持,已完成命令仍只有一次。[原始手机与候选修复证据](companion-f-iphone-evidence/manifest.json)和[阶段结果](mobile-companion-real-iphone-validation.json)分别保存。
|
||||
|
||||
用户随后批准并停止专用原Task `1754088e-ffea-4b86-8cc6-a13b1412d975`,原Node子进程14596已退出;33行心跳在停止后和撤销后复核均不再增长。仅一次loopback合成模型请求,实际命令由原Runtime登记/启动一次,最终任务paused;合成用量不算真实模型消耗。撤销原设备后用户确认内容清空、提示重新连接,宿主核对设备revoked和审计完成。候选48024恢复demo/hasKey=false,正式36552/1.15.0保持。[恢复/停止/撤销15份原字节证据及最终复核](companion-f-iphone-recovery-evidence/manifest.json)封存。真实iPhone核心通过;最终独立源码、便携、同载荷安装和保留状态升级仍待完成,1.16尚未记完整交付。重新体验需生成新配对码,不能恢复旧cookie。
|
||||
|
||||
@@ -23,3 +23,9 @@
|
||||
用户核对Windows能否联调iPhone。实际方案是Windows运行HTTPS宿主、iPhone Safari/PWA接续同一任务,无须引入Mac或原生打包链。独立候选冻结当前源码/构建/Node并用完整清单核对,程序与自有示例数据分离;4320/4321不替换正式4318。候选真实TLS和管理页面就绪已观察,手机手动信任及实际操作尚未发生,状态明确保留待验。网络复核发现无线接口保留地址但未连接,选择已有默认网关的真实以太网;手机能否经Wi-Fi互访仍以实机为准。
|
||||
|
||||
当前源码519/519与24类186组历史UI完整通过,140份原字节证据和313源码输入已核对封存。封存首次预检拒绝暴露报告格式差异:输入图标不等于截图、旧报告使用basename;依据原日志EVIDENCE目录及原报告SHA定位,未改原报告或放宽自有路径边界。封存工具修正不触发产品整轮重跑。独立手机样例因等候超过原预算而暂停,原Task/Run保持,说明联调也需尊重原执行期限;实机准备后显式恢复,不能让示例永久自动续期。下一步保持真实iPhone→最终独立源码/完整发行→保留状态正式升级的顺序。
|
||||
|
||||
## 真实手机接续回顾
|
||||
|
||||
真实iPhone完成用户手动信任、原命令审批、差异/报告摘要核对、主屏幕与锁屏/切网,原宿主数据证明Task/Run和完成命令未重放。QA候选漏带npm在实际工程检查中被正确拒绝,说明只验证HTTPS/页面仍不足以验证可交付运行环境。保留旧候选和原失败,新候选逐字节保留原32文件并加入固定npm,通过同一数据目录受控重启恢复;证书/配对/全部原执行记录保持,新的4项真实工程检查通过。完整发行构建器原本已复制npm,本次没有修改产品代码,也没有把当前工作区519项通过冒充新增独立发行验收。手机操作由用户确认,服务器记录另行核对;型号iPhone 14 Pro Max/iOS 27.2为用户提供,无手机截图,不写成目视核对。
|
||||
|
||||
运行中停止与撤销已收口:手机批准并停止原进程,宿主核对14596身份/退出及33行心跳保持;撤销后手机清空原项目,原设备已revoked。原Task paused是实际状态,不能按验收器偏好改写为cancelled。合成模型仅用于本地协议夹具,不算真实模型效果;候选已恢复demo无Key。真实手机核心通过后,完整发行仍独立验收;QA数据的证书/配对身份不得擅自迁入正式数据目录。下一步补发行输入mobile.html覆盖,冻结不可变包并执行独立源码和随包流程。
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import assert from 'node:assert/strict';
|
||||
|
||||
const runtime = JSON.parse(fs.readFileSync('.qa/current-iphone-runtime.json', 'utf8'));
|
||||
const live = JSON.parse(fs.readFileSync('.qa/current-real-iphone-acceptance.json', 'utf8'));
|
||||
const initial = JSON.parse(fs.readFileSync('.qa/mobile-companion-iphone-setup.json', 'utf8'));
|
||||
const base = runtime.desktopUrl.replace(/\/$/, '');
|
||||
const health = await (await fetch(base + '/api/health')).json(); assert.equal(health.pid, runtime.pid); assert.equal(health.version, '1.16.0');
|
||||
const bootstrap = await (await fetch(base + '/api/bootstrap')).json(); assert.equal(bootstrap.config.mode, 'demo'); assert.equal(bootstrap.config.hasKey, false);
|
||||
async function api(route, input) {
|
||||
const response = await fetch(base + '/api' + route, { method: input ? 'POST' : 'GET', headers: { 'X-Workbench-Token': bootstrap.token, Connection: 'close', ...(input ? { 'Content-Type': 'application/json' } : {}) }, body: input ? JSON.stringify(input) : undefined, signal: AbortSignal.timeout(30000) });
|
||||
const value = await response.json(); assert.ok(response.ok, JSON.stringify({ status: response.status, error: value.error })); return value;
|
||||
}
|
||||
const before = await api('/sessions/' + live.sessionId); assert.equal(before.taskId, live.taskId); assert.equal(before.runId, live.runId);
|
||||
assert.equal(before.execution.checks.at(-1).id, runtime.oldFailedCheckId); assert.equal(before.execution.checks.at(-1).status, 'failed');
|
||||
const change = before.changes.find(value => value.path === 'WORKBENCH-NOTES.md' && value.taskId === live.taskId); assert.equal(change.status, 'applied');
|
||||
const planned = await api('/sessions/' + live.sessionId + '/check-plans', { names: ['test'] }); const plan = planned.execution.plans.at(-1); assert.equal(plan.taskId, live.taskId);
|
||||
await api('/sessions/' + live.sessionId + '/check-jobs', { planId: plan.id });
|
||||
let session; const deadline = Date.now() + 30000;
|
||||
do { session = await api('/sessions/' + live.sessionId); if (['passed', 'failed', 'unverified'].includes(session.execution.checks.at(-1)?.status)) break; await new Promise(resolve => setTimeout(resolve, 150)); } while (Date.now() < deadline);
|
||||
const job = session.execution.checks.at(-1);
|
||||
fs.writeFileSync(path.join(runtime.repairRoot, 'new-check-original-session.json'), JSON.stringify(session, null, 2) + '\n', { flag: 'wx' });
|
||||
assert.equal(job.status, 'passed'); assert.equal(job.taskId, live.taskId); assert.equal(job.runId, live.runId);
|
||||
assert.equal(job.results.length, 1); assert.equal(job.results[0].tests.total, 4); assert.equal(job.results[0].tests.passed, 4); assert.equal(job.results[0].tests.failed, 0);
|
||||
const reported = await api('/sessions/' + live.sessionId + '/delivery-reports', {});
|
||||
const report = reported.execution.artifacts.findLast(value => value.kind === 'delivery-report-markdown'); assert.ok(report);
|
||||
const commands = reported.events.filter(value => value.tool === 'run_command'); assert.equal(commands.filter(value => value.phase === 'completed').length, 1);
|
||||
assert.equal(commands.find(value => value.runId === initial.runId).phase, 'interrupted');
|
||||
const gateway = await api('/companion');
|
||||
const approval = gateway.audit.find(value => value.action === 'approve' && value.status === 'completed' && value.taskId === live.taskId && value.runId === live.runId); assert.ok(approval);
|
||||
const formal = await (await fetch('http://127.0.0.1:4318/api/health')).json(); assert.equal(formal.pid, runtime.formalService.pid);
|
||||
const result = { at: new Date().toISOString(), success: true, candidate: true, pid: runtime.pid, version: health.version, desktopUrl: runtime.desktopUrl, mobileOrigin: runtime.mobileOrigin,
|
||||
userReported: { iphoneCertificateTrusted: true, enteredTaskAndApproved: true, modelAndIOS: 'not-provided' },
|
||||
serverObserved: { sessionId: live.sessionId, taskId: live.taskId, runId: live.runId, originalCompletedReadsAndProposal: 3, actualCommandCompletedCount: 1,
|
||||
commandEvent: commands.find(value => value.phase === 'completed'), completedDeviceApproval: approval,
|
||||
originalFailedCheck: { id: runtime.oldFailedCheckId, reason: 'isolated candidate omitted npm; no tests ran', retainedUnchanged: true },
|
||||
newCheck: { id: job.id, status: job.status, results: job.results }, report: { id: report.id, kind: report.kind, sha256: report.sha256, bytes: report.bytes },
|
||||
pairedDevices: gateway.devices, candidateReplacement: { oldPid: runtime.originalPid, newPid: runtime.pid, original32ProgramFilesUnchanged: true, addedFixedNpmFiles: runtime.addedNpmFiles, originalTaskAndDeviceAndCertificatePreserved: true } },
|
||||
realModelRequests: 0, formalService: { pid: formal.pid, version: formal.version },
|
||||
pendingActualDeviceAcceptance: ['diff and report digest display', 'phone reconnect after candidate restart', 'standalone home-screen PWA', 'lock/unlock and offline/reconnect without command replay', 'live process stop', 'revocation'] };
|
||||
fs.writeFileSync(path.join(runtime.repairRoot, 'report-result.json'), JSON.stringify(result, null, 2) + '\n', { flag: 'wx' });
|
||||
fs.writeFileSync(path.join(live.directory, 'verified-approval-and-report.json'), JSON.stringify(result, null, 2) + '\n', { flag: 'wx' });
|
||||
console.log(JSON.stringify({ success: true, taskId: live.taskId, runId: live.runId, singleCommandOutput: result.serverObserved.commandEvent.output.trim(), testStatus: job.status, tests: job.results[0].tests, originalFailureRetained: true, reportId: report.id, pairedDevices: gateway.devices.length, originalCertificate: runtime.certificateSha256 }));
|
||||
@@ -0,0 +1,3 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
& (Join-Path $PSScriptRoot 'runtime-repair-e4844a60/app/runtime/node.exe') (Join-Path $PSScriptRoot 'runtime-repair-e4844a60/app/dist-server/host-launcher.mjs') start --app-root (Join-Path $PSScriptRoot 'runtime-repair-e4844a60/app') --data-root (Join-Path $PSScriptRoot 'data') --port 4320
|
||||
exit $LASTEXITCODE
|
||||
@@ -0,0 +1,3 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
& (Join-Path $PSScriptRoot 'runtime-repair-e4844a60/app/runtime/node.exe') (Join-Path $PSScriptRoot 'runtime-repair-e4844a60/app/dist-server/host-launcher.mjs') status --app-root (Join-Path $PSScriptRoot 'runtime-repair-e4844a60/app') --data-root (Join-Path $PSScriptRoot 'data') --port 4320
|
||||
exit $LASTEXITCODE
|
||||
@@ -0,0 +1,3 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
& (Join-Path $PSScriptRoot 'runtime-repair-e4844a60/app/runtime/node.exe') (Join-Path $PSScriptRoot 'runtime-repair-e4844a60/app/dist-server/host-launcher.mjs') stop --app-root (Join-Path $PSScriptRoot 'runtime-repair-e4844a60/app') --data-root (Join-Path $PSScriptRoot 'data') --port 4320
|
||||
exit $LASTEXITCODE
|
||||
@@ -0,0 +1 @@
|
||||
{"success":true,"taskId":"b8b756c5-27bd-413e-821c-a19f2e7c009c","runId":"37a84e03-cb83-44bc-8353-b8333723ca9f","singleCommandOutput":"v24.22.1","testStatus":"passed","tests":{"total":4,"passed":4,"failed":0,"cancelled":0,"skipped":0},"originalFailureRetained":true,"reportId":"da8fb865-64f3-4bbe-a3fb-6740ded44b6a","pairedDevices":1,"originalCertificate":"908958fe819dae8ec1527ec0dc352e0282b375d88c370bd2435574edb4e61bd7"}
|
||||
@@ -0,0 +1,155 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"at": "2026-10-31T10:42:14.244Z",
|
||||
"records": [
|
||||
{
|
||||
"original": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\iphone-real-5d40a34d-b8fb-485f-b591-fcd8c4418cfa\\approved-original-session.json",
|
||||
"archived": "docs/companion-f-iphone-evidence/phone/approved-original-session.json",
|
||||
"bytes": 45501,
|
||||
"sha256": "c32fbdf4479612d5bb9eb88a12a4a4ecdf7d60bd054b29622077e6a48213668b"
|
||||
},
|
||||
{
|
||||
"original": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\iphone-real-5d40a34d-b8fb-485f-b591-fcd8c4418cfa\\approved-device-audit.json",
|
||||
"archived": "docs/companion-f-iphone-evidence/phone/approved-device-audit.json",
|
||||
"bytes": 1617,
|
||||
"sha256": "5f7f4ec17ba5c742bb68e4ea16a85c367a26513e76c330b1ad5129683924d838"
|
||||
},
|
||||
{
|
||||
"original": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\iphone-real-5d40a34d-b8fb-485f-b591-fcd8c4418cfa\\verified-approval-and-report.json",
|
||||
"archived": "docs/companion-f-iphone-evidence/phone/verified-approval-and-report.json",
|
||||
"bytes": 4611,
|
||||
"sha256": "20395afa93248b0a6bdcdf0e9adee17116a45db53a9463001d6f96c002e611c5"
|
||||
},
|
||||
{
|
||||
"original": "D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60\\original-session-with-check-failure.json",
|
||||
"archived": "docs/companion-f-iphone-evidence/runtime-repair/original-session-with-check-failure.json",
|
||||
"bytes": 52247,
|
||||
"sha256": "0579b310ac40c829bfba7c31f9803bbb4f9ab782a6bdf0e3824096a71144176a"
|
||||
},
|
||||
{
|
||||
"original": "D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60\\original-device-public-record.json",
|
||||
"archived": "docs/companion-f-iphone-evidence/runtime-repair/original-device-public-record.json",
|
||||
"bytes": 2071,
|
||||
"sha256": "fe54ebd9a8620506bcf440107ee4bc501a278fd53356fea961527ac732d0ba28"
|
||||
},
|
||||
{
|
||||
"original": "D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60\\verify-real-iphone-approval.mjs",
|
||||
"archived": "docs/companion-f-iphone-evidence/runtime-repair/verify-real-iphone-approval.mjs",
|
||||
"bytes": 6748,
|
||||
"sha256": "85fedd9a42d6fecc6f6b0fcab26066c797745771c65878d2dbedeec2e8758c10"
|
||||
},
|
||||
{
|
||||
"original": "D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60\\real-iphone-approval-and-report.log",
|
||||
"archived": "docs/companion-f-iphone-evidence/runtime-repair/real-iphone-approval-and-report.log",
|
||||
"bytes": 536,
|
||||
"sha256": "f0a12887d221967d1da435ff14a1ab4385f39245d684cda11116016c7ef68c33"
|
||||
},
|
||||
{
|
||||
"original": "D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60\\PREPARED.json",
|
||||
"archived": "docs/companion-f-iphone-evidence/runtime-repair/PREPARED.json",
|
||||
"bytes": 575,
|
||||
"sha256": "8e2d193d5cc35f20a3f8afdd254dd2e2b3995fc5914b452ecd6af980d710ed8d"
|
||||
},
|
||||
{
|
||||
"original": "D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60\\STOPPED-ORIGINAL.json",
|
||||
"archived": "docs/companion-f-iphone-evidence/runtime-repair/STOPPED-ORIGINAL.json",
|
||||
"bytes": 66,
|
||||
"sha256": "410aa659b88da7b80b4d73a8fc1c44c5e88f62abf72115d4086251c2d6992667"
|
||||
},
|
||||
{
|
||||
"original": "D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60\\result.json",
|
||||
"archived": "docs/companion-f-iphone-evidence/runtime-repair/result.json",
|
||||
"bytes": 1329,
|
||||
"sha256": "9c09dd912b4c2c50c59676f661c87f161eefce302905e4bbf8fbde503c3c6282"
|
||||
},
|
||||
{
|
||||
"original": "D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60\\new-check-original-session.json",
|
||||
"archived": "docs/companion-f-iphone-evidence/runtime-repair/new-check-original-session.json",
|
||||
"bytes": 58748,
|
||||
"sha256": "2c00e8a8181859912f46ad8e8fec392930ea4c741bcbd66d0bd855ab2dfb8434"
|
||||
},
|
||||
{
|
||||
"original": "D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60\\report-result.json",
|
||||
"archived": "docs/companion-f-iphone-evidence/runtime-repair/report-result.json",
|
||||
"bytes": 4611,
|
||||
"sha256": "20395afa93248b0a6bdcdf0e9adee17116a45db53a9463001d6f96c002e611c5"
|
||||
},
|
||||
{
|
||||
"original": "D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60\\app\\MANIFEST.json",
|
||||
"archived": "docs/companion-f-iphone-evidence/runtime-repair/complete-app-manifest.json",
|
||||
"bytes": 390726,
|
||||
"sha256": "1af165859c80cee0c281b9c688d380d72c2bf4b4f34880234665b09fe9a9292b"
|
||||
},
|
||||
{
|
||||
"original": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\repair-iphone-runtime-bundle.mjs",
|
||||
"archived": "docs/companion-f-iphone-evidence/repair-runtime.mjs",
|
||||
"bytes": 8388,
|
||||
"sha256": "0d1d3dc0dbbe2a18df40d6993c5e87dd0e06840061e63e1023de9381337792a9"
|
||||
},
|
||||
{
|
||||
"original": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\complete-real-iphone-report.mjs",
|
||||
"archived": "docs/companion-f-iphone-evidence/complete-checks-and-report.mjs",
|
||||
"bytes": 5548,
|
||||
"sha256": "d3ee148bd23f555e8f42d2a79cd007c25897fb8e3bd8e64a5dc3218b899ae584"
|
||||
},
|
||||
{
|
||||
"original": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\real-iphone-runtime-repair.log",
|
||||
"archived": "docs/companion-f-iphone-evidence/runtime-repair.log",
|
||||
"bytes": 353,
|
||||
"sha256": "192b427e47b1f9f6c2c4dcd50b3dcebb493cc1f0f6fcca7ab3291c3a96e4d2d0"
|
||||
},
|
||||
{
|
||||
"original": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\real-iphone-final-check-and-report.log",
|
||||
"archived": "docs/companion-f-iphone-evidence/final-checks.log",
|
||||
"bytes": 424,
|
||||
"sha256": "9e56781cd54676cda514338b76139ffb359e47756061eb9d8591274d92c3f86d"
|
||||
},
|
||||
{
|
||||
"original": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\seal-real-iphone-phase.mjs",
|
||||
"archived": "docs/companion-f-iphone-evidence/seal-evidence.mjs",
|
||||
"bytes": 5497,
|
||||
"sha256": "30b10bd67bd97037274d449c4f7147cfd34eb66d92d4f6d424e2480488d56c13"
|
||||
},
|
||||
{
|
||||
"original": "D:\\AWQA16\\iphone-ca3891a9\\start-iphone-qa.ps1",
|
||||
"archived": "docs/companion-f-iphone-evidence/original-launchers/start-iphone-qa.ps1",
|
||||
"bytes": 270,
|
||||
"sha256": "85c844c912292fbe9c21445c19cb9c8d07895690592dbcc4b6e0a298a48b2308"
|
||||
},
|
||||
{
|
||||
"original": "D:\\AWQA16\\iphone-ca3891a9\\start-iphone-qa.ps1",
|
||||
"archived": "docs/companion-f-iphone-evidence/current-launchers/start-iphone-qa.ps1",
|
||||
"bytes": 342,
|
||||
"sha256": "f6aeaa22c314ee4a4eb9e592901c2aba58e9bd489cf3f7b93282c374e000fdf4"
|
||||
},
|
||||
{
|
||||
"original": "D:\\AWQA16\\iphone-ca3891a9\\stop-iphone-qa.ps1",
|
||||
"archived": "docs/companion-f-iphone-evidence/original-launchers/stop-iphone-qa.ps1",
|
||||
"bytes": 269,
|
||||
"sha256": "b10af4018cb7c2e9b547227c3996f053512335f4fd8a4e121f2fe763081e1eec"
|
||||
},
|
||||
{
|
||||
"original": "D:\\AWQA16\\iphone-ca3891a9\\stop-iphone-qa.ps1",
|
||||
"archived": "docs/companion-f-iphone-evidence/current-launchers/stop-iphone-qa.ps1",
|
||||
"bytes": 341,
|
||||
"sha256": "d2c87d8c829f4866a28988cddf9f56be883ab296bedd4443ae858472114727f8"
|
||||
},
|
||||
{
|
||||
"original": "D:\\AWQA16\\iphone-ca3891a9\\status-iphone-qa.ps1",
|
||||
"archived": "docs/companion-f-iphone-evidence/original-launchers/status-iphone-qa.ps1",
|
||||
"bytes": 271,
|
||||
"sha256": "0c74bb47c800526a5d346149f199e3e5e0dd48ce732226243a524f74167e6eda"
|
||||
},
|
||||
{
|
||||
"original": "D:\\AWQA16\\iphone-ca3891a9\\status-iphone-qa.ps1",
|
||||
"archived": "docs/companion-f-iphone-evidence/current-launchers/status-iphone-qa.ps1",
|
||||
"bytes": 343,
|
||||
"sha256": "efcefe8c6469374c4f50f01919da23d1c135981872207b955ee1fa3a7ee04d3f"
|
||||
}
|
||||
],
|
||||
"bytes": 591432,
|
||||
"scope": "Partial actual iPhone acceptance: user-reported native operation and corresponding original host/device audit; complete replacement of isolated QA runtime retains old app and failed check. No expired pairing QR, device cookie, private certificate or host registration secret is archived.",
|
||||
"realModelRequests": 0,
|
||||
"sourceCodeChanged": false,
|
||||
"fullPhoneAcceptance": "pending"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
& (Join-Path $PSScriptRoot 'app/runtime/node.exe') (Join-Path $PSScriptRoot 'app/dist-server/host-launcher.mjs') start --app-root (Join-Path $PSScriptRoot 'app') --data-root (Join-Path $PSScriptRoot 'data') --port 4320
|
||||
exit $LASTEXITCODE
|
||||
@@ -0,0 +1,3 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
& (Join-Path $PSScriptRoot 'app/runtime/node.exe') (Join-Path $PSScriptRoot 'app/dist-server/host-launcher.mjs') status --app-root (Join-Path $PSScriptRoot 'app') --data-root (Join-Path $PSScriptRoot 'data') --port 4320
|
||||
exit $LASTEXITCODE
|
||||
@@ -0,0 +1,3 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
& (Join-Path $PSScriptRoot 'app/runtime/node.exe') (Join-Path $PSScriptRoot 'app/dist-server/host-launcher.mjs') stop --app-root (Join-Path $PSScriptRoot 'app') --data-root (Join-Path $PSScriptRoot 'data') --port 4320
|
||||
exit $LASTEXITCODE
|
||||
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"at": "2026-10-31T10:36:43.469Z",
|
||||
"devices": [
|
||||
{
|
||||
"id": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"name": "iPhone",
|
||||
"projectIds": [
|
||||
"57a950af-49bd-4e54-9e37-c95f3d59002d"
|
||||
],
|
||||
"permissions": {
|
||||
"observe": true,
|
||||
"approve": true,
|
||||
"stop": true
|
||||
},
|
||||
"revision": 1,
|
||||
"createdAt": "2026-10-31T10:26:14.079Z",
|
||||
"expiresAt": "2026-11-30T10:26:14.079Z",
|
||||
"revokedAt": null,
|
||||
"status": "active"
|
||||
}
|
||||
],
|
||||
"audit": [
|
||||
{
|
||||
"id": "25c28b32-6cd0-4915-a512-0fdb2ea2ed38",
|
||||
"at": "2026-10-31T10:34:39.061Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "approve",
|
||||
"status": "completed",
|
||||
"requestId": "44f9227d-888a-455a-a3e3-8ad01967ba6b",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f"
|
||||
},
|
||||
{
|
||||
"id": "fb261e8e-08f3-421f-8637-5f25c7c4e859",
|
||||
"at": "2026-10-31T10:34:38.988Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "approve",
|
||||
"status": "pending",
|
||||
"requestId": "44f9227d-888a-455a-a3e3-8ad01967ba6b",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f"
|
||||
},
|
||||
{
|
||||
"id": "9a782de7-009a-46d1-8ed9-85b81aa5ade5",
|
||||
"at": "2026-10-31T10:26:14.079Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "pair",
|
||||
"status": "completed"
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,131 @@
|
||||
{
|
||||
"at": "2026-10-31T10:40:44.112Z",
|
||||
"success": true,
|
||||
"candidate": true,
|
||||
"pid": 48024,
|
||||
"version": "1.16.0",
|
||||
"desktopUrl": "http://127.0.0.1:4320/",
|
||||
"mobileOrigin": "https://192.168.66.91:4321",
|
||||
"userReported": {
|
||||
"iphoneCertificateTrusted": true,
|
||||
"enteredTaskAndApproved": true,
|
||||
"modelAndIOS": "not-provided"
|
||||
},
|
||||
"serverObserved": {
|
||||
"sessionId": "4df01501-cabc-4b52-b6f9-b140b3f7a1e1",
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f",
|
||||
"originalCompletedReadsAndProposal": 3,
|
||||
"actualCommandCompletedCount": 1,
|
||||
"commandEvent": {
|
||||
"id": "58a71b96-c0ef-4791-a3e6-cd2c5ee13788",
|
||||
"createdAt": "2026-10-31T10:33:18.434Z",
|
||||
"startedAt": "2026-10-31T10:33:18.434Z",
|
||||
"kind": "tool",
|
||||
"phase": "completed",
|
||||
"toolCallId": "demo_f0d183e1b8474852a3b008621aca7f57",
|
||||
"tool": "run_command",
|
||||
"label": "运行终端命令",
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f",
|
||||
"invocationId": "f72c9f63-b3a5-4259-b479-460b771938b9",
|
||||
"input": {
|
||||
"command": "node --version",
|
||||
"reason": "上次演示命令中断;重新请求确认后核对 Node 版本。"
|
||||
},
|
||||
"executedAt": "2026-10-31T10:34:39.084Z",
|
||||
"output": "v24.22.1\r\n",
|
||||
"exitCode": 0,
|
||||
"finishedAt": "2026-10-31T10:34:39.386Z",
|
||||
"durationMs": 80952,
|
||||
"artifactId": "c36e387f-a1f3-4efc-aaed-4b0c273aa495"
|
||||
},
|
||||
"completedDeviceApproval": {
|
||||
"id": "25c28b32-6cd0-4915-a512-0fdb2ea2ed38",
|
||||
"at": "2026-10-31T10:34:39.061Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "approve",
|
||||
"status": "completed",
|
||||
"requestId": "44f9227d-888a-455a-a3e3-8ad01967ba6b",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f"
|
||||
},
|
||||
"originalFailedCheck": {
|
||||
"id": "6b07ed59-fc16-4361-a8b4-b8e63228bf8f",
|
||||
"reason": "isolated candidate omitted npm; no tests ran",
|
||||
"retainedUnchanged": true
|
||||
},
|
||||
"newCheck": {
|
||||
"id": "648fe290-7c51-418c-bd74-bf1cdc311970",
|
||||
"status": "passed",
|
||||
"results": [
|
||||
{
|
||||
"id": "01bbdd0c-aa69-46b8-8c4b-4989f2f9efc0",
|
||||
"name": "test",
|
||||
"kind": "test",
|
||||
"command": "npm run test",
|
||||
"status": "passed",
|
||||
"exitCode": 0,
|
||||
"durationMs": 298,
|
||||
"tests": {
|
||||
"total": 4,
|
||||
"passed": 4,
|
||||
"failed": 0,
|
||||
"cancelled": 0,
|
||||
"skipped": 0
|
||||
},
|
||||
"timedOut": false,
|
||||
"truncated": false,
|
||||
"logArtifactId": "0eb26c9b-e6f9-498f-97ae-ccb2e583ec47",
|
||||
"logExcerpt": "\n> test\n> node --test\n\n✔ 标题与标签均可检索,忽略大小写与首尾空白 (0.8249ms)\n✔ 多关键词搜索不受词序影响,支持跨标题与标签匹配 (0.1433ms)\n✔ 所有关键词都必须匹配同一条目 (0.1026ms)\n✔ 空查询与纯空白查询返回全部条目 (0.0832ms)\nℹ tests 4\nℹ suites 0\nℹ pass 4\nℹ fail 0\nℹ cancelled 0\nℹ skipped 0\nℹ todo 0\nℹ duration_ms 59.1021\n"
|
||||
}
|
||||
]
|
||||
},
|
||||
"report": {
|
||||
"id": "da8fb865-64f3-4bbe-a3fb-6740ded44b6a",
|
||||
"kind": "delivery-report-markdown",
|
||||
"sha256": "b1823d616b131de0abd138dfc6a1a76af4d09091fcb64eb98efb0f604e8c0351",
|
||||
"bytes": 2818
|
||||
},
|
||||
"pairedDevices": [
|
||||
{
|
||||
"id": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"name": "iPhone",
|
||||
"projectIds": [
|
||||
"57a950af-49bd-4e54-9e37-c95f3d59002d"
|
||||
],
|
||||
"permissions": {
|
||||
"observe": true,
|
||||
"approve": true,
|
||||
"stop": true
|
||||
},
|
||||
"revision": 1,
|
||||
"createdAt": "2026-10-31T10:26:14.079Z",
|
||||
"expiresAt": "2026-11-30T10:26:14.079Z",
|
||||
"revokedAt": null,
|
||||
"status": "active"
|
||||
}
|
||||
],
|
||||
"candidateReplacement": {
|
||||
"oldPid": 33324,
|
||||
"newPid": 48024,
|
||||
"original32ProgramFilesUnchanged": true,
|
||||
"addedFixedNpmFiles": 1926,
|
||||
"originalTaskAndDeviceAndCertificatePreserved": true
|
||||
}
|
||||
},
|
||||
"realModelRequests": 0,
|
||||
"formalService": {
|
||||
"pid": 36552,
|
||||
"version": "1.15.0"
|
||||
},
|
||||
"pendingActualDeviceAcceptance": [
|
||||
"diff and report digest display",
|
||||
"phone reconnect after candidate restart",
|
||||
"standalone home-screen PWA",
|
||||
"lock/unlock and offline/reconnect without command replay",
|
||||
"live process stop",
|
||||
"revocation"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import assert from 'node:assert/strict';
|
||||
import { randomUUID, createHash } from 'node:crypto';
|
||||
import { HostController } from '../src/core/desktop/host-controller.mjs';
|
||||
|
||||
const setup = JSON.parse(fs.readFileSync('.qa/mobile-companion-iphone-setup.json', 'utf8'));
|
||||
const live = JSON.parse(fs.readFileSync('.qa/current-real-iphone-acceptance.json', 'utf8'));
|
||||
const original = JSON.parse(fs.readFileSync('.qa/mobile-companion-iphone-candidate.json', 'utf8'));
|
||||
const repairRoot = path.join(original.root, 'runtime-repair-' + randomUUID().slice(0, 8)); fs.mkdirSync(repairRoot);
|
||||
const hash = bytes => createHash('sha256').update(bytes).digest('hex');
|
||||
let bootstrap, base = setup.desktopUrl.replace(/\/$/, '');
|
||||
async function api(route, input) {
|
||||
const response = await fetch(base + '/api' + route, { method: input ? 'POST' : 'GET', headers: { 'X-Workbench-Token': bootstrap.token, Connection: 'close', ...(input ? { 'Content-Type': 'application/json' } : {}) }, body: input ? JSON.stringify(input) : undefined, signal: AbortSignal.timeout(30000) });
|
||||
const value = await response.json(); assert.ok(response.ok, JSON.stringify({ status: response.status, error: value.error })); return value;
|
||||
}
|
||||
const healthBefore = await (await fetch(base + '/api/health')).json(); assert.equal(healthBefore.pid, setup.pid); assert.equal(healthBefore.version, setup.version);
|
||||
bootstrap = await (await fetch(base + '/api/bootstrap')).json(); assert.equal(bootstrap.config.mode, 'demo'); assert.equal(bootstrap.config.hasKey, false);
|
||||
const before = await api('/sessions/' + live.sessionId), gatewayBefore = await api('/companion'), hostBefore = await api('/host/status');
|
||||
const activity = hostBefore.activity; assert.ok(activity && activity.active === false, 'Wait for original activities to finish.');
|
||||
const failed = before.execution.checks.at(-1); assert.equal(failed.status, 'failed'); assert.ok(failed.results[0].reason.includes('没有可用的npm CLI')); assert.equal(failed.results[0].tests, null);
|
||||
fs.writeFileSync(path.join(repairRoot, 'original-session-with-check-failure.json'), JSON.stringify(before, null, 2) + '\n', { flag: 'wx' });
|
||||
fs.writeFileSync(path.join(repairRoot, 'original-device-public-record.json'), JSON.stringify(gatewayBefore, null, 2) + '\n', { flag: 'wx' });
|
||||
for (const file of ['verify-real-iphone-approval.mjs', 'real-iphone-approval-and-report.log']) fs.copyFileSync(path.join('.qa', file), path.join(repairRoot, file), fs.constants.COPYFILE_EXCL);
|
||||
const oldManifestBytes = fs.readFileSync(path.join(original.appRoot, 'MANIFEST.json')); assert.equal(hash(oldManifestBytes), original.appManifest.sha256);
|
||||
const oldManifest = JSON.parse(oldManifestBytes);
|
||||
for (const row of oldManifest.files) { const bytes = fs.readFileSync(path.join(original.appRoot, row.path)); assert.equal(hash(bytes), row.sha256); assert.equal(bytes.length, row.bytes); }
|
||||
const newRoot = path.join(repairRoot, 'app'); fs.mkdirSync(newRoot);
|
||||
for (const entry of fs.readdirSync(original.appRoot, { withFileTypes: true })) {
|
||||
if (entry.name !== 'MANIFEST.json') fs.cpSync(path.join(original.appRoot, entry.name), path.join(newRoot, entry.name), { recursive: true, errorOnExist: true, force: false });
|
||||
}
|
||||
const npmSource = path.join(path.dirname(process.execPath), 'node_modules/npm'); assert.ok(fs.existsSync(path.join(npmSource, 'bin/npm-cli.js')));
|
||||
const npmTarget = path.join(newRoot, 'runtime/node_modules/npm'); fs.mkdirSync(path.dirname(npmTarget)); fs.cpSync(npmSource, npmTarget, { recursive: true, errorOnExist: true, force: false });
|
||||
function inventory(directory, prefix = '') { return fs.readdirSync(directory, { withFileTypes: true }).flatMap(entry => { assert.equal(entry.isSymbolicLink(), false); const name = prefix + entry.name, file = path.join(directory, entry.name); if (entry.isDirectory()) return inventory(file, name + '/'); const bytes = fs.readFileSync(file); return [{ path: name, bytes: bytes.length, sha256: hash(bytes) }]; }).sort((a,b) => a.path.localeCompare(b.path)); }
|
||||
const files = inventory(newRoot), npmFiles = inventory(npmSource);
|
||||
for (const row of oldManifest.files) assert.deepEqual(files.find(value => value.path === row.path), row, 'All original app bytes stay identical.');
|
||||
for (const row of npmFiles) { const target = files.find(value => value.path === 'runtime/node_modules/npm/' + row.path); assert.equal(target.sha256, row.sha256); assert.equal(target.bytes, row.bytes); }
|
||||
const manifest = { ...oldManifest, createdAt: new Date().toISOString(), purpose: 'complete-node-and-npm-iphone-manual-qa', supersedesOriginalManifestSha256: hash(oldManifestBytes), files };
|
||||
fs.writeFileSync(path.join(newRoot, 'MANIFEST.json'), JSON.stringify(manifest, null, 2) + '\n', { flag: 'wx' });
|
||||
const prepared = { at: new Date().toISOString(), originalApp: original.appRoot, appRoot: newRoot, dataRoot: original.dataRoot, nodePath: path.join(newRoot, 'runtime/node.exe'), files: files.length, unchangedOriginalFiles: oldManifest.files.length, addedNpmFiles: npmFiles.length, npmVersion: JSON.parse(fs.readFileSync(path.join(npmSource, 'package.json'), 'utf8')).version,
|
||||
originalCandidateRetained: true, originalFailureRetained: true, formalServicePort: 4318, sourceCommit: original.sourceCommit };
|
||||
fs.writeFileSync(path.join(repairRoot, 'PREPARED.json'), JSON.stringify(prepared, null, 2) + '\n', { flag: 'wx' });
|
||||
await api('/companion/close', {});
|
||||
const controllerBefore = new HostController({ appRoot: original.appRoot, dataRoot: original.dataRoot, nodePath: original.nodePath, port: 4320 });
|
||||
const stopped = await controllerBefore.stop(); assert.equal(stopped.state, 'stopped'); assert.equal(stopped.identity.pid, setup.pid); assert.equal(stopped.processExited, true);
|
||||
fs.writeFileSync(path.join(repairRoot, 'STOPPED-ORIGINAL.json'), JSON.stringify({ state: stopped.state, pid: stopped.identity.pid, processExited: stopped.processExited }, null, 2) + '\n', { flag: 'wx' });
|
||||
const controllerAfter = new HostController({ appRoot: newRoot, dataRoot: original.dataRoot, nodePath: prepared.nodePath, port: 4320 });
|
||||
const started = await controllerAfter.start(); assert.equal(started.reused, false); assert.notEqual(started.identity.pid, setup.pid);
|
||||
bootstrap = await (await fetch(base + '/api/bootstrap')).json(); assert.equal(bootstrap.config.mode, 'demo'); assert.equal(bootstrap.config.hasKey, false);
|
||||
const gatewayAfter = await api('/companion/start', { address: '192.168.66.91', port: 4321 }); assert.equal(gatewayAfter.origin, gatewayBefore.origin); assert.equal(gatewayAfter.certificate.sha256, gatewayBefore.certificate.sha256);
|
||||
assert.deepEqual(gatewayAfter.devices, gatewayBefore.devices); assert.deepEqual(gatewayAfter.audit, gatewayBefore.audit);
|
||||
const after = await api('/sessions/' + live.sessionId);
|
||||
for (const key of ['taskId', 'runId', 'messages', 'events', 'changes', 'approvals']) assert.deepEqual(after[key], before[key], 'Preserve original session ' + key);
|
||||
assert.deepEqual(after.execution.checks, before.execution.checks); assert.deepEqual(after.execution.artifacts, before.execution.artifacts);
|
||||
const formal = await (await fetch('http://127.0.0.1:4318/api/health')).json(); assert.equal(formal.pid, setup.formalService.pid); assert.equal(formal.version, setup.formalService.version);
|
||||
const result = { ...prepared, at: new Date().toISOString(), success: true, repairRoot, pid: started.identity.pid, originalPid: setup.pid, desktopUrl: setup.desktopUrl, mobileOrigin: gatewayAfter.origin, certificateSha256: gatewayAfter.certificate.sha256,
|
||||
sameOriginalDataRoot: true, devicesAndAuditUnchanged: true, originalSessionEvidenceUnchanged: true, sameTaskId: live.taskId, sameRunId: live.runId, oldFailedCheckId: failed.id,
|
||||
formalService: { pid: formal.pid, version: formal.version }, actualPhoneCookieAfterRestart: 'pending-device-reconnect', realModelRequests: 0 };
|
||||
fs.writeFileSync(path.join(repairRoot, 'result.json'), JSON.stringify(result, null, 2) + '\n', { flag: 'wx' });
|
||||
fs.writeFileSync('.qa/current-iphone-runtime.json', JSON.stringify(result, null, 2) + '\n');
|
||||
console.log(JSON.stringify({ success: true, repairRoot, appRoot: newRoot, pid: result.pid, originalPid: result.originalPid, files: files.length, unchangedOriginalFiles: result.unchangedOriginalFiles, addedNpmFiles: npmFiles.length, npmVersion: result.npmVersion, dataAndPairingPreserved: true, formalService: result.formalService }));
|
||||
@@ -0,0 +1 @@
|
||||
{"success":true,"repairRoot":"D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60","appRoot":"D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60\\app","pid":48024,"originalPid":33324,"files":1958,"unchangedOriginalFiles":32,"addedNpmFiles":1926,"npmVersion":"11.19.1","dataAndPairingPreserved":true,"formalService":{"pid":36552,"version":"1.15.0"}}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"at": "2026-10-31T10:39:13.595Z",
|
||||
"originalApp": "D:\\AWQA16\\iphone-ca3891a9\\app",
|
||||
"appRoot": "D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60\\app",
|
||||
"dataRoot": "D:\\AWQA16\\iphone-ca3891a9\\data",
|
||||
"nodePath": "D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60\\app\\runtime\\node.exe",
|
||||
"files": 1958,
|
||||
"unchangedOriginalFiles": 32,
|
||||
"addedNpmFiles": 1926,
|
||||
"npmVersion": "11.19.1",
|
||||
"originalCandidateRetained": true,
|
||||
"originalFailureRetained": true,
|
||||
"formalServicePort": 4318,
|
||||
"sourceCommit": "2ecdfa2cedbc3dd28abaea2f32b22a203f785847"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"state": "stopped",
|
||||
"pid": 33324,
|
||||
"processExited": true
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"enabled": true,
|
||||
"busy": false,
|
||||
"origin": "https://192.168.66.91:4321",
|
||||
"addresses": [
|
||||
{
|
||||
"name": "以太网",
|
||||
"address": "192.168.66.91"
|
||||
},
|
||||
{
|
||||
"name": "vEthernet (WSL (Hyper-V firewall))",
|
||||
"address": "172.30.64.1"
|
||||
}
|
||||
],
|
||||
"gatewayId": "9a11bc62-d881-4a56-890f-c6e981ab4541",
|
||||
"revision": 5,
|
||||
"devices": [
|
||||
{
|
||||
"id": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"name": "iPhone",
|
||||
"projectIds": [
|
||||
"57a950af-49bd-4e54-9e37-c95f3d59002d"
|
||||
],
|
||||
"permissions": {
|
||||
"observe": true,
|
||||
"approve": true,
|
||||
"stop": true
|
||||
},
|
||||
"revision": 1,
|
||||
"createdAt": "2026-10-31T10:26:14.079Z",
|
||||
"expiresAt": "2026-11-30T10:26:14.079Z",
|
||||
"revokedAt": null,
|
||||
"status": "active"
|
||||
}
|
||||
],
|
||||
"audit": [
|
||||
{
|
||||
"id": "25c28b32-6cd0-4915-a512-0fdb2ea2ed38",
|
||||
"at": "2026-10-31T10:34:39.061Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "approve",
|
||||
"status": "completed",
|
||||
"requestId": "44f9227d-888a-455a-a3e3-8ad01967ba6b",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f"
|
||||
},
|
||||
{
|
||||
"id": "fb261e8e-08f3-421f-8637-5f25c7c4e859",
|
||||
"at": "2026-10-31T10:34:38.988Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "approve",
|
||||
"status": "pending",
|
||||
"requestId": "44f9227d-888a-455a-a3e3-8ad01967ba6b",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f"
|
||||
},
|
||||
{
|
||||
"id": "9a782de7-009a-46d1-8ed9-85b81aa5ade5",
|
||||
"at": "2026-10-31T10:26:14.079Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "pair",
|
||||
"status": "completed"
|
||||
}
|
||||
],
|
||||
"certificate": {
|
||||
"sha256": "908958fe819dae8ec1527ec0dc352e0282b375d88c370bd2435574edb4e61bd7",
|
||||
"expiresAt": "2028-10-30T10:01:42.000Z"
|
||||
}
|
||||
}
|
||||
+1230
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,19 @@
|
||||
node:internal/modules/run_main:107
|
||||
triggerUncaughtException(
|
||||
^
|
||||
|
||||
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
|
||||
|
||||
'failed' !== 'passed'
|
||||
|
||||
at file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/.qa/verify-real-iphone-approval.mjs:36:55
|
||||
at process.processTicksAndRejections (node:internal/process/task_queues:104:5) {
|
||||
generatedMessage: true,
|
||||
code: 'ERR_ASSERTION',
|
||||
actual: 'failed',
|
||||
expected: 'passed',
|
||||
operator: 'strictEqual',
|
||||
diff: 'simple'
|
||||
}
|
||||
|
||||
Node.js v24.22.1
|
||||
@@ -0,0 +1,131 @@
|
||||
{
|
||||
"at": "2026-10-31T10:40:44.112Z",
|
||||
"success": true,
|
||||
"candidate": true,
|
||||
"pid": 48024,
|
||||
"version": "1.16.0",
|
||||
"desktopUrl": "http://127.0.0.1:4320/",
|
||||
"mobileOrigin": "https://192.168.66.91:4321",
|
||||
"userReported": {
|
||||
"iphoneCertificateTrusted": true,
|
||||
"enteredTaskAndApproved": true,
|
||||
"modelAndIOS": "not-provided"
|
||||
},
|
||||
"serverObserved": {
|
||||
"sessionId": "4df01501-cabc-4b52-b6f9-b140b3f7a1e1",
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f",
|
||||
"originalCompletedReadsAndProposal": 3,
|
||||
"actualCommandCompletedCount": 1,
|
||||
"commandEvent": {
|
||||
"id": "58a71b96-c0ef-4791-a3e6-cd2c5ee13788",
|
||||
"createdAt": "2026-10-31T10:33:18.434Z",
|
||||
"startedAt": "2026-10-31T10:33:18.434Z",
|
||||
"kind": "tool",
|
||||
"phase": "completed",
|
||||
"toolCallId": "demo_f0d183e1b8474852a3b008621aca7f57",
|
||||
"tool": "run_command",
|
||||
"label": "运行终端命令",
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f",
|
||||
"invocationId": "f72c9f63-b3a5-4259-b479-460b771938b9",
|
||||
"input": {
|
||||
"command": "node --version",
|
||||
"reason": "上次演示命令中断;重新请求确认后核对 Node 版本。"
|
||||
},
|
||||
"executedAt": "2026-10-31T10:34:39.084Z",
|
||||
"output": "v24.22.1\r\n",
|
||||
"exitCode": 0,
|
||||
"finishedAt": "2026-10-31T10:34:39.386Z",
|
||||
"durationMs": 80952,
|
||||
"artifactId": "c36e387f-a1f3-4efc-aaed-4b0c273aa495"
|
||||
},
|
||||
"completedDeviceApproval": {
|
||||
"id": "25c28b32-6cd0-4915-a512-0fdb2ea2ed38",
|
||||
"at": "2026-10-31T10:34:39.061Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "approve",
|
||||
"status": "completed",
|
||||
"requestId": "44f9227d-888a-455a-a3e3-8ad01967ba6b",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f"
|
||||
},
|
||||
"originalFailedCheck": {
|
||||
"id": "6b07ed59-fc16-4361-a8b4-b8e63228bf8f",
|
||||
"reason": "isolated candidate omitted npm; no tests ran",
|
||||
"retainedUnchanged": true
|
||||
},
|
||||
"newCheck": {
|
||||
"id": "648fe290-7c51-418c-bd74-bf1cdc311970",
|
||||
"status": "passed",
|
||||
"results": [
|
||||
{
|
||||
"id": "01bbdd0c-aa69-46b8-8c4b-4989f2f9efc0",
|
||||
"name": "test",
|
||||
"kind": "test",
|
||||
"command": "npm run test",
|
||||
"status": "passed",
|
||||
"exitCode": 0,
|
||||
"durationMs": 298,
|
||||
"tests": {
|
||||
"total": 4,
|
||||
"passed": 4,
|
||||
"failed": 0,
|
||||
"cancelled": 0,
|
||||
"skipped": 0
|
||||
},
|
||||
"timedOut": false,
|
||||
"truncated": false,
|
||||
"logArtifactId": "0eb26c9b-e6f9-498f-97ae-ccb2e583ec47",
|
||||
"logExcerpt": "\n> test\n> node --test\n\n✔ 标题与标签均可检索,忽略大小写与首尾空白 (0.8249ms)\n✔ 多关键词搜索不受词序影响,支持跨标题与标签匹配 (0.1433ms)\n✔ 所有关键词都必须匹配同一条目 (0.1026ms)\n✔ 空查询与纯空白查询返回全部条目 (0.0832ms)\nℹ tests 4\nℹ suites 0\nℹ pass 4\nℹ fail 0\nℹ cancelled 0\nℹ skipped 0\nℹ todo 0\nℹ duration_ms 59.1021\n"
|
||||
}
|
||||
]
|
||||
},
|
||||
"report": {
|
||||
"id": "da8fb865-64f3-4bbe-a3fb-6740ded44b6a",
|
||||
"kind": "delivery-report-markdown",
|
||||
"sha256": "b1823d616b131de0abd138dfc6a1a76af4d09091fcb64eb98efb0f604e8c0351",
|
||||
"bytes": 2818
|
||||
},
|
||||
"pairedDevices": [
|
||||
{
|
||||
"id": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"name": "iPhone",
|
||||
"projectIds": [
|
||||
"57a950af-49bd-4e54-9e37-c95f3d59002d"
|
||||
],
|
||||
"permissions": {
|
||||
"observe": true,
|
||||
"approve": true,
|
||||
"stop": true
|
||||
},
|
||||
"revision": 1,
|
||||
"createdAt": "2026-10-31T10:26:14.079Z",
|
||||
"expiresAt": "2026-11-30T10:26:14.079Z",
|
||||
"revokedAt": null,
|
||||
"status": "active"
|
||||
}
|
||||
],
|
||||
"candidateReplacement": {
|
||||
"oldPid": 33324,
|
||||
"newPid": 48024,
|
||||
"original32ProgramFilesUnchanged": true,
|
||||
"addedFixedNpmFiles": 1926,
|
||||
"originalTaskAndDeviceAndCertificatePreserved": true
|
||||
}
|
||||
},
|
||||
"realModelRequests": 0,
|
||||
"formalService": {
|
||||
"pid": 36552,
|
||||
"version": "1.15.0"
|
||||
},
|
||||
"pendingActualDeviceAcceptance": [
|
||||
"diff and report digest display",
|
||||
"phone reconnect after candidate restart",
|
||||
"standalone home-screen PWA",
|
||||
"lock/unlock and offline/reconnect without command replay",
|
||||
"live process stop",
|
||||
"revocation"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"at": "2026-10-31T10:39:21.788Z",
|
||||
"originalApp": "D:\\AWQA16\\iphone-ca3891a9\\app",
|
||||
"appRoot": "D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60\\app",
|
||||
"dataRoot": "D:\\AWQA16\\iphone-ca3891a9\\data",
|
||||
"nodePath": "D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60\\app\\runtime\\node.exe",
|
||||
"files": 1958,
|
||||
"unchangedOriginalFiles": 32,
|
||||
"addedNpmFiles": 1926,
|
||||
"npmVersion": "11.19.1",
|
||||
"originalCandidateRetained": true,
|
||||
"originalFailureRetained": true,
|
||||
"formalServicePort": 4318,
|
||||
"sourceCommit": "2ecdfa2cedbc3dd28abaea2f32b22a203f785847",
|
||||
"success": true,
|
||||
"repairRoot": "D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60",
|
||||
"pid": 48024,
|
||||
"originalPid": 33324,
|
||||
"desktopUrl": "http://127.0.0.1:4320/",
|
||||
"mobileOrigin": "https://192.168.66.91:4321",
|
||||
"certificateSha256": "908958fe819dae8ec1527ec0dc352e0282b375d88c370bd2435574edb4e61bd7",
|
||||
"sameOriginalDataRoot": true,
|
||||
"devicesAndAuditUnchanged": true,
|
||||
"originalSessionEvidenceUnchanged": true,
|
||||
"sameTaskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"sameRunId": "37a84e03-cb83-44bc-8353-b8333723ca9f",
|
||||
"oldFailedCheckId": "6b07ed59-fc16-4361-a8b4-b8e63228bf8f",
|
||||
"formalService": {
|
||||
"pid": 36552,
|
||||
"version": "1.15.0"
|
||||
},
|
||||
"actualPhoneCookieAfterRestart": "pending-device-reconnect",
|
||||
"realModelRequests": 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';
|
||||
|
||||
const setup = JSON.parse(fs.readFileSync('.qa/mobile-companion-iphone-setup.json', 'utf8'));
|
||||
const live = JSON.parse(fs.readFileSync('.qa/current-real-iphone-acceptance.json', 'utf8'));
|
||||
const url = setup.desktopUrl.replace(/\/$/, ''), digest = bytes => createHash('sha256').update(bytes).digest('hex');
|
||||
const health = await (await fetch(url + '/api/health')).json(); assert.equal(health.pid, setup.pid); assert.equal(health.version, setup.version);
|
||||
const bootstrap = await (await fetch(url + '/api/bootstrap')).json(); assert.equal(bootstrap.config.mode, 'demo'); assert.equal(bootstrap.config.hasKey, false);
|
||||
async function api(route, input) {
|
||||
const response = await fetch(url + '/api' + route, { method: input ? 'POST' : 'GET', headers: { 'X-Workbench-Token': bootstrap.token, Connection: 'close', ...(input ? { 'Content-Type': 'application/json' } : {}) }, body: input ? JSON.stringify(input) : undefined, signal: AbortSignal.timeout(30000) });
|
||||
const value = await response.json(); assert.ok(response.ok, JSON.stringify({ status: response.status, error: value.error })); return value;
|
||||
}
|
||||
const before = await api('/sessions/' + live.sessionId), gateway = await api('/companion');
|
||||
assert.equal(before.taskId, live.taskId); assert.equal(before.runId, live.runId);
|
||||
const completed = before.events.filter(value => value.tool === 'run_command' && value.phase === 'completed');
|
||||
assert.equal(completed.length, 1); assert.equal(completed[0].exitCode, 0); assert.equal(completed[0].output.trim(), 'v24.22.1');
|
||||
const approved = gateway.audit.filter(value => value.action === 'approve' && value.status === 'completed' && value.taskId === live.taskId && value.runId === live.runId);
|
||||
assert.equal(approved.length, 1); const device = gateway.devices.find(value => value.id === approved[0].deviceId); assert.equal(device.name, 'iPhone');
|
||||
const oldCommand = before.events.find(value => value.tool === 'run_command' && value.runId === setup.runId); assert.equal(oldCommand.phase, 'interrupted'); assert.equal(JSON.parse(oldCommand.output).message, '命令未执行。');
|
||||
const originalResults = before.events.filter(value => value.runId === setup.runId && value.phase === 'completed'); assert.equal(originalResults.length, 3);
|
||||
const project = bootstrap.projects.find(value => value.id === setup.projectId); assert.ok(path.resolve(project.root).startsWith(path.resolve('D:/AWQA16/iphone-ca3891a9/data') + path.sep));
|
||||
const change = before.changes.find(value => value.taskId === live.taskId && value.path === 'WORKBENCH-NOTES.md'); assert.equal(change.status, 'pending');
|
||||
assert.equal(change.baseExists, false); assert.equal(fs.existsSync(path.join(project.root, change.path)), false);
|
||||
assert.ok(change.content.includes('这份记录由离线演示脚本准备'));
|
||||
fs.writeFileSync(path.join(live.directory, 'approved-original-session.json'), JSON.stringify(before, null, 2) + '\n', { flag: 'wx' });
|
||||
fs.writeFileSync(path.join(live.directory, 'approved-device-audit.json'), JSON.stringify({ at: new Date().toISOString(), devices: gateway.devices, audit: gateway.audit }, null, 2) + '\n', { flag: 'wx' });
|
||||
await api('/sessions/' + live.sessionId + '/changes/' + change.id + '/apply', {});
|
||||
const written = fs.readFileSync(path.join(project.root, change.path)); assert.equal(written.toString('utf8'), change.content);
|
||||
const planned = await api('/sessions/' + live.sessionId + '/check-plans', { names: ['test'] });
|
||||
const plan = planned.execution.plans.at(-1); assert.equal(plan.taskId, live.taskId);
|
||||
await api('/sessions/' + live.sessionId + '/check-jobs', { planId: plan.id });
|
||||
const deadline = Date.now() + 30000; let current;
|
||||
do { current = await api('/sessions/' + live.sessionId); if (['passed', 'failed', 'unverified'].includes(current.execution.checks.at(-1)?.status)) break; await new Promise(resolve => setTimeout(resolve, 150)); } while (Date.now() < deadline);
|
||||
const check = current.execution.checks.at(-1); assert.equal(check.status, 'passed'); assert.equal(check.taskId, live.taskId);
|
||||
assert.ok(check.results.some(value => value.tests?.total > 0 && value.tests.failed === 0));
|
||||
const reported = await api('/sessions/' + live.sessionId + '/delivery-reports', {});
|
||||
assert.equal(reported.taskId, live.taskId); assert.equal(reported.runId, live.runId);
|
||||
const report = reported.execution.artifacts.findLast(value => value.kind === 'delivery-report-markdown'); assert.ok(report);
|
||||
assert.equal(reported.events.filter(value => value.tool === 'run_command' && value.phase === 'completed').length, 1);
|
||||
const formal = await (await fetch('http://127.0.0.1:4318/api/health')).json(); assert.equal(formal.pid, setup.formalService.pid); assert.equal(formal.version, setup.formalService.version);
|
||||
fs.writeFileSync(path.join(live.directory, 'checked-original-session.json'), JSON.stringify(reported, null, 2) + '\n', { flag: 'wx' });
|
||||
const result = { at: new Date().toISOString(), candidate: true, version: health.version, pid: health.pid,
|
||||
device: { id: device.id, name: device.name, status: device.status }, userReported: { iphoneCertificateTrusted: true, enteredTaskAndApproved: true, deviceModelAndIOS: 'not-yet-provided' },
|
||||
serverObserved: { taskId: live.taskId, originalRunId: setup.runId, resumedRunId: live.runId, oldUnexecutedCommandRetained: true, completedPriorReadAndProposalResults: originalResults.length,
|
||||
oneCompletedDeviceApproval: approved[0], command: { completedCount: 1, invocationEventId: completed[0].id, exitCode: completed[0].exitCode, output: completed[0].output },
|
||||
appliedOwnedChange: { id: change.id, path: change.path, sha256: digest(written) }, check: { id: check.id, status: check.status, results: check.results.map(value => ({ name: value.name, status: value.status, exitCode: value.exitCode, tests: value.tests })) },
|
||||
report: { id: report.id, kind: report.kind, sha256: report.sha256, bytes: report.bytes } },
|
||||
pendingActualDeviceAcceptance: ['diff and report digest display', 'home-screen standalone PWA', 'lock/unlock and offline/reconnect preserve original Task/Run without command replay', 'real live process stop from phone', 'device revocation'],
|
||||
realModelRequests: 0, formalService: { pid: formal.pid, version: formal.version } };
|
||||
fs.writeFileSync(path.join(live.directory, 'approval-and-report-result.json'), JSON.stringify(result, null, 2) + '\n', { flag: 'wx' });
|
||||
console.log(JSON.stringify({ success: true, directory: live.directory, taskId: live.taskId, runId: live.runId, completedCommands: 1, commandOutput: completed[0].output.trim(), tests: result.serverObserved.check.results, reportId: report.id, actualDeviceRemaining: result.pendingActualDeviceAcceptance }));
|
||||
@@ -0,0 +1,36 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import assert from 'node:assert/strict';
|
||||
import { createHash } from 'node:crypto';
|
||||
|
||||
const live = JSON.parse(fs.readFileSync('.qa/current-real-iphone-acceptance.json', 'utf8'));
|
||||
const runtime = JSON.parse(fs.readFileSync('.qa/current-iphone-runtime.json', 'utf8'));
|
||||
const result = JSON.parse(fs.readFileSync(path.join(live.directory, 'verified-approval-and-report.json'), 'utf8'));
|
||||
const root = path.resolve('docs/companion-f-iphone-evidence'); assert.equal(fs.existsSync(root), false); fs.mkdirSync(root);
|
||||
const hash = bytes => createHash('sha256').update(bytes).digest('hex'); const records = [];
|
||||
function copy(source, relative) { const file = path.join(root, relative); assert.ok(file.startsWith(root + path.sep)); const bytes = fs.readFileSync(source); fs.mkdirSync(path.dirname(file), { recursive: true }); fs.writeFileSync(file, bytes, { flag: 'wx' }); assert.equal(hash(fs.readFileSync(file)), hash(bytes)); records.push({ original: path.resolve(source), archived: path.relative(process.cwd(), file).replaceAll('\\', '/'), bytes: bytes.length, sha256: hash(bytes) }); }
|
||||
for (const name of ['approved-original-session.json', 'approved-device-audit.json', 'verified-approval-and-report.json']) copy(path.join(live.directory, name), 'phone/' + name);
|
||||
for (const name of ['original-session-with-check-failure.json', 'original-device-public-record.json', 'verify-real-iphone-approval.mjs', 'real-iphone-approval-and-report.log', 'PREPARED.json', 'STOPPED-ORIGINAL.json', 'result.json', 'new-check-original-session.json', 'report-result.json']) copy(path.join(runtime.repairRoot, name), 'runtime-repair/' + name);
|
||||
copy(path.join(runtime.appRoot, 'MANIFEST.json'), 'runtime-repair/complete-app-manifest.json');
|
||||
for (const [source, target] of [['.qa/repair-iphone-runtime-bundle.mjs', 'repair-runtime.mjs'], ['.qa/complete-real-iphone-report.mjs', 'complete-checks-and-report.mjs'], ['.qa/real-iphone-runtime-repair.log', 'runtime-repair.log'], ['.qa/real-iphone-final-check-and-report.log', 'final-checks.log'], ['.qa/seal-real-iphone-phase.mjs', 'seal-evidence.mjs']]) copy(source, target);
|
||||
for (const command of ['start', 'stop', 'status']) {
|
||||
const file = path.join('D:/AWQA16/iphone-ca3891a9', command + '-iphone-qa.ps1');
|
||||
copy(file, 'original-launchers/' + command + '-iphone-qa.ps1');
|
||||
const relativeApp = path.relative(path.dirname(file), runtime.appRoot).replaceAll('\\', '/');
|
||||
const text = '$ErrorActionPreference = \'Stop\'\n& (Join-Path $PSScriptRoot \'' + relativeApp + '/runtime/node.exe\') (Join-Path $PSScriptRoot \'' + relativeApp + '/dist-server/host-launcher.mjs\') ' + command + ' --app-root (Join-Path $PSScriptRoot \'' + relativeApp + '\') --data-root (Join-Path $PSScriptRoot \'data\') --port 4320\nexit $LASTEXITCODE\n';
|
||||
fs.writeFileSync(file, text); copy(file, 'current-launchers/' + command + '-iphone-qa.ps1');
|
||||
}
|
||||
const receipt = { schema: 1, at: new Date().toISOString(), records, bytes: records.reduce((sum, row) => sum + row.bytes, 0), scope: 'Partial actual iPhone acceptance: user-reported native operation and corresponding original host/device audit; complete replacement of isolated QA runtime retains old app and failed check. No expired pairing QR, device cookie, private certificate or host registration secret is archived.', realModelRequests: 0, sourceCodeChanged: false, fullPhoneAcceptance: 'pending' };
|
||||
fs.writeFileSync(path.join(root, 'manifest.json'), JSON.stringify(receipt, null, 2) + '\n', { flag: 'wx' });
|
||||
const summary = { schema: 1, at: new Date().toISOString(), status: 'partial-real-iphone-acceptance', candidateVersion: '1.16.0', sourceCommit: runtime.sourceCommit, sourceCodeChanged: false,
|
||||
candidate: { pid: runtime.pid, originalPid: runtime.originalPid, appRoot: runtime.appRoot, dataRoot: runtime.dataRoot, desktopUrl: runtime.desktopUrl, mobileOrigin: runtime.mobileOrigin, files: runtime.files, npmVersion: runtime.npmVersion, original32FilesUnchanged: true },
|
||||
userReported: result.userReported,
|
||||
observed: { originalPairing: result.serverObserved.pairedDevices.map(device => ({ id: device.id, name: device.name, status: device.status })),
|
||||
taskId: result.serverObserved.taskId, runId: result.serverObserved.runId, commandCompletedCount: 1, commandOutput: result.serverObserved.commandEvent.output.trim(), commandExitCode: result.serverObserved.commandEvent.exitCode,
|
||||
completedDeviceApproval: result.serverObserved.completedDeviceApproval, passedTests: result.serverObserved.newCheck.results[0].tests,
|
||||
originalCheckFailureRetained: result.serverObserved.originalFailedCheck, report: result.serverObserved.report, certificateSha256: runtime.certificateSha256,
|
||||
replacement: { originalSessionEvidenceUnchanged: runtime.originalSessionEvidenceUnchanged, devicesAndAuditUnchanged: runtime.devicesAndAuditUnchanged, sameOriginalDataRoot: runtime.sameOriginalDataRoot } },
|
||||
actualDevicePending: result.pendingActualDeviceAcceptance, realModelRequests: 0, formalService: result.formalService,
|
||||
evidence: 'companion-f-iphone-evidence/manifest.json', fullMilestoneComplete: false };
|
||||
fs.writeFileSync('docs/mobile-companion-real-iphone-validation.json', JSON.stringify(summary, null, 2) + '\n', { flag: 'wx' });
|
||||
console.log(JSON.stringify({ status: summary.status, archivedFiles: records.length, archivedBytes: receipt.bytes, newCandidatePid: runtime.pid, tests: summary.observed.passedTests, formalService: summary.formalService, fullMilestoneComplete: false }));
|
||||
@@ -0,0 +1,149 @@
|
||||
{
|
||||
"at": "2026-10-31T10:54:27.680Z",
|
||||
"candidatePid": 48024,
|
||||
"candidateVersion": "1.16.0",
|
||||
"mode": "demo",
|
||||
"hasKey": false,
|
||||
"gateway": {
|
||||
"enabled": true,
|
||||
"busy": false,
|
||||
"origin": "https://192.168.66.91:4321",
|
||||
"addresses": [
|
||||
{
|
||||
"name": "以太网",
|
||||
"address": "192.168.66.91"
|
||||
},
|
||||
{
|
||||
"name": "vEthernet (WSL (Hyper-V firewall))",
|
||||
"address": "172.30.64.1"
|
||||
}
|
||||
],
|
||||
"gatewayId": "9a11bc62-d881-4a56-890f-c6e981ab4541",
|
||||
"revision": 11,
|
||||
"devices": [
|
||||
{
|
||||
"id": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"name": "iPhone",
|
||||
"projectIds": [
|
||||
"57a950af-49bd-4e54-9e37-c95f3d59002d"
|
||||
],
|
||||
"permissions": {
|
||||
"observe": true,
|
||||
"approve": true,
|
||||
"stop": true
|
||||
},
|
||||
"revision": 2,
|
||||
"createdAt": "2026-10-31T10:26:14.079Z",
|
||||
"expiresAt": "2026-11-30T10:26:14.079Z",
|
||||
"revokedAt": "2026-10-31T10:49:27.612Z",
|
||||
"status": "revoked"
|
||||
}
|
||||
],
|
||||
"audit": [
|
||||
{
|
||||
"id": "d03e7557-3db0-4eb4-8d30-56173634bb85",
|
||||
"at": "2026-10-31T10:49:27.612Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "revoke",
|
||||
"status": "completed"
|
||||
},
|
||||
{
|
||||
"id": "94114a3f-66c5-4af0-9f37-c0d290ac3abb",
|
||||
"at": "2026-10-31T10:47:08.768Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "stop",
|
||||
"status": "completed",
|
||||
"requestId": "b3a2dcad-5305-4e42-8c73-88a9c874092e",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c"
|
||||
},
|
||||
{
|
||||
"id": "b3966aa4-5501-400c-b335-eefcd6d2f092",
|
||||
"at": "2026-10-31T10:47:08.129Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "stop",
|
||||
"status": "pending",
|
||||
"requestId": "b3a2dcad-5305-4e42-8c73-88a9c874092e",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c"
|
||||
},
|
||||
{
|
||||
"id": "8beeafd6-cac8-48e5-ba4e-36a39b0a663b",
|
||||
"at": "2026-10-31T10:46:59.512Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "approve",
|
||||
"status": "completed",
|
||||
"requestId": "f7b83943-8e38-4a36-82a1-8db6cd882b6c",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c"
|
||||
},
|
||||
{
|
||||
"id": "881d3c23-3fb7-4ffc-bac8-84c01c57dbc6",
|
||||
"at": "2026-10-31T10:46:59.410Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "approve",
|
||||
"status": "pending",
|
||||
"requestId": "f7b83943-8e38-4a36-82a1-8db6cd882b6c",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c"
|
||||
},
|
||||
{
|
||||
"id": "25c28b32-6cd0-4915-a512-0fdb2ea2ed38",
|
||||
"at": "2026-10-31T10:34:39.061Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "approve",
|
||||
"status": "completed",
|
||||
"requestId": "44f9227d-888a-455a-a3e3-8ad01967ba6b",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f"
|
||||
},
|
||||
{
|
||||
"id": "fb261e8e-08f3-421f-8637-5f25c7c4e859",
|
||||
"at": "2026-10-31T10:34:38.988Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "approve",
|
||||
"status": "pending",
|
||||
"requestId": "44f9227d-888a-455a-a3e3-8ad01967ba6b",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f"
|
||||
},
|
||||
{
|
||||
"id": "9a782de7-009a-46d1-8ed9-85b81aa5ade5",
|
||||
"at": "2026-10-31T10:26:14.079Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "pair",
|
||||
"status": "completed"
|
||||
}
|
||||
],
|
||||
"certificate": {
|
||||
"sha256": "908958fe819dae8ec1527ec0dc352e0282b375d88c370bd2435574edb4e61bd7",
|
||||
"expiresAt": "2028-10-30T10:01:42.000Z"
|
||||
}
|
||||
},
|
||||
"originalTask": {
|
||||
"sessionId": "4df01501-cabc-4b52-b6f9-b140b3f7a1e1",
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f",
|
||||
"completedCommands": 1,
|
||||
"checks": [
|
||||
{
|
||||
"id": "6b07ed59-fc16-4361-a8b4-b8e63228bf8f",
|
||||
"status": "failed"
|
||||
},
|
||||
{
|
||||
"id": "648fe290-7c51-418c-bd74-bf1cdc311970",
|
||||
"status": "passed"
|
||||
}
|
||||
]
|
||||
},
|
||||
"formalService": {
|
||||
"pid": 36552,
|
||||
"version": "1.15.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{"state":"awaiting-user-mobile-approval-and-stop","sessionId":"055fde92-9c2b-4e4d-be02-00d057c7a9b7","taskId":"1754088e-ffea-4b86-8cc6-a13b1412d975","runId":"538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c","title":"iPhone 实机停止验收:本地协议夹具,不调用真实大模","directory":"D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\iphone-real-5d40a34d-b8fb-485f-b591-fcd8c4418cfa\\live-stop-00dad7b6"}
|
||||
{"state":"awaiting_approval","heartbeatRows":0,"awaitingPhoneStop":true}
|
||||
{"state":"awaiting_approval","heartbeatRows":0,"awaitingPhoneStop":true}
|
||||
{"state":"awaiting_approval","heartbeatRows":0,"awaitingPhoneStop":true}
|
||||
{"state":"owned-heartbeat-process-running","childPid":14596,"heartbeatRows":1}
|
||||
{"state":"running","heartbeatRows":14,"awaitingPhoneStop":true}
|
||||
{"success":true,"originalChildEnded":true,"heartbeatRowsObserved":33,"stableAfterStopMs":1200,"commandInvocations":1,"localFixtureRequests":1,"realModelRequests":0,"directory":"D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\iphone-real-5d40a34d-b8fb-485f-b591-fcd8c4418cfa\\live-stop-00dad7b6"}
|
||||
@@ -0,0 +1,34 @@
|
||||
{"pid":14596,"kind":"start","at":1793443619817}
|
||||
{"pid":14596,"kind":"beat","at":1793443620079}
|
||||
{"pid":14596,"kind":"beat","at":1793443620343}
|
||||
{"pid":14596,"kind":"beat","at":1793443620593}
|
||||
{"pid":14596,"kind":"beat","at":1793443620846}
|
||||
{"pid":14596,"kind":"beat","at":1793443621096}
|
||||
{"pid":14596,"kind":"beat","at":1793443621348}
|
||||
{"pid":14596,"kind":"beat","at":1793443621611}
|
||||
{"pid":14596,"kind":"beat","at":1793443621863}
|
||||
{"pid":14596,"kind":"beat","at":1793443622129}
|
||||
{"pid":14596,"kind":"beat","at":1793443622393}
|
||||
{"pid":14596,"kind":"beat","at":1793443622645}
|
||||
{"pid":14596,"kind":"beat","at":1793443622894}
|
||||
{"pid":14596,"kind":"beat","at":1793443623146}
|
||||
{"pid":14596,"kind":"beat","at":1793443623410}
|
||||
{"pid":14596,"kind":"beat","at":1793443623661}
|
||||
{"pid":14596,"kind":"beat","at":1793443623926}
|
||||
{"pid":14596,"kind":"beat","at":1793443624177}
|
||||
{"pid":14596,"kind":"beat","at":1793443624429}
|
||||
{"pid":14596,"kind":"beat","at":1793443624680}
|
||||
{"pid":14596,"kind":"beat","at":1793443624942}
|
||||
{"pid":14596,"kind":"beat","at":1793443625194}
|
||||
{"pid":14596,"kind":"beat","at":1793443625448}
|
||||
{"pid":14596,"kind":"beat","at":1793443625710}
|
||||
{"pid":14596,"kind":"beat","at":1793443625961}
|
||||
{"pid":14596,"kind":"beat","at":1793443626211}
|
||||
{"pid":14596,"kind":"beat","at":1793443626466}
|
||||
{"pid":14596,"kind":"beat","at":1793443626716}
|
||||
{"pid":14596,"kind":"beat","at":1793443626974}
|
||||
{"pid":14596,"kind":"beat","at":1793443627231}
|
||||
{"pid":14596,"kind":"beat","at":1793443627481}
|
||||
{"pid":14596,"kind":"beat","at":1793443627745}
|
||||
{"pid":14596,"kind":"beat","at":1793443628010}
|
||||
{"pid":14596,"kind":"beat","at":1793443628261}
|
||||
@@ -0,0 +1,372 @@
|
||||
{
|
||||
"id": "055fde92-9c2b-4e4d-be02-00d057c7a9b7",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"title": "iPhone 实机停止验收:本地协议夹具,不调用真实大模",
|
||||
"status": "paused",
|
||||
"createdAt": "2026-10-31T10:45:42.033Z",
|
||||
"updatedAt": "2026-10-31T10:47:08.701Z",
|
||||
"messages": [
|
||||
{
|
||||
"id": "093c3a37-d6c0-405e-b3ba-c5c5dd8c2318",
|
||||
"role": "user",
|
||||
"content": "iPhone 实机停止验收:本地协议夹具,不调用真实大模型。批准仅在示例项目 .qa 中写入心跳的命令,看到执行中后等2秒,在手机点停止原任务。",
|
||||
"createdAt": "2026-10-31T10:45:42.130Z"
|
||||
},
|
||||
{
|
||||
"id": "d8874463-d8e4-4f7e-a4ad-5763cd67b9ca",
|
||||
"role": "assistant",
|
||||
"content": "这是手机实机停止验收的本地协议夹具。批准后仅在示例项目 .qa 中每250ms写一行心跳,请从手机停止原任务。",
|
||||
"createdAt": "2026-10-31T10:45:42.705Z"
|
||||
},
|
||||
{
|
||||
"id": "e77963bf-cfcd-4742-99dd-25f5ad0fc65e",
|
||||
"role": "system",
|
||||
"content": "任务已停止,执行记录已保存。",
|
||||
"createdAt": "2026-10-31T10:47:08.560Z"
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"id": "41662490-e2e3-41c1-8693-43197ca61b00",
|
||||
"createdAt": "2026-10-31T10:45:42.464Z",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c",
|
||||
"kind": "model",
|
||||
"source": "model_connection",
|
||||
"label": "模型响应已收到",
|
||||
"phase": "completed",
|
||||
"startedAt": "2026-10-31T10:45:42.464Z",
|
||||
"contextPlanId": "8870b5d3-30b5-49f9-af0c-e8bd4b586ab0",
|
||||
"attempts": 1,
|
||||
"output": "模型响应已收到;工具请求将在校验后执行。",
|
||||
"durationMs": 117,
|
||||
"finishedAt": "2026-10-31T10:45:42.581Z"
|
||||
},
|
||||
{
|
||||
"id": "c7e7edc7-757c-4b24-a470-5366a502c659",
|
||||
"createdAt": "2026-10-31T10:45:42.705Z",
|
||||
"startedAt": "2026-10-31T10:45:42.705Z",
|
||||
"kind": "tool",
|
||||
"phase": "interrupted",
|
||||
"toolCallId": "phone_stop_iphone-stop-8b55c635",
|
||||
"tool": "run_command",
|
||||
"label": "运行终端命令",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c",
|
||||
"invocationId": "bd585539-e005-49f3-8d8f-a134045096eb",
|
||||
"input": {
|
||||
"command": "& \"D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60\\app\\runtime\\node.exe\" -e \"const fs=require('node:fs');fs.mkdirSync('.qa/iphone-stop-8b55c635',{recursive:true});const p='.qa/iphone-stop-8b55c635/heartbeat.ndjson';fs.appendFileSync(p,JSON.stringify({pid:process.pid,kind:'start',at:Date.now()})+'\\n');setInterval(()=>fs.appendFileSync(p,JSON.stringify({pid:process.pid,kind:'beat',at:Date.now()})+'\\n'),250);setTimeout(()=>process.exit(0),55000);\"",
|
||||
"reason": "本地 iPhone 停止验收:只在示例项目 .qa 写心跳,55秒自动结束;由手机批准并停止,不连接真实模型。"
|
||||
},
|
||||
"executedAt": "2026-10-31T10:46:59.546Z",
|
||||
"output": "",
|
||||
"exitCode": 1,
|
||||
"finishedAt": "2026-10-31T10:47:08.418Z",
|
||||
"durationMs": 85713,
|
||||
"artifactId": "e981137a-9a58-4694-bf18-91ae3a39a656"
|
||||
}
|
||||
],
|
||||
"changes": [],
|
||||
"approvals": [
|
||||
{
|
||||
"id": "69b7bb48-3f49-4cd8-aaf9-c3488eb7b472",
|
||||
"toolCallId": "phone_stop_iphone-stop-8b55c635",
|
||||
"eventId": "c7e7edc7-757c-4b24-a470-5366a502c659",
|
||||
"invocationId": "bd585539-e005-49f3-8d8f-a134045096eb",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"command": "& \"D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60\\app\\runtime\\node.exe\" -e \"const fs=require('node:fs');fs.mkdirSync('.qa/iphone-stop-8b55c635',{recursive:true});const p='.qa/iphone-stop-8b55c635/heartbeat.ndjson';fs.appendFileSync(p,JSON.stringify({pid:process.pid,kind:'start',at:Date.now()})+'\\n');setInterval(()=>fs.appendFileSync(p,JSON.stringify({pid:process.pid,kind:'beat',at:Date.now()})+'\\n'),250);setTimeout(()=>process.exit(0),55000);\"",
|
||||
"reason": "本地 iPhone 停止验收:只在示例项目 .qa 写心跳,55秒自动结束;由手机批准并停止,不连接真实模型。",
|
||||
"cwd": "D:\\AWQA16\\iphone-ca3891a9\\data\\projects\\starter-project",
|
||||
"shell": "Windows PowerShell 5.1",
|
||||
"status": "approved",
|
||||
"createdAt": "2026-10-31T10:45:42.905Z",
|
||||
"decidedAt": "2026-10-31T10:46:59.437Z"
|
||||
}
|
||||
],
|
||||
"failure": null,
|
||||
"lastFailure": null,
|
||||
"compactions": 0,
|
||||
"estimatedTokens": 6055,
|
||||
"usage": {
|
||||
"prompt_tokens": 1,
|
||||
"completion_tokens": 1,
|
||||
"total_tokens": 2
|
||||
},
|
||||
"archived": false,
|
||||
"revision": 23,
|
||||
"eventSeq": 105,
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c",
|
||||
"recoveryNotice": null,
|
||||
"executionMode": "compatible",
|
||||
"execution": {
|
||||
"schemaVersion": 1,
|
||||
"task": {
|
||||
"schemaVersion": 1,
|
||||
"id": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"sessionId": "055fde92-9c2b-4e4d-be02-00d057c7a9b7",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"goal": "iPhone 实机停止验收:本地协议夹具,不调用真实大模型。批准仅在示例项目 .qa 中写入心跳的命令,看到执行中后等2秒,在手机点停止原任务。",
|
||||
"instructions": [],
|
||||
"constraints": [],
|
||||
"acceptance": [],
|
||||
"status": "paused",
|
||||
"previousTaskId": null,
|
||||
"createdAt": "2026-10-31T10:45:42.083Z",
|
||||
"updatedAt": "2026-10-31T10:47:08.701Z",
|
||||
"activeRunId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c",
|
||||
"usage": {
|
||||
"requests": 1,
|
||||
"inputTokens": 1,
|
||||
"outputTokens": 1,
|
||||
"totalTokens": 2,
|
||||
"unknownRequests": 0,
|
||||
"estimatedUnknownTokens": 0
|
||||
},
|
||||
"budget": {
|
||||
"maxTokens": 1000000
|
||||
},
|
||||
"verification": {
|
||||
"status": "not_configured",
|
||||
"checkJobId": null
|
||||
},
|
||||
"origin": "workbench",
|
||||
"workspaceIdentity": {
|
||||
"kind": "local-project",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"root": "D:\\AWQA16\\iphone-ca3891a9\\data\\projects\\starter-project"
|
||||
}
|
||||
},
|
||||
"run": {
|
||||
"schemaVersion": 1,
|
||||
"id": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"sessionId": "055fde92-9c2b-4e4d-be02-00d057c7a9b7",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"engine": "workbench",
|
||||
"status": "paused",
|
||||
"startedAt": "2026-10-31T10:45:42.083Z",
|
||||
"finishedAt": "2026-10-31T10:47:08.701Z",
|
||||
"resumeOf": null,
|
||||
"model": {
|
||||
"mode": "compatible",
|
||||
"baseUrl": "http://127.0.0.1:63356/v1",
|
||||
"model": "owned-iphone-stop-fixture",
|
||||
"contextLimit": 16000,
|
||||
"maxOutputTokens": 2048,
|
||||
"configRevision": 2
|
||||
},
|
||||
"budget": {
|
||||
"maxSteps": 12,
|
||||
"maxDurationMs": 600000,
|
||||
"maxTokens": 200000,
|
||||
"maxTaskTokens": 1000000
|
||||
},
|
||||
"usage": {
|
||||
"requests": 1,
|
||||
"inputTokens": 1,
|
||||
"outputTokens": 1,
|
||||
"totalTokens": 2,
|
||||
"unknownRequests": 0,
|
||||
"estimatedUnknownTokens": 0
|
||||
},
|
||||
"steps": 1,
|
||||
"toolCalls": 1,
|
||||
"stopReason": "cancelled",
|
||||
"checkpoint": {
|
||||
"stepId": "65cf86c5-00ea-4c90-a357-251fcd9dc952",
|
||||
"completedToolIds": [
|
||||
"bd585539-e005-49f3-8d8f-a134045096eb"
|
||||
],
|
||||
"pendingToolIds": [],
|
||||
"requiresVerification": []
|
||||
},
|
||||
"origin": "workbench",
|
||||
"workspaceIdentity": {
|
||||
"kind": "local-project",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"root": "D:\\AWQA16\\iphone-ca3891a9\\data\\projects\\starter-project"
|
||||
},
|
||||
"currentContextPlanId": "8870b5d3-30b5-49f9-af0c-e8bd4b586ab0"
|
||||
},
|
||||
"workspaceIdentity": {
|
||||
"kind": "local-project",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"root": "D:\\AWQA16\\iphone-ca3891a9\\data\\projects\\starter-project"
|
||||
},
|
||||
"workspaces": [],
|
||||
"runs": [
|
||||
{
|
||||
"id": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"status": "paused",
|
||||
"startedAt": "2026-10-31T10:45:42.083Z",
|
||||
"finishedAt": "2026-10-31T10:47:08.701Z",
|
||||
"steps": 1,
|
||||
"toolCalls": 1,
|
||||
"usage": {
|
||||
"requests": 1,
|
||||
"inputTokens": 1,
|
||||
"outputTokens": 1,
|
||||
"totalTokens": 2,
|
||||
"unknownRequests": 0,
|
||||
"estimatedUnknownTokens": 0
|
||||
},
|
||||
"stopReason": "cancelled",
|
||||
"model": {
|
||||
"mode": "compatible",
|
||||
"baseUrl": "http://127.0.0.1:63356/v1",
|
||||
"model": "owned-iphone-stop-fixture",
|
||||
"contextLimit": 16000,
|
||||
"maxOutputTokens": 2048,
|
||||
"configRevision": 2
|
||||
},
|
||||
"budget": {
|
||||
"maxSteps": 12,
|
||||
"maxDurationMs": 600000,
|
||||
"maxTokens": 200000,
|
||||
"maxTaskTokens": 1000000
|
||||
},
|
||||
"resumeOf": null,
|
||||
"workspaceIdentity": {
|
||||
"kind": "local-project",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"root": "D:\\AWQA16\\iphone-ca3891a9\\data\\projects\\starter-project"
|
||||
}
|
||||
}
|
||||
],
|
||||
"progress": {
|
||||
"totalTools": 1,
|
||||
"completedTools": 0,
|
||||
"requiresVerification": []
|
||||
},
|
||||
"artifacts": [
|
||||
{
|
||||
"id": "c25f31f1-1555-4208-b598-c8478a59db4e",
|
||||
"sessionId": "055fde92-9c2b-4e4d-be02-00d057c7a9b7",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c",
|
||||
"kind": "model-request",
|
||||
"mediaType": "application/json",
|
||||
"sha256": "40c09b4caaf992edb3f41c2f481884442f4ef0f8969d4b9e99bd36663fd4ba71",
|
||||
"bytes": 17205,
|
||||
"relative": "40/40c09b4caaf992edb3f41c2f481884442f4ef0f8969d4b9e99bd36663fd4ba71.blob",
|
||||
"createdAt": "2026-10-31T10:45:42.369Z",
|
||||
"status": "stored"
|
||||
},
|
||||
{
|
||||
"id": "6be1c330-b178-4be7-96c7-5ab107f22de8",
|
||||
"sessionId": "055fde92-9c2b-4e4d-be02-00d057c7a9b7",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c",
|
||||
"kind": "context-plan",
|
||||
"mediaType": "application/json",
|
||||
"sha256": "426205df407296caeb338eec01cbc4daaafad3e461bcd19f04faa100a93825fc",
|
||||
"bytes": 1619,
|
||||
"relative": "42/426205df407296caeb338eec01cbc4daaafad3e461bcd19f04faa100a93825fc.blob",
|
||||
"createdAt": "2026-10-31T10:45:42.406Z",
|
||||
"status": "stored"
|
||||
},
|
||||
{
|
||||
"id": "e981137a-9a58-4694-bf18-91ae3a39a656",
|
||||
"sessionId": "055fde92-9c2b-4e4d-be02-00d057c7a9b7",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c",
|
||||
"kind": "tool-result",
|
||||
"mediaType": "application/json",
|
||||
"sha256": "300169e3f948a622237237ea5fe6e6ce7d8b17223f973c12d0648cdc95a85e28",
|
||||
"bytes": 573,
|
||||
"relative": "30/300169e3f948a622237237ea5fe6e6ce7d8b17223f973c12d0648cdc95a85e28.blob",
|
||||
"createdAt": "2026-10-31T10:47:08.440Z",
|
||||
"status": "stored"
|
||||
}
|
||||
],
|
||||
"checks": [],
|
||||
"mcpJobs": [],
|
||||
"taskPlans": [],
|
||||
"taskProofs": [],
|
||||
"researchTargets": [],
|
||||
"researchJobs": [],
|
||||
"engineJobs": [],
|
||||
"browserPlans": [],
|
||||
"browserJobs": [],
|
||||
"contextPlans": [
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "8870b5d3-30b5-49f9-af0c-e8bd4b586ab0",
|
||||
"sessionId": "055fde92-9c2b-4e4d-be02-00d057c7a9b7",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c",
|
||||
"stepId": "65cf86c5-00ea-4c90-a357-251fcd9dc952",
|
||||
"requestIndex": 1,
|
||||
"status": "completed",
|
||||
"createdAt": "2026-10-31T10:45:42.369Z",
|
||||
"finishedAt": "2026-10-31T10:45:42.639Z",
|
||||
"requestSha256": "40c09b4caaf992edb3f41c2f481884442f4ef0f8969d4b9e99bd36663fd4ba71",
|
||||
"requestBytes": 17205,
|
||||
"estimatedInputTokens": 6055,
|
||||
"requestArtifactId": "c25f31f1-1555-4208-b598-c8478a59db4e",
|
||||
"estimateMethod": "utf8-third-plus-framing-v1",
|
||||
"beforeInputTokens": 6055,
|
||||
"beforeBytes": 17205,
|
||||
"budget": {
|
||||
"contextLimit": 16000,
|
||||
"outputReservation": 2048,
|
||||
"safetyTokens": 1600,
|
||||
"inputBudget": 12352,
|
||||
"targetInputTokens": 12352,
|
||||
"runRemainingTokens": 200000,
|
||||
"taskRemainingTokens": 1000000,
|
||||
"limitingReason": "context_limit"
|
||||
},
|
||||
"mandatoryInputTokens": 6055,
|
||||
"nextReadFixedInputTokens": 6055,
|
||||
"workingRetentionTokens": 0,
|
||||
"originalMessages": 1,
|
||||
"retainedMessages": 1,
|
||||
"archivedGroups": 0,
|
||||
"retainedGroups": [
|
||||
0
|
||||
],
|
||||
"historyIndexArtifactId": null,
|
||||
"historyIndexSha256": null,
|
||||
"actualUsage": {
|
||||
"prompt_tokens": 1,
|
||||
"completion_tokens": 1,
|
||||
"total_tokens": 2
|
||||
},
|
||||
"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": 1,
|
||||
"responseSha256": "eefb58a68c3d08ac4097660f841975aa50b8502c96500e16ef881733a93dfe1c",
|
||||
"source": "workbench",
|
||||
"artifactId": "6be1c330-b178-4be7-96c7-5ab107f22de8"
|
||||
}
|
||||
],
|
||||
"changeSets": [],
|
||||
"plans": [],
|
||||
"deliveries": [],
|
||||
"deliveryPlans": [],
|
||||
"accountedTaskTokens": 2
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"pid": 14596,
|
||||
"parentPid": 25144,
|
||||
"createdAt": "2026-10-31T10:46:59.795Z",
|
||||
"executable": "D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60\\app\\runtime\\node.exe",
|
||||
"userSid": "S-1-5-21-3906741337-925321518-3767092861-1001"
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"at": "2026-10-31T10:45:42.974Z",
|
||||
"directory": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\iphone-real-5d40a34d-b8fb-485f-b591-fcd8c4418cfa\\live-stop-00dad7b6",
|
||||
"sessionId": "055fde92-9c2b-4e4d-be02-00d057c7a9b7",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c",
|
||||
"command": "& \"D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60\\app\\runtime\\node.exe\" -e \"const fs=require('node:fs');fs.mkdirSync('.qa/iphone-stop-8b55c635',{recursive:true});const p='.qa/iphone-stop-8b55c635/heartbeat.ndjson';fs.appendFileSync(p,JSON.stringify({pid:process.pid,kind:'start',at:Date.now()})+'\\n');setInterval(()=>fs.appendFileSync(p,JSON.stringify({pid:process.pid,kind:'beat',at:Date.now()})+'\\n'),250);setTimeout(()=>process.exit(0),55000);\"",
|
||||
"heartbeatFile": "D:\\AWQA16\\iphone-ca3891a9\\data\\projects\\starter-project\\.qa\\iphone-stop-8b55c635\\heartbeat.ndjson",
|
||||
"localFixtureUrl": "http://127.0.0.1:63356",
|
||||
"realModelRequests": 0,
|
||||
"state": "awaiting-user-mobile-approval-and-stop"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"at": "2026-10-31T10:47:10.378Z",
|
||||
"mode": "demo",
|
||||
"hasKey": false,
|
||||
"localFixtureClosed": true
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"at": "2026-10-31T10:47:10.316Z",
|
||||
"success": true,
|
||||
"source": "actual-user-mobile-control-and-original-runtime",
|
||||
"sessionId": "055fde92-9c2b-4e4d-be02-00d057c7a9b7",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c",
|
||||
"completedPhoneStopAudit": {
|
||||
"id": "94114a3f-66c5-4af0-9f37-c0d290ac3abb",
|
||||
"at": "2026-10-31T10:47:08.768Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "stop",
|
||||
"status": "completed",
|
||||
"requestId": "b3a2dcad-5305-4e42-8c73-88a9c874092e",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c"
|
||||
},
|
||||
"originalChild": {
|
||||
"pid": 14596,
|
||||
"parentPid": 25144,
|
||||
"createdAt": "2026-10-31T10:46:59.795Z",
|
||||
"executable": "D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60\\app\\runtime\\node.exe",
|
||||
"userSid": "S-1-5-21-3906741337-925321518-3767092861-1001"
|
||||
},
|
||||
"originalChildEnded": true,
|
||||
"heartbeatRowsObserved": 33,
|
||||
"heartbeatFile": "D:\\AWQA16\\iphone-ca3891a9\\data\\projects\\starter-project\\.qa\\iphone-stop-8b55c635\\heartbeat.ndjson",
|
||||
"stableAfterStopMs": 1200,
|
||||
"finalHeartbeatSha256": "db2085de55bb1dc9eaf1c8af5b3e972227d6b29f890108910a6aed9000a5485e",
|
||||
"commandInvocations": 1,
|
||||
"finalStatus": "paused",
|
||||
"localFixtureRequests": 1,
|
||||
"realModelRequests": 0,
|
||||
"note": "Reported token counts are synthetic local protocol fixture fields, not real model usage."
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"at": "2026-10-31T10:54:27.680Z",
|
||||
"sourceCommit": "2ecdfa2cedbc3dd28abaea2f32b22a203f785847",
|
||||
"records": [
|
||||
{
|
||||
"original": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\iphone-real-5d40a34d-b8fb-485f-b591-fcd8c4418cfa\\recovery-baseline.json",
|
||||
"archived": "docs/companion-f-iphone-recovery-evidence/recovery/recovery-baseline.json",
|
||||
"bytes": 880,
|
||||
"sha256": "0b571b47bc663000480d233462adf98b6e42458d32c65db4e087ca7d28bdc45a"
|
||||
},
|
||||
{
|
||||
"original": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\iphone-real-5d40a34d-b8fb-485f-b591-fcd8c4418cfa\\user-reported-and-server-verified-recovery.json",
|
||||
"archived": "docs/companion-f-iphone-recovery-evidence/recovery/user-reported-and-server-verified-recovery.json",
|
||||
"bytes": 1169,
|
||||
"sha256": "64547967bfbc8d05a29deeec5fc6493d7ebea1194a1ab58d561bfb3a9131d913"
|
||||
},
|
||||
{
|
||||
"original": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\iphone-real-5d40a34d-b8fb-485f-b591-fcd8c4418cfa\\device-revocation-server-result.json",
|
||||
"archived": "docs/companion-f-iphone-recovery-evidence/recovery/device-revocation-server-result.json",
|
||||
"bytes": 4087,
|
||||
"sha256": "fdd4c3d81ff49ff08412a1cc615dcdd50441c2e8fdc2fb9dc9a1e72227c50de0"
|
||||
},
|
||||
{
|
||||
"original": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\iphone-real-5d40a34d-b8fb-485f-b591-fcd8c4418cfa\\live-stop-00dad7b6\\ready.json",
|
||||
"archived": "docs/companion-f-iphone-recovery-evidence/live-stop/ready.json",
|
||||
"bytes": 1066,
|
||||
"sha256": "442343f4dd58f4baafac944c2897bc78f65dff25382e565d5e99820de6a9abd1"
|
||||
},
|
||||
{
|
||||
"original": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\iphone-real-5d40a34d-b8fb-485f-b591-fcd8c4418cfa\\live-stop-00dad7b6\\original-owned-child.json",
|
||||
"archived": "docs/companion-f-iphone-recovery-evidence/live-stop/original-owned-child.json",
|
||||
"bytes": 242,
|
||||
"sha256": "df96a68019028218b4508111258b59e7b51c8f54e1df62dfc32a867268954ab0"
|
||||
},
|
||||
{
|
||||
"original": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\iphone-real-5d40a34d-b8fb-485f-b591-fcd8c4418cfa\\live-stop-00dad7b6\\result.json",
|
||||
"archived": "docs/companion-f-iphone-recovery-evidence/live-stop/result.json",
|
||||
"bytes": 1525,
|
||||
"sha256": "28704eff79b8af5e84ea8bf86e5fcf24b507d60e5e784523980414201103a185"
|
||||
},
|
||||
{
|
||||
"original": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\iphone-real-5d40a34d-b8fb-485f-b591-fcd8c4418cfa\\live-stop-00dad7b6\\original-final-session.json",
|
||||
"archived": "docs/companion-f-iphone-recovery-evidence/live-stop/original-final-session.json",
|
||||
"bytes": 14329,
|
||||
"sha256": "963913394df17bed9765c6544788478ff9d4c0369f95ed0c06e17d186df97251"
|
||||
},
|
||||
{
|
||||
"original": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\iphone-real-5d40a34d-b8fb-485f-b591-fcd8c4418cfa\\live-stop-00dad7b6\\final-heartbeat.ndjson",
|
||||
"archived": "docs/companion-f-iphone-recovery-evidence/live-stop/final-heartbeat.ndjson",
|
||||
"bytes": 1599,
|
||||
"sha256": "db2085de55bb1dc9eaf1c8af5b3e972227d6b29f890108910a6aed9000a5485e"
|
||||
},
|
||||
{
|
||||
"original": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\iphone-real-5d40a34d-b8fb-485f-b591-fcd8c4418cfa\\live-stop-00dad7b6\\restored-demo-configuration.json",
|
||||
"archived": "docs/companion-f-iphone-recovery-evidence/live-stop/restored-demo-configuration.json",
|
||||
"bytes": 106,
|
||||
"sha256": "210b14dc8d4cba5d17b23c73ebfdc579553de5b45121907555680c81d4bcea58"
|
||||
},
|
||||
{
|
||||
"original": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\real-iphone-live-stop.mjs",
|
||||
"archived": "docs/companion-f-iphone-recovery-evidence/verify-live-stop.mjs",
|
||||
"bytes": 10083,
|
||||
"sha256": "8f157d4e415f35bcd7c2405c2320c4ee148e9f85d8b849e27c9f0480d1a8a933"
|
||||
},
|
||||
{
|
||||
"original": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\prepare-iphone-recovery-baseline.mjs",
|
||||
"archived": "docs/companion-f-iphone-recovery-evidence/prepare-recovery-baseline.mjs",
|
||||
"bytes": 2364,
|
||||
"sha256": "b0bf5f47684752c11001fb8c1751e2140f46ef532f4b40621b3526f3dde2a3ae"
|
||||
},
|
||||
{
|
||||
"original": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\verify-iphone-recovery.mjs",
|
||||
"archived": "docs/companion-f-iphone-recovery-evidence/verify-recovery.mjs",
|
||||
"bytes": 2494,
|
||||
"sha256": "1d6c7ee93abf33e099c4b68f7f0539b9065043ac3431d06711bff652ccedcc86"
|
||||
},
|
||||
{
|
||||
"original": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\revoke-real-iphone.mjs",
|
||||
"archived": "docs/companion-f-iphone-recovery-evidence/revoke-device.mjs",
|
||||
"bytes": 4165,
|
||||
"sha256": "41f4e667eaed115c4cb149ec18698aad031ba7397802bff3db3cda99133cc6b3"
|
||||
},
|
||||
{
|
||||
"original": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\real-iphone-live-stop.log",
|
||||
"archived": "docs/companion-f-iphone-recovery-evidence/live-stop.log",
|
||||
"bytes": 1076,
|
||||
"sha256": "a5d0d6d9f05779e77584ccac73f379a76e0290bf565baa7ec0d307d0e2d60da0"
|
||||
},
|
||||
{
|
||||
"original": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\seal-iphone-recovery.mjs",
|
||||
"archived": "docs/companion-f-iphone-recovery-evidence/seal-evidence.mjs",
|
||||
"bytes": 6987,
|
||||
"sha256": "f72e2e2cbcf3a609927ec3e82bf8d730ec5850ccffd528707dff079a494c27db"
|
||||
}
|
||||
],
|
||||
"byteCopies": 15,
|
||||
"generatedEvidence": [
|
||||
"user-confirmations.json",
|
||||
"final-public-state.json"
|
||||
],
|
||||
"actualDeviceAcceptance": "passed-user-reported-native-flows-with-original-host-audit-process-and-file-verification",
|
||||
"credentialsArchived": false,
|
||||
"realModelRequests": 0,
|
||||
"localSyntheticModelRequests": 1,
|
||||
"fullMilestoneComplete": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import assert from 'node:assert/strict';
|
||||
import { createHash } from 'node:crypto';
|
||||
const live = JSON.parse(fs.readFileSync('.qa/current-real-iphone-acceptance.json', 'utf8'));
|
||||
const runtime = JSON.parse(fs.readFileSync('.qa/current-iphone-runtime.json', 'utf8'));
|
||||
const base = runtime.desktopUrl.replace(/\/$/, '');
|
||||
const bootstrap = await (await fetch(base + '/api/bootstrap')).json();
|
||||
const headers = { 'X-Workbench-Token': bootstrap.token, Connection: 'close' };
|
||||
const session = await (await fetch(base + '/api/sessions/' + live.sessionId, { headers })).json();
|
||||
const gateway = await (await fetch(base + '/api/companion', { headers })).json();
|
||||
assert.equal(session.taskId, live.taskId); assert.equal(session.runId, live.runId);
|
||||
assert.equal(session.events.filter(value => value.tool === 'run_command' && value.phase === 'completed').length, 1);
|
||||
const original = JSON.parse(fs.readFileSync(path.join(live.directory, 'verified-approval-and-report.json'), 'utf8'));
|
||||
const report = session.execution.artifacts.find(value => value.id === original.serverObserved.report.id); assert.equal(report.sha256, original.serverObserved.report.sha256);
|
||||
const baseline = { at: new Date().toISOString(), userReported: { taskOpenedAfterRuntimeReplacement: true, diffSha256DisplayedAsVerified: true, reportSha256DisplayedAsVerified: true, iphoneConnectionNormal: true },
|
||||
taskId: session.taskId, runId: session.runId, sessionId: session.id, status: session.status, eventSeq: session.eventSeq,
|
||||
originalExecutionSha256: createHash('sha256').update(JSON.stringify({ events: session.events, messages: session.messages, changes: session.changes, approvals: session.approvals, taskId: session.taskId, runId: session.runId })).digest('hex'),
|
||||
originalReport: { id: report.id, sha256: report.sha256 }, completedCommands: 1,
|
||||
currentDeviceIds: gateway.devices.filter(value => value.status === 'active').map(value => value.id), pending: ['home-screen PWA', 'lock/unlock', 'Wi-Fi offline/reconnect'] };
|
||||
fs.writeFileSync(path.join(live.directory, 'recovery-baseline.json'), JSON.stringify(baseline, null, 2) + '\n', { flag: 'wx' });
|
||||
console.log(JSON.stringify({ success: true, taskId: session.taskId, runId: session.runId, completedCommands: 1, userConfirmedDiffAndReport: true, activeDevices: baseline.currentDeviceIds.length }));
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
{
|
||||
"at": "2026-10-31T10:49:28.768Z",
|
||||
"serverVerificationPassed": true,
|
||||
"userPhoneDisplay": "pending",
|
||||
"targetDevice": {
|
||||
"id": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"name": "iPhone",
|
||||
"originalRevision": 1,
|
||||
"revision": 2,
|
||||
"status": "revoked",
|
||||
"revokedAt": "2026-10-31T10:49:27.612Z"
|
||||
},
|
||||
"originalTask": {
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f",
|
||||
"originalExecutionSha256": "05e490c44c608b7a26134723d2ea817cf2904abf203dac6dfcc36adf84a5e589",
|
||||
"completedCommands": 1,
|
||||
"originalRecordsAndReportsUnchanged": true
|
||||
},
|
||||
"stoppedTask": {
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c",
|
||||
"status": "paused",
|
||||
"originalRecordsUnchanged": true,
|
||||
"heartbeatRemainsStable": true
|
||||
},
|
||||
"deviceAudit": [
|
||||
{
|
||||
"id": "d03e7557-3db0-4eb4-8d30-56173634bb85",
|
||||
"at": "2026-10-31T10:49:27.612Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "revoke",
|
||||
"status": "completed"
|
||||
},
|
||||
{
|
||||
"id": "94114a3f-66c5-4af0-9f37-c0d290ac3abb",
|
||||
"at": "2026-10-31T10:47:08.768Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "stop",
|
||||
"status": "completed",
|
||||
"requestId": "b3a2dcad-5305-4e42-8c73-88a9c874092e",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c"
|
||||
},
|
||||
{
|
||||
"id": "b3966aa4-5501-400c-b335-eefcd6d2f092",
|
||||
"at": "2026-10-31T10:47:08.129Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "stop",
|
||||
"status": "pending",
|
||||
"requestId": "b3a2dcad-5305-4e42-8c73-88a9c874092e",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c"
|
||||
},
|
||||
{
|
||||
"id": "8beeafd6-cac8-48e5-ba4e-36a39b0a663b",
|
||||
"at": "2026-10-31T10:46:59.512Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "approve",
|
||||
"status": "completed",
|
||||
"requestId": "f7b83943-8e38-4a36-82a1-8db6cd882b6c",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c"
|
||||
},
|
||||
{
|
||||
"id": "881d3c23-3fb7-4ffc-bac8-84c01c57dbc6",
|
||||
"at": "2026-10-31T10:46:59.410Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "approve",
|
||||
"status": "pending",
|
||||
"requestId": "f7b83943-8e38-4a36-82a1-8db6cd882b6c",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c"
|
||||
},
|
||||
{
|
||||
"id": "25c28b32-6cd0-4915-a512-0fdb2ea2ed38",
|
||||
"at": "2026-10-31T10:34:39.061Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "approve",
|
||||
"status": "completed",
|
||||
"requestId": "44f9227d-888a-455a-a3e3-8ad01967ba6b",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f"
|
||||
},
|
||||
{
|
||||
"id": "fb261e8e-08f3-421f-8637-5f25c7c4e859",
|
||||
"at": "2026-10-31T10:34:38.988Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "approve",
|
||||
"status": "pending",
|
||||
"requestId": "44f9227d-888a-455a-a3e3-8ad01967ba6b",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f"
|
||||
},
|
||||
{
|
||||
"id": "9a782de7-009a-46d1-8ed9-85b81aa5ade5",
|
||||
"at": "2026-10-31T10:26:14.079Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "pair",
|
||||
"status": "completed"
|
||||
}
|
||||
],
|
||||
"gatewayStillEnabled": true,
|
||||
"runtimeMode": "demo",
|
||||
"runtimeHasKey": false,
|
||||
"realModelRequests": 0
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"at": "2026-10-31T10:43:53.896Z",
|
||||
"userReported": {
|
||||
"taskOpenedAfterRuntimeReplacement": true,
|
||||
"diffSha256DisplayedAsVerified": true,
|
||||
"reportSha256DisplayedAsVerified": true,
|
||||
"iphoneConnectionNormal": true
|
||||
},
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f",
|
||||
"sessionId": "4df01501-cabc-4b52-b6f9-b140b3f7a1e1",
|
||||
"status": "completed",
|
||||
"eventSeq": 82,
|
||||
"originalExecutionSha256": "05e490c44c608b7a26134723d2ea817cf2904abf203dac6dfcc36adf84a5e589",
|
||||
"originalReport": {
|
||||
"id": "da8fb865-64f3-4bbe-a3fb-6740ded44b6a",
|
||||
"sha256": "b1823d616b131de0abd138dfc6a1a76af4d09091fcb64eb98efb0f604e8c0351"
|
||||
},
|
||||
"completedCommands": 1,
|
||||
"currentDeviceIds": [
|
||||
"eb23f12d-15c7-4ac3-b556-347e970a2384"
|
||||
],
|
||||
"pending": [
|
||||
"home-screen PWA",
|
||||
"lock/unlock",
|
||||
"Wi-Fi offline/reconnect"
|
||||
]
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"at": "2026-10-31T10:45:41.781Z",
|
||||
"success": true,
|
||||
"userReported": {
|
||||
"nativeIPhone": true,
|
||||
"sameTaskOpenedAfterCandidateRestart": true,
|
||||
"diffSHA256DisplayedAsVerified": true,
|
||||
"reportSHA256DisplayedAsVerified": true,
|
||||
"homeScreenPWAOpened": true,
|
||||
"lockUnlockRecovered": true,
|
||||
"wifiOfflineReconnectRecovered": true,
|
||||
"originalTaskAndReportStillAccessible": true,
|
||||
"modelAndIOS": "not-provided"
|
||||
},
|
||||
"serverObserved": {
|
||||
"sessionId": "4df01501-cabc-4b52-b6f9-b140b3f7a1e1",
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f",
|
||||
"completedCommands": 1,
|
||||
"originalExecutionSha256": "05e490c44c608b7a26134723d2ea817cf2904abf203dac6dfcc36adf84a5e589",
|
||||
"originalEventsMessagesChangesApprovalsUnchanged": true,
|
||||
"originalReport": {
|
||||
"id": "da8fb865-64f3-4bbe-a3fb-6740ded44b6a",
|
||||
"sha256": "b1823d616b131de0abd138dfc6a1a76af4d09091fcb64eb98efb0f604e8c0351"
|
||||
}
|
||||
},
|
||||
"realModelRequests": 0,
|
||||
"pending": [
|
||||
"live process stop from native phone",
|
||||
"device revocation observed on phone",
|
||||
"final complete independent release verification"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import assert from 'node:assert/strict';
|
||||
import { createHash } from 'node:crypto';
|
||||
const live = JSON.parse(fs.readFileSync('.qa/current-real-iphone-acceptance.json', 'utf8'));
|
||||
const runtime = JSON.parse(fs.readFileSync('.qa/current-iphone-runtime.json', 'utf8'));
|
||||
const stop = JSON.parse(fs.readFileSync('.qa/current-iphone-live-stop.json', 'utf8'));
|
||||
const baseline = JSON.parse(fs.readFileSync(path.join(live.directory, 'recovery-baseline.json'), 'utf8'));
|
||||
const base = runtime.desktopUrl.replace(/\/$/, ''), boot = await (await fetch(base + '/api/bootstrap')).json(); assert.equal(boot.config.mode, 'demo'); assert.equal(boot.config.hasKey, false);
|
||||
async function api(route, input) {
|
||||
const response = await fetch(base + '/api' + route, { method: input ? 'POST' : 'GET', headers: { 'X-Workbench-Token': boot.token, Connection: 'close', ...(input ? { 'Content-Type': 'application/json' } : {}) }, body: input ? JSON.stringify(input) : undefined, signal: AbortSignal.timeout(15000) });
|
||||
const value = await response.json(); assert.ok(response.ok, JSON.stringify({ status: response.status, error: value.error })); return value;
|
||||
}
|
||||
const gateway = await api('/companion');
|
||||
const stopAudit = gateway.audit.find(value => value.action === 'stop' && value.status === 'completed' && value.taskId === stop.taskId && value.runId === stop.runId); assert.ok(stopAudit);
|
||||
const device = gateway.devices.find(value => value.id === stopAudit.deviceId); assert.equal(device.status, 'active');
|
||||
const before = await api('/sessions/' + live.sessionId), stoppedBefore = await api('/sessions/' + stop.sessionId);
|
||||
assert.ok(['cancelled', 'interrupted', 'paused', 'failed'].includes(stoppedBefore.status));
|
||||
await api('/companion/devices/' + device.id + '/revoke', { revision: device.revision });
|
||||
const afterGateway = await api('/companion'); assert.equal(afterGateway.enabled, true);
|
||||
const revoked = afterGateway.devices.find(value => value.id === device.id); assert.equal(revoked.status, 'revoked'); assert.equal(revoked.revision, device.revision + 1);
|
||||
const after = await api('/sessions/' + live.sessionId), stoppedAfter = await api('/sessions/' + stop.sessionId);
|
||||
for (const field of ['taskId', 'runId', 'messages', 'events', 'changes', 'approvals', 'execution']) { assert.deepEqual(after[field], before[field]); assert.deepEqual(stoppedAfter[field], stoppedBefore[field]); }
|
||||
const digest = createHash('sha256').update(JSON.stringify({ events: after.events, messages: after.messages, changes: after.changes, approvals: after.approvals, taskId: after.taskId, runId: after.runId })).digest('hex'); assert.equal(digest, baseline.originalExecutionSha256);
|
||||
const fileBefore = fs.readFileSync(stop.heartbeatFile); await new Promise(resolve => setTimeout(resolve, 1100)); assert.deepEqual(fs.readFileSync(stop.heartbeatFile), fileBefore);
|
||||
const result = { at: new Date().toISOString(), serverVerificationPassed: true, userPhoneDisplay: 'pending', targetDevice: { id: device.id, name: device.name, originalRevision: device.revision, revision: revoked.revision, status: revoked.status, revokedAt: revoked.revokedAt },
|
||||
originalTask: { taskId: after.taskId, runId: after.runId, originalExecutionSha256: digest, completedCommands: after.events.filter(value => value.tool === 'run_command' && value.phase === 'completed').length, originalRecordsAndReportsUnchanged: true },
|
||||
stoppedTask: { taskId: stop.taskId, runId: stop.runId, status: stoppedAfter.status, originalRecordsUnchanged: true, heartbeatRemainsStable: true },
|
||||
deviceAudit: afterGateway.audit, gatewayStillEnabled: afterGateway.enabled, runtimeMode: boot.config.mode, runtimeHasKey: boot.config.hasKey, realModelRequests: 0 };
|
||||
fs.writeFileSync(path.join(live.directory, 'device-revocation-server-result.json'), JSON.stringify(result, null, 2) + '\n', { flag: 'wx' });
|
||||
console.log(JSON.stringify({ serverVerificationPassed: true, deviceStatus: revoked.status, originalTaskAndReportsUnchanged: true, stoppedTaskStatus: stoppedAfter.status, heartbeatRemainsStable: true, runtimeMode: boot.config.mode, hasKey: boot.config.hasKey, phoneDisplay: 'pending-user-confirmation' }));
|
||||
@@ -0,0 +1,42 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import assert from 'node:assert/strict';
|
||||
import { createHash } from 'node:crypto';
|
||||
const live = JSON.parse(fs.readFileSync('.qa/current-real-iphone-acceptance.json', 'utf8'));
|
||||
const runtime = JSON.parse(fs.readFileSync('.qa/current-iphone-runtime.json', 'utf8'));
|
||||
const stop = JSON.parse(fs.readFileSync('.qa/current-iphone-live-stop.json', 'utf8'));
|
||||
const recovery = JSON.parse(fs.readFileSync(path.join(live.directory, 'user-reported-and-server-verified-recovery.json'), 'utf8'));
|
||||
const stopped = JSON.parse(fs.readFileSync(path.join(stop.directory, 'result.json'), 'utf8'));
|
||||
const revoked = JSON.parse(fs.readFileSync(path.join(live.directory, 'device-revocation-server-result.json'), 'utf8'));
|
||||
assert.equal(recovery.success, true); assert.equal(stopped.success, true); assert.equal(revoked.serverVerificationPassed, true);
|
||||
const output = path.resolve('docs/companion-f-iphone-recovery-evidence'); assert.equal(fs.existsSync(output), false); fs.mkdirSync(output);
|
||||
const hash = bytes => createHash('sha256').update(bytes).digest('hex'), records = [];
|
||||
function copy(original, relative) { const bytes = fs.readFileSync(original), file = path.join(output, relative); assert.ok(file.startsWith(output + path.sep)); fs.mkdirSync(path.dirname(file), { recursive: true }); fs.writeFileSync(file, bytes, { flag: 'wx' }); assert.equal(hash(fs.readFileSync(file)), hash(bytes)); records.push({ original: path.resolve(original), archived: path.relative(process.cwd(), file).replaceAll('\\', '/'), bytes: bytes.length, sha256: hash(bytes) }); }
|
||||
for (const file of ['recovery-baseline.json', 'user-reported-and-server-verified-recovery.json', 'device-revocation-server-result.json']) copy(path.join(live.directory, file), 'recovery/' + file);
|
||||
for (const file of ['ready.json', 'original-owned-child.json', 'result.json', 'original-final-session.json', 'final-heartbeat.ndjson', 'restored-demo-configuration.json']) copy(path.join(stop.directory, file), 'live-stop/' + file);
|
||||
for (const [file, target] of [['.qa/real-iphone-live-stop.mjs', 'verify-live-stop.mjs'], ['.qa/prepare-iphone-recovery-baseline.mjs', 'prepare-recovery-baseline.mjs'], ['.qa/verify-iphone-recovery.mjs', 'verify-recovery.mjs'], ['.qa/revoke-real-iphone.mjs', 'revoke-device.mjs'], ['.qa/real-iphone-live-stop.log', 'live-stop.log'], ['.qa/seal-iphone-recovery.mjs', 'seal-evidence.mjs']]) copy(file, target);
|
||||
const user = { recordedAt: new Date().toISOString(), source: 'explicit-user-text-replies-in-current-chat', device: { model: 'iPhone 14 Pro Max', osVersion: 'iOS 27.2', independentlyScreenVerified: false },
|
||||
confirmations: ['certificate fully trusted', 'entered actual task and approved original command', 'after candidate restart diff and report both show SHA-256 verified and connection normal', 'home-screen, lock/unlock and Wi-Fi offline/reconnect normal', 'approved and stopped dedicated live process', 'after device revocation project content cleared and connection required'], phoneScreenshotsProvided: false };
|
||||
fs.writeFileSync(path.join(output, 'user-confirmations.json'), JSON.stringify(user, null, 2) + '\n', { flag: 'wx' });
|
||||
const base = runtime.desktopUrl.replace(/\/$/, ''), boot = await (await fetch(base + '/api/bootstrap')).json(); assert.equal(boot.config.mode, 'demo'); assert.equal(boot.config.hasKey, false);
|
||||
const headers = { 'X-Workbench-Token': boot.token, Connection: 'close' };
|
||||
const gateway = await (await fetch(base + '/api/companion', { headers })).json(); assert.equal(gateway.devices.find(value => value.id === revoked.targetDevice.id).status, 'revoked');
|
||||
const session = await (await fetch(base + '/api/sessions/' + live.sessionId, { headers })).json(); assert.equal(session.taskId, live.taskId); assert.equal(session.runId, live.runId);
|
||||
assert.equal(session.events.filter(value => value.tool === 'run_command' && value.phase === 'completed').length, 1);
|
||||
const formal = await (await fetch('http://127.0.0.1:4318/api/health')).json(); assert.equal(formal.pid, runtime.formalService.pid); assert.equal(formal.version, '1.15.0');
|
||||
const publicFinal = { at: new Date().toISOString(), candidatePid: runtime.pid, candidateVersion: boot.version, mode: boot.config.mode, hasKey: boot.config.hasKey, gateway,
|
||||
originalTask: { sessionId: session.id, taskId: session.taskId, runId: session.runId, completedCommands: 1, checks: session.execution.checks.map(value => ({ id: value.id, status: value.status })) },
|
||||
formalService: { pid: formal.pid, version: formal.version } };
|
||||
fs.writeFileSync(path.join(output, 'final-public-state.json'), JSON.stringify(publicFinal, null, 2) + '\n', { flag: 'wx' });
|
||||
const manifest = { schema: 1, at: new Date().toISOString(), sourceCommit: runtime.sourceCommit, records, byteCopies: records.length,
|
||||
generatedEvidence: ['user-confirmations.json', 'final-public-state.json'], actualDeviceAcceptance: 'passed-user-reported-native-flows-with-original-host-audit-process-and-file-verification',
|
||||
credentialsArchived: false, realModelRequests: 0, localSyntheticModelRequests: stopped.localFixtureRequests, fullMilestoneComplete: false };
|
||||
fs.writeFileSync(path.join(output, 'manifest.json'), JSON.stringify(manifest, null, 2) + '\n', { flag: 'wx' });
|
||||
const summaryFile = 'docs/mobile-companion-real-iphone-validation.json', summary = JSON.parse(fs.readFileSync(summaryFile, 'utf8'));
|
||||
summary.status = 'actual-iphone-core-acceptance-passed'; summary.at = new Date().toISOString(); summary.device = user.device;
|
||||
summary.userReported = { ...summary.userReported, diffAndReportDigestVerified: true, normalAfterCandidateRestart: true, homeScreenPWANormal: true, lockUnlockNormal: true, wifiOfflineReconnectNormal: true, liveTaskApprovedAndStopped: true, revokedProjectContentCleared: true, modelAndIOS: 'iPhone 14 Pro Max / iOS 27.2 (user-provided)' };
|
||||
summary.observed.recovery = recovery.serverObserved; summary.observed.liveStop = { ...stopped, heartbeatFile: undefined }; summary.observed.revocation = revoked;
|
||||
summary.actualDevicePending = []; summary.pendingReleaseGates = ['complete immutable source/portable/installer creation', 'independent extracted-source build and full tests/actual contained app', 'contained portable and same-payload installation verification', 'state-preserving formal upgrade and post-upgrade validation'];
|
||||
summary.recoveryEvidence = 'companion-f-iphone-recovery-evidence/manifest.json'; summary.localSyntheticModelRequests = stopped.localFixtureRequests; summary.fullMilestoneComplete = false;
|
||||
fs.writeFileSync(summaryFile, JSON.stringify(summary, null, 2) + '\n');
|
||||
console.log(JSON.stringify({ success: true, device: user.device, byteCopies: records.length, nativeCoreAcceptance: 'passed', sourceUnchanged: true, stoppedProcess: stopped.originalChild.pid, heartbeatRows: stopped.heartbeatRowsObserved, restoredMode: boot.config.mode, hasKey: boot.config.hasKey, revokedDevice: revoked.targetDevice.status, formalService: summary.formalService, fullMilestoneComplete: false }));
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"recordedAt": "2026-10-31T10:54:27.650Z",
|
||||
"source": "explicit-user-text-replies-in-current-chat",
|
||||
"device": {
|
||||
"model": "iPhone 14 Pro Max",
|
||||
"osVersion": "iOS 27.2",
|
||||
"independentlyScreenVerified": false
|
||||
},
|
||||
"confirmations": [
|
||||
"certificate fully trusted",
|
||||
"entered actual task and approved original command",
|
||||
"after candidate restart diff and report both show SHA-256 verified and connection normal",
|
||||
"home-screen, lock/unlock and Wi-Fi offline/reconnect normal",
|
||||
"approved and stopped dedicated live process",
|
||||
"after device revocation project content cleared and connection required"
|
||||
],
|
||||
"phoneScreenshotsProvided": false
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import http from 'node:http';
|
||||
import assert from 'node:assert/strict';
|
||||
import { randomUUID, createHash } from 'node:crypto';
|
||||
import { observeWindowsProcess } from '../src/core/desktop/process-identity.mjs';
|
||||
|
||||
const runtime = JSON.parse(fs.readFileSync('.qa/current-iphone-runtime.json', 'utf8'));
|
||||
const live = JSON.parse(fs.readFileSync('.qa/current-real-iphone-acceptance.json', 'utf8'));
|
||||
const directory = path.join(live.directory, 'live-stop-' + randomUUID().slice(0, 8)); fs.mkdirSync(directory);
|
||||
const base = runtime.desktopUrl.replace(/\/$/, ''), initial = await (await fetch(base + '/api/bootstrap')).json();
|
||||
assert.equal(initial.config.mode, 'demo'); assert.equal(initial.config.hasKey, false);
|
||||
const health = await (await fetch(base + '/api/health')).json(); assert.equal(health.pid, runtime.pid);
|
||||
async function api(route, input) {
|
||||
const response = await fetch(base + '/api' + route, { method: input ? 'POST' : 'GET', headers: { 'X-Workbench-Token': initial.token, Connection: 'close', ...(input ? { 'Content-Type': 'application/json' } : {}) }, body: input ? JSON.stringify(input) : undefined, signal: AbortSignal.timeout(90000) });
|
||||
const value = await response.json(); assert.ok(response.ok, JSON.stringify({ status: response.status, error: value.error })); return value;
|
||||
}
|
||||
const original = await api('/sessions/' + live.sessionId);
|
||||
const project = initial.projects.find(value => value.id === original.projectId); assert.ok(path.resolve(project.root).startsWith(path.resolve(runtime.dataRoot) + path.sep));
|
||||
const stem = 'iphone-stop-' + randomUUID().slice(0, 8), relative = '.qa/' + stem + '/heartbeat.ndjson', file = path.join(project.root, relative);
|
||||
assert.equal(fs.existsSync(file), false);
|
||||
const source = "const fs=require('node:fs');fs.mkdirSync('.qa/" + stem + "',{recursive:true});const p='" + relative + "';fs.appendFileSync(p,JSON.stringify({pid:process.pid,kind:'start',at:Date.now()})+'\\n');setInterval(()=>fs.appendFileSync(p,JSON.stringify({pid:process.pid,kind:'beat',at:Date.now()})+'\\n'),250);setTimeout(()=>process.exit(0),55000);";
|
||||
assert.ok(!source.includes('"') && !source.includes('$') && !source.includes('`'));
|
||||
const command = '& "' + runtime.nodePath + '" -e "' + source + '"';
|
||||
let count = 0, configured = false, sessionId = null, finished = false, failure = null, observedProcess = null;
|
||||
const fixture = http.createServer(async (request, response) => {
|
||||
try {
|
||||
assert.equal(request.method, 'POST'); assert.equal(request.url, '/v1/chat/completions');
|
||||
const chunks = []; let length = 0; for await (const chunk of request) { length += chunk.length; assert.ok(length < 2 * 1024 * 1024); chunks.push(chunk); }
|
||||
const input = JSON.parse(Buffer.concat(chunks).toString('utf8')); count++;
|
||||
const alreadyCalled = input.messages.some(value => value.role === 'tool');
|
||||
const message = alreadyCalled ? { role: 'assistant', content: '本地停止夹具已结束;最终结果以原进程和手机停止审计为准,没有调用真实大模型。' }
|
||||
: { role: 'assistant', content: '这是手机实机停止验收的本地协议夹具。批准后仅在示例项目 .qa 中每250ms写一行心跳,请从手机停止原任务。',
|
||||
tool_calls: [{ id: 'phone_stop_' + stem, type: 'function', function: { name: 'run_command', arguments: JSON.stringify({ command, reason: '本地 iPhone 停止验收:只在示例项目 .qa 写心跳,55秒自动结束;由手机批准并停止,不连接真实模型。' }) } }] };
|
||||
response.writeHead(200, { 'Content-Type': 'application/json' }); response.end(JSON.stringify({ choices: [{ message, finish_reason: alreadyCalled ? 'stop' : 'tool_calls' }], usage: { prompt_tokens: 1, completion_tokens: 1, total_tokens: 2 } }));
|
||||
} catch (cause) { response.writeHead(500, { 'Content-Type': 'application/json' }); response.end(JSON.stringify({ error: { message: cause.message } })); }
|
||||
});
|
||||
try {
|
||||
await new Promise(resolve => fixture.listen(0, '127.0.0.1', resolve));
|
||||
await api('/config', { ...initial.config, mode: 'compatible', baseUrl: 'http://127.0.0.1:' + fixture.address().port + '/v1', model: 'owned-iphone-stop-fixture', apiKey: 'owned-loopback-only-not-a-real-model-key' }); configured = true;
|
||||
const created = await api('/sessions', { projectId: project.id }); sessionId = created.id;
|
||||
await api('/sessions/' + sessionId + '/messages', { content: 'iPhone 实机停止验收:本地协议夹具,不调用真实大模型。批准仅在示例项目 .qa 中写入心跳的命令,看到执行中后等2秒,在手机点停止原任务。' });
|
||||
let session; const approvalDeadline = Date.now() + 15000;
|
||||
do { session = await api('/sessions/' + sessionId); if (session.status === 'awaiting_approval') break; await new Promise(resolve => setTimeout(resolve, 100)); } while (Date.now() < approvalDeadline);
|
||||
assert.equal(session.status, 'awaiting_approval'); const pending = session.approvals.filter(value => value.status === 'pending'); assert.equal(pending.length, 1); assert.equal(pending[0].command, command);
|
||||
const ready = { at: new Date().toISOString(), directory, sessionId, taskId: session.taskId, runId: session.runId, command, heartbeatFile: file, localFixtureUrl: 'http://127.0.0.1:' + fixture.address().port, realModelRequests: 0, state: 'awaiting-user-mobile-approval-and-stop' };
|
||||
fs.writeFileSync(path.join(directory, 'ready.json'), JSON.stringify(ready, null, 2) + '\n', { flag: 'wx' });
|
||||
fs.writeFileSync('.qa/current-iphone-live-stop.json', JSON.stringify(ready, null, 2) + '\n');
|
||||
console.log(JSON.stringify({ state: ready.state, sessionId, taskId: session.taskId, runId: session.runId, title: session.title, directory }));
|
||||
const deadline = Date.now() + 180000; let stoppedByPhone = null, beatsSeen = 0, lastNotice = Date.now();
|
||||
while (Date.now() < deadline) {
|
||||
session = await api('/sessions/' + sessionId);
|
||||
if (fs.existsSync(file)) {
|
||||
const lines = fs.readFileSync(file, 'utf8').trim().split('\n').map(line => JSON.parse(line)); beatsSeen = Math.max(beatsSeen, lines.filter(value => value.kind === 'beat').length);
|
||||
if (!observedProcess) { observedProcess = observeWindowsProcess(lines[0].pid); assert.ok(observedProcess); assert.equal(observedProcess.executable.toLowerCase(), runtime.nodePath.toLowerCase()); fs.writeFileSync(path.join(directory, 'original-owned-child.json'), JSON.stringify(observedProcess, null, 2) + '\n', { flag: 'wx' }); console.log(JSON.stringify({ state: 'owned-heartbeat-process-running', childPid: observedProcess.pid, heartbeatRows: lines.length })); }
|
||||
}
|
||||
const gateway = await api('/companion');
|
||||
stoppedByPhone = gateway.audit.find(value => value.action === 'stop' && value.status === 'completed' && value.taskId === ready.taskId && value.runId === ready.runId);
|
||||
if (stoppedByPhone) break;
|
||||
if (!['running', 'awaiting_approval', 'stopping'].includes(session.status)) throw new Error('Stop fixture ended without a completed phone stop: ' + session.status);
|
||||
if (Date.now() - lastNotice > 20000) { console.log(JSON.stringify({ state: session.status, heartbeatRows: beatsSeen, awaitingPhoneStop: true })); lastNotice = Date.now(); }
|
||||
await new Promise(resolve => setTimeout(resolve, 250));
|
||||
}
|
||||
assert.ok(stoppedByPhone, 'Actual phone stop must be recorded.'); assert.ok(observedProcess && beatsSeen >= 2, 'Stop must target an already running process.');
|
||||
assert.ok(!['running', 'awaiting_approval', 'stopping'].includes(session.status));
|
||||
const after = observeWindowsProcess(observedProcess.pid); assert.ok(!after || after.createdAt !== observedProcess.createdAt, 'Original process must be ended.');
|
||||
const bytes = fs.readFileSync(file); await new Promise(resolve => setTimeout(resolve, 1200)); assert.deepEqual(fs.readFileSync(file), bytes, 'Heartbeats cannot continue after stop.');
|
||||
assert.equal(session.events.filter(value => value.tool === 'run_command').length, 1);
|
||||
const result = { at: new Date().toISOString(), success: true, source: 'actual-user-mobile-control-and-original-runtime', sessionId, taskId: ready.taskId, runId: ready.runId,
|
||||
completedPhoneStopAudit: stoppedByPhone, originalChild: observedProcess, originalChildEnded: true, heartbeatRowsObserved: beatsSeen, heartbeatFile: file, stableAfterStopMs: 1200,
|
||||
finalHeartbeatSha256: createHash('sha256').update(bytes).digest('hex'), commandInvocations: 1, finalStatus: session.status,
|
||||
localFixtureRequests: count, realModelRequests: 0, note: 'Reported token counts are synthetic local protocol fixture fields, not real model usage.' };
|
||||
fs.writeFileSync(path.join(directory, 'original-final-session.json'), JSON.stringify(session, null, 2) + '\n', { flag: 'wx' });
|
||||
fs.writeFileSync(path.join(directory, 'result.json'), JSON.stringify(result, null, 2) + '\n', { flag: 'wx' });
|
||||
fs.copyFileSync(file, path.join(directory, 'final-heartbeat.ndjson'), fs.constants.COPYFILE_EXCL); finished = true;
|
||||
console.log(JSON.stringify({ success: true, originalChildEnded: true, heartbeatRowsObserved: beatsSeen, stableAfterStopMs: 1200, commandInvocations: 1, localFixtureRequests: count, realModelRequests: 0, directory }));
|
||||
} catch (cause) { failure = cause; fs.writeFileSync(path.join(directory, 'failure.json'), JSON.stringify({ at: new Date().toISOString(), success: false, error: cause.message, sessionId, localFixtureRequests: count, realModelRequests: 0 }, null, 2) + '\n', { flag: 'wx' }); }
|
||||
finally {
|
||||
if (sessionId && !finished) { await api('/sessions/' + sessionId + '/stop', {}).catch(() => {}); }
|
||||
if (configured) {
|
||||
const restored = await api('/config', { ...initial.config, apiKey: '' }); assert.equal(restored.mode, 'demo'); assert.equal(restored.hasKey, false);
|
||||
fs.writeFileSync(path.join(directory, 'restored-demo-configuration.json'), JSON.stringify({ at: new Date().toISOString(), mode: restored.mode, hasKey: restored.hasKey, localFixtureClosed: true }, null, 2) + '\n', { flag: 'wx' });
|
||||
}
|
||||
fixture.closeAllConnections(); await new Promise(resolve => fixture.close(resolve));
|
||||
}
|
||||
if (failure) throw failure;
|
||||
@@ -0,0 +1,22 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import assert from 'node:assert/strict';
|
||||
import { createHash } from 'node:crypto';
|
||||
const live = JSON.parse(fs.readFileSync('.qa/current-real-iphone-acceptance.json', 'utf8'));
|
||||
const runtime = JSON.parse(fs.readFileSync('.qa/current-iphone-runtime.json', 'utf8'));
|
||||
const baseline = JSON.parse(fs.readFileSync(path.join(live.directory, 'recovery-baseline.json'), 'utf8'));
|
||||
const base = runtime.desktopUrl.replace(/\/$/, '');
|
||||
const boot = await (await fetch(base + '/api/bootstrap')).json(), headers = { 'X-Workbench-Token': boot.token, Connection: 'close' };
|
||||
const session = await (await fetch(base + '/api/sessions/' + live.sessionId, { headers })).json();
|
||||
assert.equal(session.taskId, baseline.taskId); assert.equal(session.runId, baseline.runId);
|
||||
const hash = createHash('sha256').update(JSON.stringify({ events: session.events, messages: session.messages, changes: session.changes, approvals: session.approvals, taskId: session.taskId, runId: session.runId })).digest('hex');
|
||||
assert.equal(hash, baseline.originalExecutionSha256);
|
||||
assert.equal(session.events.filter(value => value.tool === 'run_command' && value.phase === 'completed').length, 1);
|
||||
const report = session.execution.artifacts.find(value => value.id === baseline.originalReport.id); assert.equal(report.sha256, baseline.originalReport.sha256);
|
||||
const result = { at: new Date().toISOString(), success: true,
|
||||
userReported: { nativeIPhone: true, sameTaskOpenedAfterCandidateRestart: true, diffSHA256DisplayedAsVerified: true, reportSHA256DisplayedAsVerified: true,
|
||||
homeScreenPWAOpened: true, lockUnlockRecovered: true, wifiOfflineReconnectRecovered: true, originalTaskAndReportStillAccessible: true, modelAndIOS: 'not-provided' },
|
||||
serverObserved: { sessionId: session.id, taskId: session.taskId, runId: session.runId, completedCommands: 1, originalExecutionSha256: hash, originalEventsMessagesChangesApprovalsUnchanged: true, originalReport: baseline.originalReport },
|
||||
realModelRequests: 0, pending: ['live process stop from native phone', 'device revocation observed on phone', 'final complete independent release verification'] };
|
||||
fs.writeFileSync(path.join(live.directory, 'user-reported-and-server-verified-recovery.json'), JSON.stringify(result, null, 2) + '\n', { flag: 'wx' });
|
||||
console.log(JSON.stringify({ success: true, taskId: session.taskId, runId: session.runId, originalRecordsUnchanged: true, completedCommands: 1, nativeSteps: result.userReported }));
|
||||
@@ -0,0 +1,261 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"at": "2026-10-31T10:54:27.681Z",
|
||||
"status": "actual-iphone-core-acceptance-passed",
|
||||
"candidateVersion": "1.16.0",
|
||||
"sourceCommit": "2ecdfa2cedbc3dd28abaea2f32b22a203f785847",
|
||||
"sourceCodeChanged": false,
|
||||
"candidate": {
|
||||
"pid": 48024,
|
||||
"originalPid": 33324,
|
||||
"appRoot": "D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60\\app",
|
||||
"dataRoot": "D:\\AWQA16\\iphone-ca3891a9\\data",
|
||||
"desktopUrl": "http://127.0.0.1:4320/",
|
||||
"mobileOrigin": "https://192.168.66.91:4321",
|
||||
"files": 1958,
|
||||
"npmVersion": "11.19.1",
|
||||
"original32FilesUnchanged": true
|
||||
},
|
||||
"userReported": {
|
||||
"iphoneCertificateTrusted": true,
|
||||
"enteredTaskAndApproved": true,
|
||||
"modelAndIOS": "iPhone 14 Pro Max / iOS 27.2 (user-provided)",
|
||||
"diffAndReportDigestVerified": true,
|
||||
"normalAfterCandidateRestart": true,
|
||||
"homeScreenPWANormal": true,
|
||||
"lockUnlockNormal": true,
|
||||
"wifiOfflineReconnectNormal": true,
|
||||
"liveTaskApprovedAndStopped": true,
|
||||
"revokedProjectContentCleared": true
|
||||
},
|
||||
"observed": {
|
||||
"originalPairing": [
|
||||
{
|
||||
"id": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"name": "iPhone",
|
||||
"status": "active"
|
||||
}
|
||||
],
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f",
|
||||
"commandCompletedCount": 1,
|
||||
"commandOutput": "v24.22.1",
|
||||
"commandExitCode": 0,
|
||||
"completedDeviceApproval": {
|
||||
"id": "25c28b32-6cd0-4915-a512-0fdb2ea2ed38",
|
||||
"at": "2026-10-31T10:34:39.061Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "approve",
|
||||
"status": "completed",
|
||||
"requestId": "44f9227d-888a-455a-a3e3-8ad01967ba6b",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f"
|
||||
},
|
||||
"passedTests": {
|
||||
"total": 4,
|
||||
"passed": 4,
|
||||
"failed": 0,
|
||||
"cancelled": 0,
|
||||
"skipped": 0
|
||||
},
|
||||
"originalCheckFailureRetained": {
|
||||
"id": "6b07ed59-fc16-4361-a8b4-b8e63228bf8f",
|
||||
"reason": "isolated candidate omitted npm; no tests ran",
|
||||
"retainedUnchanged": true
|
||||
},
|
||||
"report": {
|
||||
"id": "da8fb865-64f3-4bbe-a3fb-6740ded44b6a",
|
||||
"kind": "delivery-report-markdown",
|
||||
"sha256": "b1823d616b131de0abd138dfc6a1a76af4d09091fcb64eb98efb0f604e8c0351",
|
||||
"bytes": 2818
|
||||
},
|
||||
"certificateSha256": "908958fe819dae8ec1527ec0dc352e0282b375d88c370bd2435574edb4e61bd7",
|
||||
"replacement": {
|
||||
"originalSessionEvidenceUnchanged": true,
|
||||
"devicesAndAuditUnchanged": true,
|
||||
"sameOriginalDataRoot": true
|
||||
},
|
||||
"recovery": {
|
||||
"sessionId": "4df01501-cabc-4b52-b6f9-b140b3f7a1e1",
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f",
|
||||
"completedCommands": 1,
|
||||
"originalExecutionSha256": "05e490c44c608b7a26134723d2ea817cf2904abf203dac6dfcc36adf84a5e589",
|
||||
"originalEventsMessagesChangesApprovalsUnchanged": true,
|
||||
"originalReport": {
|
||||
"id": "da8fb865-64f3-4bbe-a3fb-6740ded44b6a",
|
||||
"sha256": "b1823d616b131de0abd138dfc6a1a76af4d09091fcb64eb98efb0f604e8c0351"
|
||||
}
|
||||
},
|
||||
"liveStop": {
|
||||
"at": "2026-10-31T10:47:10.316Z",
|
||||
"success": true,
|
||||
"source": "actual-user-mobile-control-and-original-runtime",
|
||||
"sessionId": "055fde92-9c2b-4e4d-be02-00d057c7a9b7",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c",
|
||||
"completedPhoneStopAudit": {
|
||||
"id": "94114a3f-66c5-4af0-9f37-c0d290ac3abb",
|
||||
"at": "2026-10-31T10:47:08.768Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "stop",
|
||||
"status": "completed",
|
||||
"requestId": "b3a2dcad-5305-4e42-8c73-88a9c874092e",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c"
|
||||
},
|
||||
"originalChild": {
|
||||
"pid": 14596,
|
||||
"parentPid": 25144,
|
||||
"createdAt": "2026-10-31T10:46:59.795Z",
|
||||
"executable": "D:\\AWQA16\\iphone-ca3891a9\\runtime-repair-e4844a60\\app\\runtime\\node.exe",
|
||||
"userSid": "S-1-5-21-3906741337-925321518-3767092861-1001"
|
||||
},
|
||||
"originalChildEnded": true,
|
||||
"heartbeatRowsObserved": 33,
|
||||
"stableAfterStopMs": 1200,
|
||||
"finalHeartbeatSha256": "db2085de55bb1dc9eaf1c8af5b3e972227d6b29f890108910a6aed9000a5485e",
|
||||
"commandInvocations": 1,
|
||||
"finalStatus": "paused",
|
||||
"localFixtureRequests": 1,
|
||||
"realModelRequests": 0,
|
||||
"note": "Reported token counts are synthetic local protocol fixture fields, not real model usage."
|
||||
},
|
||||
"revocation": {
|
||||
"at": "2026-10-31T10:49:28.768Z",
|
||||
"serverVerificationPassed": true,
|
||||
"userPhoneDisplay": "pending",
|
||||
"targetDevice": {
|
||||
"id": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"name": "iPhone",
|
||||
"originalRevision": 1,
|
||||
"revision": 2,
|
||||
"status": "revoked",
|
||||
"revokedAt": "2026-10-31T10:49:27.612Z"
|
||||
},
|
||||
"originalTask": {
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f",
|
||||
"originalExecutionSha256": "05e490c44c608b7a26134723d2ea817cf2904abf203dac6dfcc36adf84a5e589",
|
||||
"completedCommands": 1,
|
||||
"originalRecordsAndReportsUnchanged": true
|
||||
},
|
||||
"stoppedTask": {
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c",
|
||||
"status": "paused",
|
||||
"originalRecordsUnchanged": true,
|
||||
"heartbeatRemainsStable": true
|
||||
},
|
||||
"deviceAudit": [
|
||||
{
|
||||
"id": "d03e7557-3db0-4eb4-8d30-56173634bb85",
|
||||
"at": "2026-10-31T10:49:27.612Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "revoke",
|
||||
"status": "completed"
|
||||
},
|
||||
{
|
||||
"id": "94114a3f-66c5-4af0-9f37-c0d290ac3abb",
|
||||
"at": "2026-10-31T10:47:08.768Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "stop",
|
||||
"status": "completed",
|
||||
"requestId": "b3a2dcad-5305-4e42-8c73-88a9c874092e",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c"
|
||||
},
|
||||
{
|
||||
"id": "b3966aa4-5501-400c-b335-eefcd6d2f092",
|
||||
"at": "2026-10-31T10:47:08.129Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "stop",
|
||||
"status": "pending",
|
||||
"requestId": "b3a2dcad-5305-4e42-8c73-88a9c874092e",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c"
|
||||
},
|
||||
{
|
||||
"id": "8beeafd6-cac8-48e5-ba4e-36a39b0a663b",
|
||||
"at": "2026-10-31T10:46:59.512Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "approve",
|
||||
"status": "completed",
|
||||
"requestId": "f7b83943-8e38-4a36-82a1-8db6cd882b6c",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c"
|
||||
},
|
||||
{
|
||||
"id": "881d3c23-3fb7-4ffc-bac8-84c01c57dbc6",
|
||||
"at": "2026-10-31T10:46:59.410Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "approve",
|
||||
"status": "pending",
|
||||
"requestId": "f7b83943-8e38-4a36-82a1-8db6cd882b6c",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "1754088e-ffea-4b86-8cc6-a13b1412d975",
|
||||
"runId": "538a15bc-3fb2-4f20-b5ff-6e55eb1eaa1c"
|
||||
},
|
||||
{
|
||||
"id": "25c28b32-6cd0-4915-a512-0fdb2ea2ed38",
|
||||
"at": "2026-10-31T10:34:39.061Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "approve",
|
||||
"status": "completed",
|
||||
"requestId": "44f9227d-888a-455a-a3e3-8ad01967ba6b",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f"
|
||||
},
|
||||
{
|
||||
"id": "fb261e8e-08f3-421f-8637-5f25c7c4e859",
|
||||
"at": "2026-10-31T10:34:38.988Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "approve",
|
||||
"status": "pending",
|
||||
"requestId": "44f9227d-888a-455a-a3e3-8ad01967ba6b",
|
||||
"projectId": "57a950af-49bd-4e54-9e37-c95f3d59002d",
|
||||
"taskId": "b8b756c5-27bd-413e-821c-a19f2e7c009c",
|
||||
"runId": "37a84e03-cb83-44bc-8353-b8333723ca9f"
|
||||
},
|
||||
{
|
||||
"id": "9a782de7-009a-46d1-8ed9-85b81aa5ade5",
|
||||
"at": "2026-10-31T10:26:14.079Z",
|
||||
"deviceId": "eb23f12d-15c7-4ac3-b556-347e970a2384",
|
||||
"action": "pair",
|
||||
"status": "completed"
|
||||
}
|
||||
],
|
||||
"gatewayStillEnabled": true,
|
||||
"runtimeMode": "demo",
|
||||
"runtimeHasKey": false,
|
||||
"realModelRequests": 0
|
||||
}
|
||||
},
|
||||
"actualDevicePending": [],
|
||||
"realModelRequests": 0,
|
||||
"formalService": {
|
||||
"pid": 36552,
|
||||
"version": "1.15.0"
|
||||
},
|
||||
"evidence": "companion-f-iphone-evidence/manifest.json",
|
||||
"fullMilestoneComplete": false,
|
||||
"device": {
|
||||
"model": "iPhone 14 Pro Max",
|
||||
"osVersion": "iOS 27.2",
|
||||
"independentlyScreenVerified": false
|
||||
},
|
||||
"pendingReleaseGates": [
|
||||
"complete immutable source/portable/installer creation",
|
||||
"independent extracted-source build and full tests/actual contained app",
|
||||
"contained portable and same-payload installation verification",
|
||||
"state-preserving formal upgrade and post-upgrade validation"
|
||||
],
|
||||
"recoveryEvidence": "companion-f-iphone-recovery-evidence/manifest.json",
|
||||
"localSyntheticModelRequests": 1
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
# 汇总发现
|
||||
|
||||
- 1.16真实iPhone核心验收已通过,用户提供设备iPhone 14 Pro Max/iOS 27.2;手机原生步骤由用户确认,宿主审计/原进程/原文件单独验证,无手机截图。QA最小候选漏npm使工程检查正确失败;完整发行器原已带npm,修正QA候选后4/4通过且全部状态保持。只看TLS或界面就绪不足以证明工程运行环境完整。当前实机设备已撤销,旧cookie不能复用;正式数据目录不应迁入QA私钥或设备cookie。独立源码QA inputNames仍漏根mobile.html,发行前应补输入覆盖和随包手机专项。
|
||||
|
||||
- 1.16独立手机候选来源2ecdfa2,32文件与313源码输入已冻结、完整SHA核对后运行。Windows执行宿主与iPhone Safari/PWA无需Mac;原生iOS打包分发才需Apple构建环境。当前实际连接网卡是以太网192.168.66.91/24、网关192.168.66.1;WLAN 3虽保留192.168.50.100地址,但无网关且不是Connected,不能只见IP就选它。独立4320/4321候选实际TLS与未配对401通过;真实手机路由、系统信任、Secure cookie和主屏幕仍待实机,不以本机CA指定信任代替。
|
||||
|
||||
- 1.15 F只读复现安装位置回归:appDirectory移到exclusive C盘临时目录并保留原research/targets.json字节,两项环境覆盖仅在自有QA进程删除;原D盘SDK/Purge均available,迁移后均unavailable。既有搜索只沿appDirectory祖先,未使用已登记来源。修复应仅把固定ID/版本及绝对路径登记作为最后候选,保持显式目录/环境/原位置优先,继续实际关键输入/协议核验;研究登记不能授权执行内容。原轮独立源码尚在运行,未修改冻结产品输入。
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# 统一执行进度
|
||||
|
||||
实机封存后索引预检首轮错误假定所有原路径仍不变,拒绝已按记录更新的start启动脚本,未暂存或提交。原24份清单已明确同时保留三份original-launchers/current-launchers;预检改为只允许这三个原路径与各自current清单匹配,其他原件仍必须逐SHA一致;不修改历史封存字节。
|
||||
|
||||
2026-10-31 1.16真实手机核心验收收口:用户确认信任、原审批、差异/报告SHA、主屏幕、锁屏/切Wi-Fi恢复、运行中停止及撤销清空;设备iPhone 14 Pro Max/iOS 27.2由用户提供,未录制手机屏幕。宿主原审计、Task/Run和完整记录保持;node --version仅完成一次、exit0/v24.22.1,新4/4工程检查通过。真实停止14596进程并核对33行心跳不再增长,设备已撤销;本地合成模型仅1请求、真实模型0请求,候选恢复demo无Key。封存24份初验和15份恢复/停止/撤销原字节证据,最终独立源码/完整发行与正式升级仍待完成。旧QA候选漏npm失败保留;新候选添加1926个npm文件,原32文件不变,同数据目录受控重启保持全部原状态,正式36552/1.15未操作。
|
||||
|
||||
2026-10-31 1.16接续2ecdfa2:当前源码519/519、0失败/取消/跳过,24类186组历史UI完整结束exit0;313源码输入原SHA保持,140份原结果/日志/截图(10096575字节)封存companion-f-local-evidence。独立D:\AWQA16\iphone-ca3891a9候选32程序文件/Node24.22.1,原宿主PID36552/1.15.0保持;候选PID33324/1.16.0使用4320管理、自有示例和数据,手机HTTPS为192.168.66.91:4321。实际CA/原mobile.html SHA/未配对401及6项桌面就绪通过、页面错误0;未生成配对票据、未变更OS信任/防火墙、真实模型0请求。离线示例等待预算到期正常暂停,原Task/Run保持,未自动重放。Windows与同局域网iPhone Safari/PWA可联调;公开证书和指引已准备,真实手机信任/前后台/切网、最终独立源码/完整发行与正式升级仍待验,F保持in_progress。首次封存预检因误把输入图标当截图、旧截图使用basename拒绝,无输出;原脚本/失败日志保留,按原EVIDENCE和原报告字节核对定位后完成封存,未改产品或重跑通过测试。
|
||||
|
||||
短路径新串行历史UI全23类179组通过,98份原报告/日志/截图封存并逐字节核对Git索引,提交18986e4。首长路径串行12类111组与66份失败证据独立保留,未改写;新候选完整源码提交6b03add继续有效。正在生成同载荷隔离QA AppId安装器,随后独立7组及正式stage/纠正升级/窗口/全数据复核。
|
||||
|
||||
+3
-3
@@ -6,10 +6,10 @@
|
||||
|
||||
1. [complete] A:默认关闭的独立HTTPS监听、宿主/用户/网关绑定、256位短效单次配对与原子设备登记;实际受信TLS、Windows DPAPI和54项关联检查通过,正式宿主未操作。
|
||||
2. [complete] B:项目范围、观察/审批/停止权限、会话轮换、撤销/到期、速率限制与脱敏审计;越权/直调/事务回滚通过。C–E新增流程继续独立验收。
|
||||
3. [in_progress] C:桌面管理与独立PWA本地完成,1440/390/768px共7组流程通过;iPhone原生证书/cookie/主屏幕仍待F实机。
|
||||
3. [complete] C:桌面管理与独立PWA本地完成,1440/390/768px共7组流程通过;真实iPhone信任/配对、主屏幕已由用户确认,原宿主审计对应。
|
||||
4. [complete] D:原审批ID/Task/Run/输入指纹/修订和幂等、真实Runtime单次命令、桌面竞争、手机停止原进程/心跳及更换Run拒绝通过;24项专项包含原unknown不重放。
|
||||
5. [in_progress] E:授权项目原seq分页/去重、原差异/报告SHA、实际TLS撤销连接和浏览器断线/刷新本地通过;真实手机后台/切Wi-Fi仍待F。
|
||||
6. [in_progress] F:来源2ecdfa2当前源码519/519、24类186组UI全部通过,0失败/跳过;313源码输入及140份原字节证据已封存。独立iPhone候选32文件,4320管理与192.168.66.91:4321 HTTPS、自有示例/数据/Node24;实际TLS、未配对401及电脑管理页通过,原示例等待预算到期正常暂停且Task/Run保持。用户手动信任证书和真实iPhone、最终独立源码/完整发行与保留状态部署待验收,不用390px/中继模拟代替。
|
||||
5. [complete] E:授权项目原seq分页/去重、原差异/报告SHA、实际TLS撤销连接和浏览器断线/刷新本地通过;用户确认真实手机锁屏/切Wi-Fi恢复和撤销后清空,原Task/Run/全部事件及报告SHA保持。
|
||||
6. [in_progress] F:来源2ecdfa2当前源码519/519、24类186组UI全部通过;313源码输入与140份原字节证据封存。真实iPhone核心流程已通过,设备iPhone 14 Pro Max/iOS 27.2为用户提供、无手机截图;命令只完成一次、工程4/4、手机停止真实14596进程且33行心跳停止、设备撤销后内容清空均对应原审计/文件。漏npm的32文件候选/失败保持,1958文件新候选同数据重启保持证书/设备/全部原会话;当前48024/demo无Key,正式36552/1.15未改。39份实机原字节证据分两组封存。下一步补发行QA输入mobile.html覆盖,固定不可变源码/便携/安装,完成独立源码及随包验证后保留状态升级;未完成前不记1.16完整交付。
|
||||
|
||||
初读纠错:实际入口为src/server/index.mjs和src/server/runtime.mjs,一次猜测路径读取失败无副作用。首次计划批量补丁因findings标题锚点错误整批拒绝,未写入;移除错误锚点后重试。后续按实际文件定位。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user