From 4e8469a1759cd161dc756cb4d9fb5728fe604da7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=89=E6=BE=9C?= Date: Mon, 17 Aug 2026 15:25:32 +0800 Subject: [PATCH] test(skills): cover Windows same-file identity seam with synthetic info skillPathSameFileIdentityImpl on Windows always returns false and is never reached through skillPathIdentityProven (which uses file IDs exclusively). Add a direct seam call with synthetic os.FileInfo to exercise the Windows return-false path and the Unix os.SameFile path with nil Sys(). --- internal/upgrade/skill_publication_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/upgrade/skill_publication_test.go b/internal/upgrade/skill_publication_test.go index 6be9aa58..2748f8ea 100644 --- a/internal/upgrade/skill_publication_test.go +++ b/internal/upgrade/skill_publication_test.go @@ -456,6 +456,12 @@ func TestCrossPlatformCoverageSkillPublicationFailureEdges(t *testing.T) { t.Fatal("empty incarnation") } }) + t.Run("synthetic info does not match same-file identity", func(t *testing.T) { + fake := skillPathFakeInfo{} + if skillPathSameFileIdentity(fake, fake) { + t.Fatal("synthetic info should not match") + } + }) }) }