Files
Agent-Workbench/docs/project-cache-f-seal-evidence/resume-native.mjs
T
2026-11-01 09:31:00 +08:00

14 lines
935 B
JavaScript

import fs from 'node:fs';
import assert from 'node:assert/strict';
import { publicSnapshot, compareOriginalState } from './cache-f-state.mjs';
const read = file => JSON.parse(fs.readFileSync(file, 'utf8'));
const deployed = read('.qa/cache-f-formal-verify.json');
const before = read(read('.qa/cache-f-formal-baseline-location.json').before);
const current = await publicSnapshot('http://127.0.0.1:4318', deployed.dataRoot);
const retained = compareOriginalState(before, current);
assert.equal(current.version, '1.19.0');
assert.equal(current.runtimeRoot, deployed.candidate);
const output = '.qa/cache-native-resume-state.json';
fs.writeFileSync(output, JSON.stringify({ success: true, current, retained }, null, 2) + '\n', { flag: 'wx' });
console.log(JSON.stringify({ success: true, version: current.version, pid: current.pid, projects: current.projects, hasKey: current.hasKey, active: current.active.length, retained, output }));