From 25c22222abe7a681491bdb4d7316250fdcf32973 Mon Sep 17 00:00:00 2001 From: morluto <76467478+morluto@users.noreply.github.com> Date: Fri, 16 Oct 2026 04:52:19 +0800 Subject: [PATCH] fix(reference): retain unverified symlink target provenance Keep the observed target path and failed directory in the unreadable-link diagnostic without promoting either to proven graph identity. Verify the retained path through the importer boundary. Refs: #4013, #4053 --- src/reference/ReferenceSourceReader.ts | 2 +- .../filesystem/referenceSourceUnreadableDirectories.test.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/reference/ReferenceSourceReader.ts b/src/reference/ReferenceSourceReader.ts index 6420e3f347..88553bee2b 100644 --- a/src/reference/ReferenceSourceReader.ts +++ b/src/reference/ReferenceSourceReader.ts @@ -147,7 +147,7 @@ export const reconcileUnobservedSymlinkTargets = ( kind: "symlink", path: entry.path, code: ancestor.code, - message: `Symbolic link target is inside a directory that could not be enumerated: ${ancestor.message}`, + message: `Symbolic link target ${JSON.stringify(entry.target)} was not inventoried because directory ${JSON.stringify(ancestor.path)} could not be enumerated: ${ancestor.message}`, }; } }; diff --git a/tests/boundary/filesystem/referenceSourceUnreadableDirectories.test.ts b/tests/boundary/filesystem/referenceSourceUnreadableDirectories.test.ts index ae54e16ce0..cc5b689e49 100644 --- a/tests/boundary/filesystem/referenceSourceUnreadableDirectories.test.ts +++ b/tests/boundary/filesystem/referenceSourceUnreadableDirectories.test.ts @@ -108,6 +108,7 @@ describe("reference source native unreadable directories", () => { kind: "symlink", target: null, target_state: "unreadable", + limitations: [expect.stringContaining('"hidden/target.txt"')], }), ); } finally {