- renderer: release_transfer_images() deletes the transfer framebuffer instead of only zeroing the name; the leak exhausted VRAM and killed the GPU process under Vulkan after ~3-7 minutes - canvas: status notices are absolute overlays, so they no longer resize the native surface (each show/hide freed and recreated region draw buffers and eventually froze the main regions) - compute: bounded shader/layout/pipeline caches, staging pool, device-lost error propagation, dev-only ?glStats / ?computeFault / ?compute hooks - headed tools: soak/probe/smoke assets and docs - evidence: 20-minute Vulkan soak STABLE (GPU-SOAK-20261205-161007), SwiftShader control STABLE (GPU-SOAK-20261205-162105), Clip 28/28 NOT_CLAIMED (CLIP-HEADED-20261205-162214) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
37 lines
1.3 KiB
JavaScript
37 lines
1.3 KiB
JavaScript
/**
|
|
* Receipt writer shared by the headed diagnostic tools.
|
|
*
|
|
* Machine-readable JSON lands in tests/golden (tracked, never overwritten);
|
|
* regenerable media (screenshots, full stderr) stays outside the repo unless
|
|
* the caller chooses otherwise.
|
|
*/
|
|
import fs from "node:fs";
|
|
import os from "node:os";
|
|
import path from "node:path";
|
|
import { REPO_ROOT } from "./browser.mjs";
|
|
|
|
const pad = (value) => String(value).padStart(2, "0");
|
|
export function stamp(date = new Date()) {
|
|
return `${date.getFullYear()}${pad(date.getMonth() + 1)}${pad(date.getDate())}-${pad(date.getHours())}${pad(date.getMinutes())}${pad(date.getSeconds())}`;
|
|
}
|
|
|
|
export function receiptDir(topic, explicit) {
|
|
if (explicit) return path.resolve(explicit);
|
|
return path.join(REPO_ROOT, "tests/golden", `${topic}-${stamp()}`);
|
|
}
|
|
|
|
export function mediaDir(topic, explicit) {
|
|
if (explicit) return path.resolve(explicit);
|
|
const dir = path.join(os.tmpdir(), `${topic}-${stamp()}`);
|
|
fs.mkdirSync(dir, { recursive: true });
|
|
return dir;
|
|
}
|
|
|
|
export function writeReceipt(dir, report) {
|
|
fs.mkdirSync(dir, { recursive: true });
|
|
let target = path.join(dir, "report.json");
|
|
if (fs.existsSync(target)) target = path.join(dir, `report-${stamp()}.json`);
|
|
fs.writeFileSync(target, JSON.stringify({ schemaVersion: 1, acceptance: "NOT_CLAIMED", ...report }, null, 2));
|
|
return target;
|
|
}
|