From eb0ff3aa69f152dd995de91c88227d3e32ac2917 Mon Sep 17 00:00:00 2001 From: Rodin Date: Fri, 15 May 2026 16:23:11 -0700 Subject: [PATCH] nit(#150): clarify why resolved != symlinkPath in InRepoSymlinkAllowed test Add a comment explaining that validateDocmapPath calls EvalSymlinks internally, so the returned path is always the fully-resolved real path and can never equal the symlink entry itself. Addresses sonnet bot NIT (review 4810) against d6bab7a9. --- cmd/review-bot/validatedocmap_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/review-bot/validatedocmap_test.go b/cmd/review-bot/validatedocmap_test.go index 1377b47..62a204e 100644 --- a/cmd/review-bot/validatedocmap_test.go +++ b/cmd/review-bot/validatedocmap_test.go @@ -687,6 +687,9 @@ func TestValidateDocmapPath_InRepoSymlinkAllowed(t *testing.T) { t.Fatalf("expected in-repo symlink to be accepted, got error: %v", err) } // The returned resolved path must be the real file (not the symlink entry). + // validateDocmapPath calls filepath.EvalSymlinks internally, so the returned + // path is always the fully-resolved real path — it can never equal the + // symlink entry itself. if resolved == symlinkPath { t.Errorf("expected resolved path to differ from symlink path") }