Context
From the review of #4127 (head 2fb24a89), commit fix(coordination): stabilize fence read errors:
loadLegacyCoordinationWriterFence now strips the trailing quoted absolute path from read-failure reason (legacy_writer_fence.ts:145-152):
const path = (error as NodeJS.ErrnoException).path;
const reason = error instanceof Error ? error.message : "legacy writer fence read failed";
// ...
reason: typeof path === "string" ? reason.replace(` '${path}'`, "") : reason,
Problem
The strip is a string-suffix match against Node's current fs error message format. The parity fixture (tests/fixtures/control_plane/legacy_writer_fence_caller_parity_v0.json:136) pins the path-free expectation, but nothing constructs a real fs error carrying error.path and asserts the strip actually fired. If Node ever changes its message shape (unquoted path, double quotes, path mid-message), the strip silently stops working and absolute local paths leak back into public reason — with no test going red.
Suggested fix
One focused unit test: construct an ENOENT-shaped error whose .path is a temp absolute path and whose .message ends with '<path>'; call the reader; assert reason contains no path fragment. A negative arm (error without path) asserting the message is preserved unchanged would also cover the defensive branch.
Non-blocking follow-up from #4127 (comment).
Context
From the review of #4127 (head
2fb24a89), commitfix(coordination): stabilize fence read errors:loadLegacyCoordinationWriterFencenow strips the trailing quoted absolute path from read-failurereason(legacy_writer_fence.ts:145-152):Problem
The strip is a string-suffix match against Node's current fs error message format. The parity fixture (
tests/fixtures/control_plane/legacy_writer_fence_caller_parity_v0.json:136) pins the path-free expectation, but nothing constructs a real fs error carryingerror.pathand asserts the strip actually fired. If Node ever changes its message shape (unquoted path, double quotes, path mid-message), the strip silently stops working and absolute local paths leak back into publicreason— with no test going red.Suggested fix
One focused unit test: construct an
ENOENT-shaped error whose.pathis a temp absolute path and whose.messageends with'<path>'; call the reader; assertreasoncontains no path fragment. A negative arm (error withoutpath) asserting the message is preserved unchanged would also cover the defensive branch.Non-blocking follow-up from #4127 (comment).