fix(filesystem): preserve opaque caller reasons through cleanup

Do not interpret exact caller cancellation reasons as descriptor ownership records. Preserve checkpoint-shaped reasons through successful close retry and supply cancellation context in direct signal-aware cleanup consumers.

Validation: 156 focused tests across 14 files passed; no native provider execution. Refs #4610
This commit is contained in:
morluto committed 2026-10-17 08:25:01 +08:00
1 parent 3bd9aa3484
commit 746a044e42
5 files changed
+91 -34

No files matched your search

@@ -108,8 +108,9 @@ const buildIgnored = async (
try {
text = await readRegularFileText(policyPath, { signal });
} catch (cause: unknown) {
if (signal?.aborted === true && cause === signal.reason) throw cause;
if (!(cause instanceof RegularFileCleanupFailure)) throw cause;
const retry = await retryRegularFileCleanup(cause, resources);
const retry = await retryRegularFileCleanup(cause, resources, signal);
if (retry.cleanup !== undefined) {
const primary =
retry.outcome.kind === "failed"