612 references to _workspace
AnalyzeCiFailure.Tests (612)
AnalyzeCiFailureAlternateWorkflowTests.cs (6)
298
Assert.Single(await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "gh-calls.log")));
311
await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "gh-calls.log")),
323
["collect", "--repo", "microsoft/aspire", "--working-dir",
_workspace
.Path, "--run-id", "123", "--run-attempt", "2"],
336
var responses = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "responses")).FullName;
520
Assert.Equal(0, (await RunProcessAsync("git", ["--no-pager", "remote", "add", "origin", Path.Combine(
_workspace
.Path, "remote.git")])).ExitCode);
528
_workspace
.Path,
AnalyzeCiFailureArtifactSelectionTests.cs (2)
195
var artifactsPath = Path.Combine(
_workspace
.Path, "artifacts.json");
196
var jobsPath = Path.Combine(
_workspace
.Path, "jobs.json");
AnalyzeCiFailureBestEffortTests.cs (4)
48
var root = Path.Combine(
_workspace
.Path, "partial-results");
77
var archivePath = Path.Combine(
_workspace
.Path, "failed-expansion.zip");
87
Path.Combine(
_workspace
.Path, "first"),
95
Path.Combine(
_workspace
.Path, "second"),
AnalyzeCiFailureBootstrapTests.cs (2)
16
var seed = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "seed")).FullName;
41
var hostile = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "hostile")).FullName;
AnalyzeCiFailureBranchHistoryTests.cs (1)
46
Path.Combine(
_workspace
.Path, "history-branch-calls.log"))),
AnalyzeCiFailureCohesionTests.cs (5)
20
var output = Path.Combine(
_workspace
.Path, "workflow-output");
24
_workspace
.Path,
46
var input = new EvidencePaths(Path.Combine(
_workspace
.Path, "input"));
126
Assert.Empty(Directory.GetFileSystemEntries(
_workspace
.Path));
135
var summary = Path.Combine(
_workspace
.Path, "summary.md");
AnalyzeCiFailureCollectionTests.cs (32)
28
Assert.Contains("analysis_ready=false", await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "workflow-output")));
42
Assert.Contains("analysis_ready=false", await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "workflow-output")));
55
var outputs = await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "workflow-output"));
92
_workspace
.Path,
119
var pathOutputs = await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "invocation-paths"));
137
var calls = await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "gh-calls.log"));
148
await File.WriteAllTextAsync(Path.Combine(
_workspace
.Path, "require-final-outputs"), "");
153
var outputs = await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "workflow-output"));
171
var outputs = await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "workflow-output"));
178
await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "gh-calls.log")));
210
var pathOutputs = await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "workflow-output"));
228
Path.Combine(
_workspace
.Path, "workflow-output"),
232
await Verifier.Verify(await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "workflow-output")), "txt")
250
Assert.False(File.Exists(Path.Combine(
_workspace
.Path, "gh-calls.log")));
265
Assert.False(File.Exists(Path.Combine(
_workspace
.Path, "workflow-output")));
272
var outputDirectory = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "output-is-directory")).FullName;
283
Assert.False(File.Exists(Path.Combine(
_workspace
.Path, "gh-calls.log")));
296
["GITHUB_OUTPUT"] = Path.Combine(
_workspace
.Path, "missing-parent", "workflow-output"),
302
Assert.False(File.Exists(Path.Combine(
_workspace
.Path, "gh-calls.log")));
311
await File.WriteAllTextAsync(Path.Combine(
_workspace
.Path, "fail-outcome-write"), "");
335
var paths = await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "workflow-output"));
464
var calls = await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "gh-calls.log"));
548
Assert.False(File.Exists(Path.Combine(
_workspace
.Path, "gh-calls.log")));
560
await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "gh-calls.log")));
585
var calls = await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "gh-calls.log"));
618
var calls = await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "gh-calls.log"));
648
var responses = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "responses")).FullName;
936
Path.Combine(
_workspace
.Path, scenario == "history-transport" ? "missing.git" : "remote.git")])).ExitCode);
940
var causes = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "history-seed", "causes")).FullName;
984
["GITHUB_OUTPUT"] = Path.Combine(
_workspace
.Path, "workflow-output"),
985
["INVOCATION_PATHS"] = useWorkflowAdapter ? Path.Combine(
_workspace
.Path, "workflow-output") : Path.Combine(
_workspace
.Path, "invocation-paths"),
AnalyzeCiFailureCSharpRerunTests.cs (5)
87
var analysis = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "proposal")).FullName;
100
var output = Path.Combine(
_workspace
.Path, "agent-output.json");
141
["workflow", "rerun", "--repo", "microsoft/aspire", "--analysis-dir", analysis, "--working-dir",
_workspace
.Path],
159
var calls = File.Exists(Path.Combine(
_workspace
.Path, "rerun-calls.log"))
160
? await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "rerun-calls.log")) : [];
AnalyzeCiFailureDiagnosticsTests.cs (10)
54
File.ReadAllLines(Path.Combine(
_workspace
.Path, "workflow-output")));
75
File.Delete(Path.Combine(
_workspace
.Path, "first-issue-published"));
76
var fakeGh = Assert.Single(Directory.GetFiles(
_workspace
.Path, "gh", SearchOption.AllDirectories));
79
"--analysis-dir", Path.Combine(
_workspace
.Path, "ci-analysis-output")],
112
_workspace
.Path,
131
var input = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "invalid-replay")).FullName;
145
Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "eng"));
146
await File.WriteAllTextAsync(Path.Combine(
_workspace
.Path, "eng", "test-retry-patterns.json"), "not JSON");
231
await File.WriteAllTextAsync(Path.Combine(
_workspace
.Path, "comment-response"), response);
252
var output = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "not-an-output-file")).FullName;
AnalyzeCiFailureEvidenceTests.cs (23)
53
var directory = Path.Combine(
_workspace
.Path, "ci-analysis-output");
63
var accepted = AnalyzeCiFailureFixtures.Validate(
_workspace
.Path);
89
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
122
var file = Path.Combine(
_workspace
.Path, "typed-test-failures.json");
144
var directory = Path.Combine(
_workspace
.Path, "ci-analysis-output");
146
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
150
var output = Path.Combine(
_workspace
.Path, "accepted.json");
167
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
188
var accepted = AnalyzeCiFailureFixtures.Validate(
_workspace
.Path);
228
var accepted = AnalyzeCiFailureFixtures.Validate(
_workspace
.Path);
241
Path.Combine(
_workspace
.Path, "issue-details.json"),
255
Assert.False(File.Exists(Path.Combine(
_workspace
.Path, "memory-repo", "runs", "123.json")));
268
var analysisDirectory = Path.Combine(
_workspace
.Path, "ci-analysis-output");
291
await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "pr-comment.md")),
293
Assert.False(Directory.Exists(Path.Combine(
_workspace
.Path, "memory-repo", "runs")));
306
await File.WriteAllTextAsync(Path.Combine(
_workspace
.Path, "invalidate-evidence-on-lookup"), "");
319
["issue"] = await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "issue-body.md")),
320
["comment"] = await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "pr-comment.md")),
346
var output = Path.Combine(
_workspace
.Path, "summary.json");
375
var output = Path.Combine(
_workspace
.Path, "summary.json");
387
var file = Path.Combine(
_workspace
.Path, "jobs.json");
410
var output = Path.Combine(
_workspace
.Path, "summary.json");
432
var output = Path.Combine(
_workspace
.Path, "summary.json");
AnalyzeCiFailureGitTests.cs (23)
17
var bin = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "fake-git")).FullName;
18
var started = Path.Combine(
_workspace
.Path, "head-started");
19
var released = Path.Combine(
_workspace
.Path, "head-released");
37
_workspace
.Path,
43
var store = new CauseHistoryStore(command, "microsoft/aspire",
_workspace
.Path, new AnalysisDiagnostics());
44
var commit = store.CommitAndPushAsync("123", [Path.Combine(
_workspace
.Path, "causes/test.json")]);
60
["--no-pager -C " +
_workspace
.Path + " add -- causes/test.json",
61
"--no-pager -C " +
_workspace
.Path + " diff --cached --name-only",
62
"--no-pager -C " +
_workspace
.Path + " commit -m Update CI failure analysis for run 123",
63
"--no-pager -C " +
_workspace
.Path + " rev-parse HEAD"],
64
await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "git-operations")));
72
var directory = Path.Combine(
_workspace
.Path, "memory checkout");
73
var history = new CauseHistoryStore(new AnalyzeCiFailure.AnalyzerCommandExecutor(
_workspace
.Path), "microsoft/aspire", directory, new AnalysisDiagnostics());
87
var directory = Path.Combine(
_workspace
.Path, "memory checkout");
89
var store = new CauseHistoryStore(new AnalyzeCiFailure.AnalyzerCommandExecutor(
_workspace
.Path), "microsoft/aspire", directory, new AnalysisDiagnostics());
126
var directory = Path.Combine(
_workspace
.Path, "memory checkout");
127
var command = new AnalyzeCiFailure.AnalyzerCommandExecutor(
_workspace
.Path);
179
var fakeBin = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "fake-bin")).FullName;
206
var directory = Path.Combine(
_workspace
.Path, "history-checkout");
207
var notes = Path.Combine(
_workspace
.Path, "operator-notes.txt");
211
new CauseHistoryStore(new AnalyzeCiFailure.AnalyzerCommandExecutor(
_workspace
.Path, environment), "microsoft/aspire", directory, new AnalysisDiagnostics()).OpenForPublicationAsync());
220
var remoteDirectory = Path.Combine(
_workspace
.Path, "remote repository.git");
237
await File.WriteAllTextAsync(Path.Combine(
_workspace
.Path, "stored-history.json"), contents);
AnalyzeCiFailureIdentifierPrecisionTests.cs (1)
29
var outputPath = Path.Combine(
_workspace
.Path, "last-success.json");
AnalyzeCiFailureInvocationTests.cs (12)
19
var evidence = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "saved-evidence")).FullName;
20
var proposal = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "saved-proposal")).FullName;
21
var alias = Path.Combine(
_workspace
.Path, "evidence-alias");
49
var outputs = await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "workflow-output"));
58
Assert.False(Directory.Exists(Path.Combine(
_workspace
.Path, "ci-failure-data")));
97
Assert.Empty(Directory.GetFileSystemEntries(
_workspace
.Path));
113
Assert.Empty(Directory.GetFileSystemEntries(
_workspace
.Path));
173
var saved = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "earlier-replay")).FullName;
176
var linkedInput = Path.Combine(
_workspace
.Path, "linked-evidence");
208
var output = Path.Combine(
_workspace
.Path, "workflow-output");
234
var evidence = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "input-evidence")).FullName;
235
var proposal = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "input-proposal")).FullName;
AnalyzeCiFailureMigrationTests.cs (33)
85
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
88
var path = Path.Combine(
_workspace
.Path, "ci-analysis-output", "proposal.json");
94
var result = await RunValidatorCommandAsync(["validate", "--repo", "microsoft/aspire", "--working-dir",
_workspace
.Path,
95
"--analysis-dir", Path.Combine(
_workspace
.Path, "ci-analysis-output")]);
126
var regenerated = await RunValidatorCommandAsync(["replay", "--working-dir",
_workspace
.Path]);
242
var file = Path.Combine(
_workspace
.Path, "job-123.log");
302
_workspace
.Path,
326
Path.Combine(
_workspace
.Path, "issue.json"),
336
var calls = await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "gh-calls.log"));
339
var history = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "memory-repo", "causes", "debugger-timeout.json")))!;
351
Path.Combine(
_workspace
.Path, "issue.json"),
362
await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "gh-calls.log")),
364
Assert.False(Directory.Exists(Path.Combine(
_workspace
.Path, "memory-repo", "runs")));
379
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
404
Assert.False(File.Exists(Path.Combine(
_workspace
.Path, "gh-calls.log")));
405
Assert.False(Directory.Exists(Path.Combine(
_workspace
.Path, "memory-repo", "runs")));
414
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
417
await File.WriteAllTextAsync(Path.Combine(
_workspace
.Path, "fail-issue-create-once"), "");
418
await File.WriteAllTextAsync(Path.Combine(
_workspace
.Path, "seed-unselected-malformed"), "");
436
await File.WriteAllTextAsync(Path.Combine(
_workspace
.Path, "ci-analysis-output", "proposal.json"), TransientJson.Write(proposal));
437
var fakeGh = Assert.Single(Directory.GetFiles(
_workspace
.Path, "gh", SearchOption.AllDirectories));
440
var stored = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "memory-repo", "causes", "debugger-timeout.json")))!;
451
var summary = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "memory-repo", "runs", "123.json")))!;
455
Assert.True(File.Exists(Path.Combine(
_workspace
.Path, "pr-comment.md")));
465
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
467
var agent = Path.Combine(
_workspace
.Path, "ci-analysis-output");
470
var arguments = new[] { "validate", "--repo", "microsoft/aspire", "--working-dir",
_workspace
.Path, "--analysis-dir", agent };
491
AnalyzeCiFailureFixtures.Write(
_workspace
.Path);
492
var agent = Path.Combine(
_workspace
.Path, "ci-analysis-output");
495
var result = await RunValidatorCommandAsync(["validate", "--repo", "microsoft/aspire", "--working-dir",
_workspace
.Path,
507
var transferred = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "transferred")).FullName;
533
var agent = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "agent-artifact")).FullName;
586
var (captured, _) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
AnalyzeCiFailureOccurrenceTests.cs (5)
150
var path = Path.Combine(
_workspace
.Path, "issue-body.md");
166
var bodyPath = Path.Combine(
_workspace
.Path, "issue-body.md");
175
Path.Combine(
_workspace
.Path, "issue.json"),
195
var summaryPath = Path.Combine(
_workspace
.Path, "ci-analysis-output", "analysis-result.json");
209
var fakeGh = Path.Combine(Assert.Single(Directory.GetDirectories(
_workspace
.Path, "fake-bin-*")), "gh");
AnalyzeCiFailureOverflowTests.cs (15)
42
var record = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "memory-repo/runs/123.json")))!;
46
Assert.True(File.Exists(Path.Combine(
_workspace
.Path, "memory-repo/causes", id + ".json")));
50
var body = await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "issue-body.md"));
64
await File.WriteAllTextAsync(Path.Combine(
_workspace
.Path, "fail-overflow-comment-once"), "");
67
var fakeGh = Path.Combine(Assert.Single(Directory.GetDirectories(
_workspace
.Path, "fake-bin-*")), "gh");
72
var issuePath = Path.Combine(
_workspace
.Path, "issue.json");
76
var pagesPath = Path.Combine(
_workspace
.Path, "overflow-comments.json");
85
File.Delete(Path.Combine(
_workspace
.Path, "ci-analysis-output/causes", $"cause-{index}.json"));
95
Assert.Contains("Operator issue notes.", await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "issue-body.md")), StringComparison.Ordinal);
112
var path = Path.Combine(
_workspace
.Path, "issue.json");
136
var fakeGh = Path.Combine(Assert.Single(Directory.GetDirectories(
_workspace
.Path, "fake-bin-*")), "gh");
152
var path = Path.Combine(
_workspace
.Path, "ci-analysis-output/analysis-result.json");
156
foreach (var file in Directory.GetFiles(Path.Combine(
_workspace
.Path, "ci-analysis-output/causes"), "*.json"))
162
var fakeGh = Path.Combine(Assert.Single(Directory.GetDirectories(
_workspace
.Path, "fake-bin-*")), "gh");
167
var body = await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "issue-body.md"));
AnalyzeCiFailurePathsTests.cs (1)
17
var workingDirectory = Path.Combine(
_workspace
.Path, "working directory");
AnalyzeCiFailurePreparationTests.cs (17)
87
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
105
Assert.False(Directory.Exists(Path.Combine(
_workspace
.Path, "memory-repo")));
176
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
189
Assert.False(Directory.Exists(Path.Combine(
_workspace
.Path, "memory-repo")));
273
_preparationEvidence = AnalyzeCiFailureFixtures.Read(
_workspace
.Path).Evidence;
483
var secret = Path.Combine(
_workspace
.Path, "external.xml");
555
var history = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "memory-repo", "causes", "debugger-timeout.json")))!;
558
var summary = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "memory-repo", "runs", "123.json")))!;
559
var body = await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "issue-body.md"));
606
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
674
Assert.False(Directory.Exists(Path.Combine(
_workspace
.Path, "memory-repo")));
696
var directory = Path.Combine(
_workspace
.Path, "ci-analysis-output");
715
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
800
var analysisDirectory = Path.Combine(
_workspace
.Path, "ci-analysis-output");
839
var analysisDirectory = Path.Combine(
_workspace
.Path, "ci-analysis-output");
861
summary = AnalyzeCiFailure.CiFailureJson.ToNode(AnalyzeCiFailureFixtures.Validate(
_workspace
.Path).Report)!;
867
var history = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "memory-repo", "causes", "debugger-timeout.json")))!;
AnalyzeCiFailurePublicationTests.cs (88)
23
await File.WriteAllTextAsync(Path.Combine(
_workspace
.Path, "existing-main-label"), "");
50
await File.WriteAllTextAsync(Path.Combine(
_workspace
.Path, "issue.json"), "[null,5]");
56
var calls = await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "gh-calls.log"));
58
Assert.False(File.Exists(Path.Combine(
_workspace
.Path, "memory-repo", "runs", "123.json")));
71
var memoryDirectory = Path.Combine(
_workspace
.Path, "memory-repo");
75
_workspace
.Path,
76
Path.Combine(
_workspace
.Path, "analysis"),
118
var directory = Path.Combine(
_workspace
.Path, "ci-analysis-output");
218
await File.WriteAllTextAsync(Path.Combine(
_workspace
.Path, "issue-details.json"), issue.ToJsonString());
221
await File.WriteAllTextAsync(Path.Combine(
_workspace
.Path, "issue-lookup-failure"), "");
224
? JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "ci-analysis-output", "causes", "debugger-timeout.json")))!.AsObject()
245
var calls = await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "gh-calls.log"));
253
Assert.False(File.Exists(Path.Combine(
_workspace
.Path, "memory-repo", "runs", "123.json")));
268
Path.Combine(
_workspace
.Path, "comments.json"),
273
await File.WriteAllTextAsync(Path.Combine(
_workspace
.Path, "close-after-lookup"), "");
277
var summaryPath = Path.Combine(
_workspace
.Path, "ci-analysis-output", "analysis-result.json");
287
File.Delete(Path.Combine(
_workspace
.Path, "ci-analysis-output", "causes", "debugger-timeout.json"));
293
var calls = await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "gh-calls.log"));
307
var request = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "published-comment-request.json")))!;
315
await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "pr-comment.md")),
332
await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "pr-comment.md")),
359
var calls = await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "gh-calls.log"));
361
Assert.False(File.Exists(Path.Combine(
_workspace
.Path, "issue-body.md")));
382
Path.Combine(
_workspace
.Path, "issue-details.json"),
397
Assert.Contains("new operator note.", await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "issue-body.md")), StringComparison.Ordinal);
398
var calls = await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "gh-calls.log"));
419
var analysis = Path.Combine(
_workspace
.Path, "ci-analysis-output");
459
var calls = await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "gh-calls.log"));
477
var bodyPath = Path.Combine(
_workspace
.Path, "issue-body.md");
510
var analysis = Path.Combine(
_workspace
.Path, "ci-analysis-output");
526
var body = await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "issue-body.md"));
540
var summaryPath = Path.Combine(
_workspace
.Path, "ci-analysis-output", "analysis-result.json");
544
var causePath = Path.Combine(
_workspace
.Path, "ci-analysis-output", "causes", "debugger-timeout.json");
568
var summaryPath = Path.Combine(
_workspace
.Path, "ci-analysis-output", "analysis-result.json");
572
var causePath = Path.Combine(
_workspace
.Path, "ci-analysis-output", "causes", "debugger-timeout.json");
581
var history = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "memory-repo", "causes", "debugger-timeout.json")))!;
585
summary = AnalyzeCiFailure.CiFailureJson.ToNode(AnalyzeCiFailureFixtures.Validate(
_workspace
.Path).Report)!;
587
Assert.InRange(System.Text.Encoding.UTF8.GetByteCount(await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "issue-body.md"))), 1, 65000);
635
var updated = await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "issue-body.md"));
640
history = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "memory-repo", "causes", "debugger-timeout.json")))!.AsObject();
666
Assert.False(File.Exists(Path.Combine(
_workspace
.Path, "issue-body.md")));
667
var calls = await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "gh-calls.log"));
674
var original = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "issue.json")))!;
694
var analysis = Path.Combine(
_workspace
.Path, "ci-analysis-output");
715
summary = AnalyzeCiFailure.CiFailureJson.ToNode(AnalyzeCiFailureFixtures.Validate(
_workspace
.Path).Report)!;
734
var analysis = Path.Combine(
_workspace
.Path, "ci-analysis-output");
768
var body = await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "issue-body.md"));
774
Path.Combine(
_workspace
.Path, "issue.json"),
792
var fakeGh = Path.Combine(Assert.Single(Directory.GetDirectories(
_workspace
.Path, "fake-bin-*")), "gh");
797
var updated = await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "issue-body.md"));
824
Assert.False(File.Exists(Path.Combine(
_workspace
.Path, "issue-body.md")));
825
var calls = await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "gh-calls.log"));
827
var original = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "issue.json")))!;
838
var bodyPath = Path.Combine(
_workspace
.Path, "issue-body.md");
847
Path.Combine(
_workspace
.Path, "issue.json"),
856
var fakeGh = Path.Combine(Assert.Single(Directory.GetDirectories(
_workspace
.Path, "fake-bin-*")), "gh");
890
var causes = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "memory-repo", "causes")).FullName;
893
if (File.Exists(Path.Combine(
_workspace
.Path, "seed-unselected-malformed")))
895
var causes = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "memory-repo", "causes")).FullName;
901
Path.Combine(
_workspace
.Path, "issue.json"),
1000
AnalyzeCiFailureFixtures.Write(
_workspace
.Path);
1014
typeof(AnalyzeCiFailure.Program).Assembly.Location, "publish", "--working-dir",
_workspace
.Path,
1015
"--evidence-dir", EvidenceDirectory, "--analysis-dir", Path.Combine(
_workspace
.Path, "ci-analysis-output"),
1016
"--history-dir", Path.Combine(
_workspace
.Path, "memory-repo"), "--repo", "microsoft/aspire",
1026
var checkout = Path.Combine(
_workspace
.Path, "memory-repo");
1027
var remote = Path.Combine(
_workspace
.Path, "remote.git");
1094
var analysisDirectory = Path.Combine(
_workspace
.Path, "ci-analysis-output");
1104
await File.WriteAllTextAsync(Path.Combine(
_workspace
.Path, "fail-second-issue"), "");
1119
var path = Path.Combine(
_workspace
.Path, "memory-repo", "causes", $"{id}.json");
1136
Assert.False(File.Exists(Path.Combine(
_workspace
.Path, "pr-comment.md")));
1174
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
1206
var directory = Path.Combine(
_workspace
.Path, "ci-analysis-output");
1240
var directory = Path.Combine(
_workspace
.Path, "ci-analysis-output");
1259
var path = Path.Combine(
_workspace
.Path, "ci-analysis-output", "analysis-result.json");
1280
var history = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "memory-repo", "causes", "debugger-timeout.json")))!;
1282
var run = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "memory-repo", "runs", "123.json")))!;
1292
var directory = Path.Combine(
_workspace
.Path, "ci-analysis-output");
1353
var directory = Path.Combine(
_workspace
.Path, "ci-analysis-output");
1367
var collected = AnalyzeCiFailureFixtures.Validate(
_workspace
.Path);
1401
var storedDirectory = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "memory-repo", "causes")).FullName;
1431
["ANALYSIS_DIR"] = Path.Combine(
_workspace
.Path, "obsolete-analysis-directory"),
1435
typeof(AnalyzeCiFailure.Program).Assembly.Location, "publish", "--working-dir",
_workspace
.Path,
1437
"--history-dir", Path.Combine(
_workspace
.Path, "memory-repo"), "--repo", "microsoft/aspire",
1440
AnalyzeCiFailureFixtures.Write(
_workspace
.Path);
1447
await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "gh-calls.log")),
1461
var body = await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "issue-body.md"));
1464
Path.Combine(
_workspace
.Path, "issue.json"),
1481
Assert.Contains("Operator notes: keep this.", await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "issue-body.md")), StringComparison.Ordinal);
AnalyzeCiFailureStorageTests.cs (7)
18
_workspace
.Path,
35
Assert.Empty(Directory.GetFileSystemEntries(
_workspace
.Path));
173
var replay = await RunValidatorCommandAsync(["replay", "--working-dir",
_workspace
.Path]);
193
var target = collection ? Path.Combine(
_workspace
.Path, "saved-evidence") : paths.RootDirectory;
213
_workspace
.Path,
223
var result = await RunValidatorCommandAsync(["replay", "--working-dir",
_workspace
.Path]);
246
var result = await RunValidatorCommandAsync(["replay", "--working-dir",
_workspace
.Path]);
AnalyzeCiFailureWorkflowCommandsTests.cs (18)
25
Assert.Equal(report, await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "step-summary")));
32
var summary = Path.Combine(
_workspace
.Path, "step-summary");
39
var outputs = await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "workflow-output"));
74
var summary = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "step-summary")).FullName;
88
var path = Path.Combine(
_workspace
.Path, "workflow-output");
119
var output = Path.Combine(
_workspace
.Path, "workflow-output");
139
var output = Path.Combine(
_workspace
.Path, "workflow-output");
184
["collect", "--repo", "microsoft/aspire", "--run-id", "123", "--working-dir",
_workspace
.Path, "--github-output"],
195
Assert.Empty(Directory.GetFileSystemEntries(
_workspace
.Path));
202
["collect", "--repo", "microsoft/aspire", "--working-dir",
_workspace
.Path],
205
["GITHUB_OUTPUT"] = Path.Combine(
_workspace
.Path, "workflow-output"),
213
Assert.False(File.Exists(Path.Combine(
_workspace
.Path, "workflow-output")));
221
var output = Path.Combine(
_workspace
.Path, "agent-output.json");
225
["workflow", "rerun", "--repo", "microsoft/aspire", "--analysis-dir",
_workspace
.Path, "--working-dir",
_workspace
.Path],
240
var output = Path.Combine(
_workspace
.Path, "agent-output.json");
244
["workflow", "rerun", "--repo", "microsoft/aspire", "--analysis-dir",
_workspace
.Path, "--working-dir",
_workspace
.Path],
AnalyzeCiFailureWorkflowTests.cs (302)
25
private string EvidenceDirectory => _collectedEvidenceDirectory ?? Path.Combine(
_workspace
.Path, "ci-failure-analysis", "evidence");
26
private string ReplayDirectory => _replayDirectory ?? Path.Combine(
_workspace
.Path, "ci-failure-analysis", "replay");
27
private string RecoveryDirectory(string stage) => Path.Combine(_invocationDirectory ?? Path.Combine(
_workspace
.Path, "ci-failure-analysis"), "recovery", stage);
39
_workspace
.Dispose();
64
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
88
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
112
Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "ci-analysis-output", "causes", "ghost.json"));
114
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
117
Assert.True(Directory.Exists(Path.Combine(
_workspace
.Path, "ci-analysis-output", "causes", "ghost.json")));
135
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
152
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
173
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
191
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
238
Assert.Empty(Directory.GetFileSystemEntries(
_workspace
.Path));
260
Assert.Empty(Directory.GetFileSystemEntries(
_workspace
.Path));
280
Assert.Empty(Directory.GetFileSystemEntries(
_workspace
.Path));
293
Assert.Empty(Directory.GetFileSystemEntries(
_workspace
.Path));
311
Assert.Empty(Directory.GetFileSystemEntries(
_workspace
.Path));
322
AnalyzeCiFailureFixtures.Write(
_workspace
.Path);
347
Assert.Empty(Directory.GetFileSystemEntries(
_workspace
.Path));
363
await File.WriteAllTextAsync(Path.Combine(
_workspace
.Path, "arguments.rsp"), "collect");
369
Assert.Equal(["arguments.rsp"], Directory.GetFileSystemEntries(
_workspace
.Path).Select(Path.GetFileName));
379
Assert.Empty(Directory.GetFileSystemEntries(
_workspace
.Path));
389
new Dictionary<string, string> { ["ANALYSIS_DIR"] = Path.Combine(
_workspace
.Path, "ambient-analysis") });
395
Assert.Empty(Directory.GetFileSystemEntries(
_workspace
.Path));
406
new Dictionary<string, string> { ["ANALYSIS_DIR"] = Path.Combine(
_workspace
.Path, "ambient-analysis") });
410
Assert.Empty(Directory.GetFileSystemEntries(
_workspace
.Path));
423
Assert.Empty(Directory.GetFileSystemEntries(
_workspace
.Path));
435
AnalyzeCiFailureFixtures.Write(
_workspace
.Path);
436
var workingDirectory = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "working directory")).FullName;
440
Directory.Move(Path.Combine(
_workspace
.Path, "ci-analysis-output"), analysisDirectory);
441
var ambientDirectory = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "ambient-analysis")).FullName;
458
var path = Path.Combine(
_workspace
.Path, "not-a-directory");
468
Directory.GetFileSystemEntries(
_workspace
.Path).Select(Path.GetFileName).Order(StringComparer.Ordinal));
483
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
494
Assert.Equal(text, await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "ci-analysis-output", "proposal.json")));
506
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
521
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
535
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
550
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
570
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
580
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
618
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
632
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
663
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
684
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
706
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
734
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
754
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
786
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
813
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
848
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
867
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
870
using var analysis = JsonDocument.Parse(AnalyzeCiFailure.CiFailureJson.Serialize(AnalyzeCiFailureFixtures.Validate(
_workspace
.Path).Report));
899
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
934
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
937
using var analysis = JsonDocument.Parse(AnalyzeCiFailure.CiFailureJson.Serialize(AnalyzeCiFailureFixtures.Validate(
_workspace
.Path).Report));
961
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
982
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
1003
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
1022
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
1042
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
1062
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
1085
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
1104
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
1127
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
1159
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
1186
AnalyzeCiFailureFixtures.Write(
_workspace
.Path);
1187
await File.WriteAllTextAsync(Path.Combine(
_workspace
.Path, "ci-analysis-output", "causes", "unreferenced.json"), "not-json");
1188
var result = await RunValidatorCommandAsync(["validate", "--repo", "microsoft/aspire", "--working-dir",
_workspace
.Path,
1189
"--analysis-dir", Path.Combine(
_workspace
.Path, "ci-analysis-output")]);
1220
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
1237
AnalyzeCiFailureFixtures.Write(
_workspace
.Path);
1240
var result = await RunValidatorCommandAsync(["validate", "--repo", "microsoft/aspire", "--working-dir",
_workspace
.Path,
1241
"--analysis-dir", Path.Combine(
_workspace
.Path, "ci-analysis-output")]);
1262
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
1312
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
1365
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
1448
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
1451
using var sanitized = JsonDocument.Parse(AnalyzeCiFailure.CiFailureJson.Serialize(AnalyzeCiFailureFixtures.Validate(
_workspace
.Path).Report));
1477
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
1497
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
1556
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
1572
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
1598
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
1637
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
1672
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
1676
Assert.Single(AnalyzeCiFailureFixtures.Validate(
_workspace
.Path).Causes).Definition));
1699
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
1730
var causePath = Path.Combine(
_workspace
.Path, "ci-analysis-output", "causes", "nuget-timeout.json");
1731
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
1750
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
1770
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
1794
var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(
_workspace
.Path);
1836
var analysisPath = Path.Combine(
_workspace
.Path, "analysis.json");
1837
var trustedJobsPath = Path.Combine(
_workspace
.Path, "failed-jobs.json");
1861
var analysisPath = Path.Combine(
_workspace
.Path, "analysis.json");
1862
var trustedJobsPath = Path.Combine(
_workspace
.Path, "failed-jobs.json");
1905
var analysisPath = Path.Combine(
_workspace
.Path, "analysis.json");
1906
var trustedJobsPath = Path.Combine(
_workspace
.Path, "failed-jobs.json");
2102
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
2153
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
2176
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
2195
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
2223
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
2244
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
2257
var causePath = Path.Combine(
_workspace
.Path, "main-build-break.json");
2258
var runContextPath = Path.Combine(
_workspace
.Path, "run-context.json");
2259
var lastSuccessfulRunPath = Path.Combine(
_workspace
.Path, "last-successful-main-run.json");
2260
var triggeringMergePath = Path.Combine(
_workspace
.Path, "triggering-merge-pr.json");
2261
var candidateHistoryStatusPath = Path.Combine(
_workspace
.Path, "candidate-merge-history-status.json");
2262
var bodyPath = Path.Combine(
_workspace
.Path, "issue-body.md");
2263
var metadataPath = Path.Combine(
_workspace
.Path, "issue-metadata.json");
2338
var causePath = Path.Combine(
_workspace
.Path, "main-build-break.json");
2339
var runContextPath = Path.Combine(
_workspace
.Path, "run-context.json");
2340
var lastSuccessfulRunPath = Path.Combine(
_workspace
.Path, "last-successful-main-run.json");
2341
var triggeringMergePath = Path.Combine(
_workspace
.Path, "triggering-merge-pr.json");
2342
var candidateHistoryStatusPath = Path.Combine(
_workspace
.Path, "candidate-merge-history-status.json");
2343
var bodyPath = Path.Combine(
_workspace
.Path, "issue-body.md");
2344
var metadataPath = Path.Combine(
_workspace
.Path, "issue-metadata.json");
2416
var causePath = Path.Combine(
_workspace
.Path, "flaky-failure.json");
2417
var bodyPath = Path.Combine(
_workspace
.Path, "issue-body.md");
2418
var metadataPath = Path.Combine(
_workspace
.Path, "issue-metadata.json");
2459
var archivePath = Path.Combine(
_workspace
.Path, "test-results.zip");
2465
var outputDirectory = Path.Combine(
_workspace
.Path, "extracted");
2479
var archivePath = Path.Combine(
_workspace
.Path, "test-results.zip");
2485
var outputDirectory = Path.Combine(
_workspace
.Path, "extracted");
2506
var archivePath = Path.Combine(
_workspace
.Path, "test-results.zip");
2511
var outputDirectory = Path.Combine(
_workspace
.Path, "extracted");
2524
var archivePath = Path.Combine(
_workspace
.Path, "test-results.zip");
2529
var outputDirectory = Path.Combine(
_workspace
.Path, "extracted");
2542
var archivePath = Path.Combine(
_workspace
.Path, "test-results.zip");
2547
var outputDirectory = Path.Combine(
_workspace
.Path, "extracted");
2570
var archivePath = Path.Combine(
_workspace
.Path, "test-results.zip");
2582
var outputDirectory = Path.Combine(
_workspace
.Path, "extracted");
2595
var archivePath = Path.Combine(
_workspace
.Path, "test-results.zip");
2600
var outputDirectory = Path.Combine(
_workspace
.Path, "extracted");
2613
var archivePath = Path.Combine(
_workspace
.Path, "test-results.zip");
2622
var outputDirectory = Path.Combine(
_workspace
.Path, "extracted");
2635
var artifactsPath = Path.Combine(
_workspace
.Path, "artifacts.json");
2649
var jobsPath = Path.Combine(
_workspace
.Path, "all-jobs.json");
2681
var artifactsPath = Path.Combine(
_workspace
.Path, "artifacts.json");
2702
var jobsPath = Path.Combine(
_workspace
.Path, "all-jobs.json");
2737
var artifactsPath = Path.Combine(
_workspace
.Path, "artifacts.json");
2739
var jobsPath = Path.Combine(
_workspace
.Path, "all-jobs.json");
2764
var artifactsPath = Path.Combine(
_workspace
.Path, "artifacts.json");
2776
var jobsPath = Path.Combine(
_workspace
.Path, "all-jobs.json");
2805
var artifactsPath = Path.Combine(
_workspace
.Path, "artifacts.json");
2833
var jobsPath = Path.Combine(
_workspace
.Path, "all-jobs.json");
2876
var artifactsPath = Path.Combine(
_workspace
.Path, "artifacts.json");
2878
var jobsPath = Path.Combine(
_workspace
.Path, "all-jobs.json");
2908
var artifactsPath = Path.Combine(
_workspace
.Path, "artifacts.json");
2910
var jobsPath = Path.Combine(
_workspace
.Path, "all-jobs.json");
2940
var artifactsPath = Path.Combine(
_workspace
.Path, "artifacts.json");
2942
var jobsPath = Path.Combine(
_workspace
.Path, "all-jobs.json");
2972
var artifactsPath = Path.Combine(
_workspace
.Path, "artifacts.json");
2986
var jobsPath = Path.Combine(
_workspace
.Path, "all-jobs.json");
3021
var testResultsDirectory = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "test-results"));
3040
var jobsPath = Path.Combine(
_workspace
.Path, "all-jobs.json");
3046
var outputPath = Path.Combine(
_workspace
.Path, "test-failures.json");
3062
var testResultsDirectory = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "test-results"));
3075
var jobsPath = Path.Combine(
_workspace
.Path, "all-jobs.json");
3079
var outputPath = Path.Combine(
_workspace
.Path, "test-failures.json");
3091
var testResultsDirectory = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "test-results"));
3104
var jobsPath = Path.Combine(
_workspace
.Path, "all-jobs.json");
3108
var outputPath = Path.Combine(
_workspace
.Path, "test-failures.json");
3120
var testResultsDirectory = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "test-results"));
3139
var jobsPath = Path.Combine(
_workspace
.Path, "all-jobs.json");
3143
var outputPath = Path.Combine(
_workspace
.Path, "test-failures.json");
3156
var testResultsDirectory = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "test-results"));
3158
var jobsPath = Path.Combine(
_workspace
.Path, "all-jobs.json");
3162
var outputPath = Path.Combine(
_workspace
.Path, "test-failures.json");
3174
var testResultsDirectory = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "test-results"));
3179
var jobsPath = Path.Combine(
_workspace
.Path, "all-jobs.json");
3183
var outputPath = Path.Combine(
_workspace
.Path, "test-failures.json");
3199
var testResultsDirectory = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "test-results"));
3212
var jobsPath = Path.Combine(
_workspace
.Path, "all-jobs.json");
3216
var outputPath = Path.Combine(
_workspace
.Path, "test-failures.json");
3236
var testResultsDirectory = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "test-results"));
3240
var jobsPath = Path.Combine(
_workspace
.Path, "all-jobs.json");
3244
var outputPath = Path.Combine(
_workspace
.Path, "test-failures.json");
3264
var testResultsDirectory = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "test-results"));
3266
var jobsPath = Path.Combine(
_workspace
.Path, "all-jobs.json");
3270
var outputPath = Path.Combine(
_workspace
.Path, "test-failures.json");
3290
var testResultsDirectory = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "test-results"));
3300
var jobsPath = Path.Combine(
_workspace
.Path, "all-jobs.json");
3304
var outputPath = Path.Combine(
_workspace
.Path, "test-failures.json");
3335
var openIssuesPath = Path.Combine(
_workspace
.Path, "open-issues.json");
3336
var closedIssuesPath = Path.Combine(
_workspace
.Path, "closed-issues.json");
3418
var responses = Path.Combine(
_workspace
.Path, "comments.json");
3452
var callLogPath = Path.Combine(
_workspace
.Path, "gh-calls.log");
3463
var openIssuesPath = Path.Combine(
_workspace
.Path, "open-issues.json");
3464
var closedIssuesPath = Path.Combine(
_workspace
.Path, "closed-issues.json");
3505
Path.Combine(
_workspace
.Path, "last-success.json"));
3508
using var output = JsonDocument.Parse(await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "last-success.json")));
3511
Assert.Contains("per_page=100", await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "gh-calls.log")), StringComparison.Ordinal);
3513
await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "gh-calls.log")),
3539
var outputPath = Path.Combine(
_workspace
.Path, "last-success.json");
3574
var outputPath = Path.Combine(
_workspace
.Path, "last-success.json");
3581
await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "gh-calls.log")),
3609
var outputPath = Path.Combine(
_workspace
.Path, "last-success.json");
3617
await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "gh-calls.log")),
3639
Path.Combine(
_workspace
.Path, "last-success.json"));
3657
Path.Combine(
_workspace
.Path, "last-success.json"));
3684
Path.Combine(
_workspace
.Path, "last-success.json"));
3687
using var output = JsonDocument.Parse(await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "last-success.json")));
3689
Assert.True(int.Parse(await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "gh-call-count"))) >= 2);
3691
(await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "gh-calls.log")))
3718
Path.Combine(
_workspace
.Path, "last-success.json"));
3721
using var output = JsonDocument.Parse(await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "last-success.json")));
3723
Assert.Equal(2, int.Parse(await File.ReadAllTextAsync(Path.Combine(
_workspace
.Path, "gh-call-count"))));
3726
(await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "gh-calls.log")))
3739
Path.Combine(
_workspace
.Path, "last-success.json"));
3752
var candidatesPath = Path.Combine(
_workspace
.Path, "candidate-merges.json");
3753
var statusPath = Path.Combine(
_workspace
.Path, "candidate-merge-history-status.json");
3773
var candidatesPath = Path.Combine(
_workspace
.Path, "candidate-merges.json");
3774
var statusPath = Path.Combine(
_workspace
.Path, "candidate-merge-history-status.json");
3817
var candidatesPath = Path.Combine(
_workspace
.Path, "candidate-merges.json");
3818
var statusPath = Path.Combine(
_workspace
.Path, "candidate-merge-history-status.json");
3866
var candidatesPath = Path.Combine(
_workspace
.Path, "candidate-merges.json");
3867
var statusPath = Path.Combine(
_workspace
.Path, "candidate-merge-history-status.json");
3878
var ghCalls = await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "gh-calls.log"));
3926
var candidatesPath = Path.Combine(
_workspace
.Path, "candidate-merges.json");
3927
var statusPath = Path.Combine(
_workspace
.Path, "candidate-merge-history-status.json");
3938
await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "gh-calls.log")),
3967
var candidatesPath = Path.Combine(
_workspace
.Path, "candidate-merges.json");
3968
var statusPath = Path.Combine(
_workspace
.Path, "candidate-merge-history-status.json");
4011
var candidatesPath = Path.Combine(
_workspace
.Path, "candidate-merges.json");
4012
var statusPath = Path.Combine(
_workspace
.Path, "candidate-merge-history-status.json");
4051
var candidatesPath = Path.Combine(
_workspace
.Path, "candidate-merges.json");
4052
var statusPath = Path.Combine(
_workspace
.Path, "candidate-merge-history-status.json");
4094
var outputPath = Path.Combine(
_workspace
.Path, "persisted-main.json");
4152
var outputPath = Path.Combine(
_workspace
.Path, $"persisted-{historyState}.json");
4193
var outputPath = Path.Combine(
_workspace
.Path, "persisted-pr.json");
4246
var outputPath = Path.Combine(
_workspace
.Path, "persisted-pr.json");
4278
var outputPath = Path.Combine(
_workspace
.Path, "persisted-pr.json");
4321
var causePath = Path.Combine(
_workspace
.Path, "prior-cause.json");
4359
var metadataPath = Path.Combine(
_workspace
.Path, "metadata.json");
4389
var diagnosticsPath = Path.Combine(
_workspace
.Path, "diagnostics.json");
4410
var logPath = Path.Combine(
_workspace
.Path, "job.log");
4461
var inputPath = Path.Combine(
_workspace
.Path, "job.log");
4462
var outputPath = Path.Combine(
_workspace
.Path, "sanitized.log");
4475
var inputPath = Path.Combine(
_workspace
.Path, "job.log");
4476
var outputPath = Path.Combine(
_workspace
.Path, "sanitized.log");
4493
var causePath = Path.Combine(
_workspace
.Path, "cause.json");
4494
var bodyPath = Path.Combine(
_workspace
.Path, "issue-body.md");
4495
var metadataPath = Path.Combine(
_workspace
.Path, "issue-metadata.json");
4557
var analysisPath = Path.Combine(
_workspace
.Path, "analysis.json");
4558
var trustedJobsPath = Path.Combine(
_workspace
.Path, "failed-jobs.json");
4614
var currentBodyPath = Path.Combine(
_workspace
.Path, "current-body.md");
4615
var outputPath = Path.Combine(
_workspace
.Path, "updated-body.md");
4656
var currentBodyPath = Path.Combine(
_workspace
.Path, "current-body.md");
4657
var canonicalBodyPath = Path.Combine(
_workspace
.Path, "canonical-body.md");
4658
var outputPath = Path.Combine(
_workspace
.Path, "updated-body.md");
4775
var currentBodyPath = Path.Combine(
_workspace
.Path, "current-body.md");
4776
var outputPath = Path.Combine(
_workspace
.Path, "updated-body.md");
4824
var currentBodyPath = Path.Combine(
_workspace
.Path, "current-body.md");
4825
var outputPath = Path.Combine(
_workspace
.Path, "updated-body.md");
4859
var currentBodyPath = Path.Combine(
_workspace
.Path, "current-body.md");
4860
var firstOutputPath = Path.Combine(
_workspace
.Path, "first-output.md");
4861
var secondOutputPath = Path.Combine(
_workspace
.Path, "second-output.md");
4917
var causePath = Path.Combine(
_workspace
.Path, "cause.json");
4918
var bodyPath = Path.Combine(
_workspace
.Path, "issue-body.md");
4919
var metadataPath = Path.Combine(
_workspace
.Path, "issue-metadata.json");
4953
var causePath = Path.Combine(
_workspace
.Path, "cause.json");
4954
var runContextPath = Path.Combine(
_workspace
.Path, "run-context.json");
4955
var lastSuccessfulPath = Path.Combine(
_workspace
.Path, "last-successful.json");
4956
var triggeringMergePath = Path.Combine(
_workspace
.Path, "triggering-merge.json");
4957
var candidateHistoryStatusPath = Path.Combine(
_workspace
.Path, "candidate-merge-history-status.json");
4958
var bodyPath = Path.Combine(
_workspace
.Path, "issue-body.md");
4959
var metadataPath = Path.Combine(
_workspace
.Path, "issue-metadata.json");
5000
var trustedJobsPath = Path.Combine(
_workspace
.Path, "failed-jobs.json");
5001
var buildCausePath = Path.Combine(
_workspace
.Path, "build-cause.json");
5002
var testCausePath = Path.Combine(
_workspace
.Path, "test-cause.json");
5003
var multiJobCausePath = Path.Combine(
_workspace
.Path, "multi-job-cause.json");
5043
var buildBodyPath = Path.Combine(
_workspace
.Path, "build-body.md");
5044
var buildMetadataPath = Path.Combine(
_workspace
.Path, "build-metadata.json");
5045
var testBodyPath = Path.Combine(
_workspace
.Path, "test-body.md");
5046
var testMetadataPath = Path.Combine(
_workspace
.Path, "test-metadata.json");
5105
AnalyzeCiFailureFixtures.Write(
_workspace
.Path);
5112
["validate", "--repo", "microsoft/aspire", "--working-dir",
_workspace
.Path,
5113
"--analysis-dir", Path.Combine(
_workspace
.Path, "ci-analysis-output")]);
5132
var analysis = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "ci-analysis-output")).FullName;
5135
return await RunValidatorCommandAsync(["validate", "--repo", "microsoft/aspire", "--working-dir",
_workspace
.Path, "--analysis-dir", analysis]);
5144
var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "fake-bin")).FullName;
5151
["GH_CALL_LOG"] = Path.Combine(
_workspace
.Path, "gh-calls.log"),
5152
["GH_CALL_COUNT_FILE"] = Path.Combine(
_workspace
.Path, "gh-call-count"),
5166
var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "fake-bin")).FullName;
5173
["GH_CALL_LOG"] = Path.Combine(
_workspace
.Path, "gh-calls.log"),
5188
var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, $"fake-bin-{Guid.NewGuid():N}")).FullName;
5217
var analysisDirectory = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "ci-analysis-output")).FullName;
5236
Path.Combine(
_workspace
.Path, "ci-analysis-output", "analysis-result.json"))!;
5258
=> new((await File.ReadAllLinesAsync(Path.Combine(
_workspace
.Path, "http-requests.jsonl")))
5263
var http = new HttpClient(new AnalyzeCiFailure.TestServices.GitHubFixtureHandler(
_workspace
.Path, environment));
5285
process.StartInfo.WorkingDirectory = workingDirectory ??
_workspace
.Path;
5291
process.StartInfo.Environment["GITHUB_STEP_SUMMARY"] = Path.Combine(
_workspace
.Path, "step-summary");
5341
var directory = workingIndex >= 0 && workingIndex + 1 < arguments.Count ? arguments[workingIndex + 1] :
_workspace
.Path;
5342
return [.. arguments, "--evidence-dir", directory ==
_workspace
.Path ? EvidenceDirectory : Path.Combine(directory, "ci-failure-analysis", "evidence")];
5354
var analysisDirectory = Path.Combine(
_workspace
.Path, "ci-analysis-output");
5423
var causesDirectory = Directory.CreateDirectory(Path.Combine(
_workspace
.Path, "ci-analysis-output", "causes")).FullName;
5432
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));
5443
var result = await RunValidationScriptAsync(Path.Combine(
_workspace
.Path, "output.json"));