From bfc2c9ff766dded84c1d37e76af9a8ad43d2481d Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Thu, 3 Dec 2026 12:57:16 +0000 Subject: [PATCH] UI skip test: force a partial capture with a protected directory Co-Authored-By: Claude Opus 5.5 --- internal/server/ui_skip_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/server/ui_skip_test.go b/internal/server/ui_skip_test.go index eeab4b5a..cc6dbe3c 100644 --- a/internal/server/ui_skip_test.go +++ b/internal/server/ui_skip_test.go @@ -190,12 +190,15 @@ func TestUISkipRunsModelOnAnyRecordedChange(t *testing.T) { } } -// TestUISkipPartialCaptureNeverSkips proves a visit whose capture was partial -// (here a protected .env file forces skipped>0) blocks the fallback even when +// (here a protected secrets/ directory, which is never walked, forces skipped>0; +// an untouched .env no longer does) blocks the fallback even when // it recorded no file changes, and that inspect carries a run-level warning. func TestUISkipPartialCaptureNeverSkips(t *testing.T) { dir := t.TempDir() - if err := os.WriteFile(filepath.Join(dir, ".env"), []byte("A=1\n"), 0o600); err != nil { + if err := os.MkdirAll(filepath.Join(dir, "secrets"), 0o700); err != nil { + t.Fatal(err) + } + if err := os.WriteFile(filepath.Join(dir, "secrets", "token"), []byte("A=1\n"), 0o600); err != nil { t.Fatal(err) } detail, visited, verdictCalls := runUISkipIn(t, uiReviewerSource(true), nil, dir)