From a6ec3fbdcb2ca8ab530f61bbe60f06b8cc3b26c4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Jul 2026 12:51:46 +0000 Subject: [PATCH 1/2] Initial plan From 87343319903925069325119cfc28835571a921f1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Jul 2026 13:04:26 +0000 Subject: [PATCH 2/2] test: align audit cache test with artifact marker behavior Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- pkg/cli/audit_test.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkg/cli/audit_test.go b/pkg/cli/audit_test.go index 4dc0a88a679..5a211cc33ca 100644 --- a/pkg/cli/audit_test.go +++ b/pkg/cli/audit_test.go @@ -545,12 +545,16 @@ func TestAuditCachingBehavior(t *testing.T) { t.Errorf("Expected workflow name %s, got %s", summary.Run.WorkflowName, loadedSummary.Run.WorkflowName) } - // Verify that downloadRunArtifacts skips download when valid summary exists - // This is tested by checking that the function returns without error - // and doesn't attempt to call `gh run download` + // A complete artifact marker is required for unfiltered cache hits. + if err := markArtifactDownloaded(runOutputDir, string(ArtifactSetAll)); err != nil { + t.Fatalf("Failed to mark cached artifacts as complete: %v", err) + } + + // Verify that downloadRunArtifacts skips download when a valid summary exists + // and the run folder is marked as a complete artifact cache. err := downloadRunArtifacts(context.Background(), downloadArtifactsOptions{runID: run.DatabaseID, outputDir: runOutputDir}) if err != nil { - t.Errorf("downloadRunArtifacts should skip download when valid summary exists, but got error: %v", err) + t.Errorf("downloadRunArtifacts should skip download when cached artifacts are complete, but got error: %v", err) } }