fix(skills): remove checkpoint helper dead code

This commit is contained in:
jb
2026-09-04 10:47:04 -04:00
parent 08ebfb50ad
commit 7a58ec0eef
2 changed files with 1 additions and 3 deletions
@@ -184,13 +184,12 @@ async function readExisting(io, target) {
} }
async function openUniqueTemp(io, target) { async function openUniqueTemp(io, target) {
const directory = dirname(target);
for (let attempt = 0; attempt < MAX_TEMP_NAME_ATTEMPTS; attempt += 1) { for (let attempt = 0; attempt < MAX_TEMP_NAME_ATTEMPTS; attempt += 1) {
const id = io.randomUUID(); const id = io.randomUUID();
const path = `${target}.tmp-${process.pid}-${id}`; const path = `${target}.tmp-${process.pid}-${id}`;
try { try {
const handle = await io.open(path, "wx", FILE_MODE); const handle = await io.open(path, "wx", FILE_MODE);
return { path, handle, directory }; return { path, handle };
} catch (error) { } catch (error) {
// A collision is not stale-file cleanup. Leave the old file alone and try a new name. // A collision is not stale-file cleanup. Leave the old file alone and try a new name.
if (isAlreadyExists(error)) continue; if (isAlreadyExists(error)) continue;
@@ -12,7 +12,6 @@ import {
checkpointRecord, checkpointRecord,
defaultIo, defaultIo,
REQUIRED_SECTIONS, REQUIRED_SECTIONS,
validateRecord,
} from "../scripts/checkpoint-record.mjs"; } from "../scripts/checkpoint-record.mjs";
const scriptPath = fileURLToPath(new URL("../scripts/checkpoint-record.mjs", import.meta.url)); const scriptPath = fileURLToPath(new URL("../scripts/checkpoint-record.mjs", import.meta.url));