Files
Agent-Workbench/docs/task-control-j-release-evidence/0226-task-control-j-ui-review.mjs
T
2026-11-01 16:35:58 +08:00

20 lines
1.6 KiB
JavaScript

import fs from 'node:fs';
import assert from 'node:assert/strict';
import { createHash } from 'node:crypto';
const read = file => JSON.parse(fs.readFileSync(file, 'utf8'));
const candidate = read('.qa/task-control-j-candidate.json');
const ui = read('.qa/task-control-j-portable-task-control-original-validation.json');
assert.equal(ui.success, true); assert.equal(ui.appRoot, candidate.portableRoot);
const screenshots = ['html-desktop.png', 'diagnostic-390.png'].map(name => {
const row = ui.screenshots.find(value => value.path.endsWith(name)); assert.ok(row);
const bytes = fs.readFileSync(row.path); assert.equal(createHash('sha256').update(bytes).digest('hex'), row.sha256);
return row;
});
fs.writeFileSync('.qa/task-control-j-ui-reviewed.json', JSON.stringify({ success: true, at: new Date().toISOString(),
candidate: candidate.installer.candidateDirectory, screenshots,
observations: ['Desktop: original HTML/SVG goal, completed Task, applied bike.html path and no-test policy are separately readable.',
'390px: open task pane retains the unfinished original repair goal after diagnostic Run; controls fit viewport and panel scrolls.',
'Existing selected-session label has weak contrast in the desktop screenshot; retain as a separate visual-polish follow-up, no claim of complete visual redesign.'],
scope: 'Agent visually inspected both exact candidate screenshots through view_image; automated core-flow assertions are in the original UI receipt.' }, null, 2) + '\n', { flag: 'wx' });
console.log(JSON.stringify({ success: true, candidate: candidate.installer.candidateDirectory, reviewed: screenshots.length }));