fix(ci): replace empty catch blocks and raw stderr with logWarning

Fixes workflow-logger coverage test failures: empty catch blocks in
reopen-slice/reopen-task and raw process.stderr in reopen-milestone
now use logWarning from workflow-logger.
This commit is contained in:
Jeremy 2026-04-07 07:36:15 -05:00
parent 90440f93b3
commit b658eb9a24
3 changed files with 6 additions and 7 deletions

View file

@ -23,6 +23,7 @@ import { isClosedStatus } from "../status-guards.js";
import { renderAllProjections } from "../workflow-projections.js";
import { writeManifest } from "../workflow-manifest.js";
import { appendEvent } from "../workflow-events.js";
import { logWarning } from "../workflow-logger.js";
import { debugLog } from "../debug-logger.js";
import { existsSync, unlinkSync } from "node:fs";
import { join } from "node:path";
@ -140,9 +141,7 @@ export async function handleReopenMilestone(
trigger_reason: params.triggerReason,
});
} catch (hookErr) {
process.stderr.write(
`gsd: reopen-milestone post-mutation hook warning: ${(hookErr as Error).message}\n`,
);
logWarning("tool", `reopen-milestone post-mutation hook warning: ${(hookErr as Error).message}`);
}
return {

View file

@ -118,8 +118,8 @@ export async function handleReopenSlice(
const sliceUat = join(sliceDir, `${params.sliceId}-UAT.md`);
if (existsSync(sliceUat)) unlinkSync(sliceUat);
}
} catch {
// Non-fatal
} catch (cleanupErr) {
logWarning("tool", `reopen-slice artifact cleanup warning: ${(cleanupErr as Error).message}`);
}
clearPathCache();

View file

@ -112,8 +112,8 @@ export async function handleReopenTask(
const summaryPath = join(tasksDir, `${params.taskId}-SUMMARY.md`);
if (existsSync(summaryPath)) unlinkSync(summaryPath);
}
} catch {
// Non-fatal — stale artifact may cause reconciler interference but won't crash
} catch (cleanupErr) {
logWarning("tool", `reopen-task artifact cleanup warning: ${(cleanupErr as Error).message}`);
}
clearPathCache();