Skip to content

Fix/bowl copilot fixes and tests - #285

Closed
JusterZhu wants to merge 3 commits into
masterfrom
fix/bowl-copilot-fixes-and-tests
Closed

Fix/bowl copilot fixes and tests#285
JusterZhu wants to merge 3 commits into
masterfrom
fix/bowl-copilot-fixes-and-tests

Conversation

@JusterZhu

Copy link
Copy Markdown
Collaborator

No description provided.

JusterZhu added 3 commits May 23, 2026 17:47
- BowlCrashPipelineTests: simulates full crash -> dump -> report -> callback flow
- MockCrashStrategy writes fake dump file, real CrashReporter creates JSON
- Verifies DumpCaptured, file existence, report content, OnCrash callback data
- Tests Normal mode (no restore) and healthy exit (no crash) scenarios
- Added InternalsVisibleTo to Bowl.csproj for test access to internal DI constructor
- Outputs all file paths and report contents via ITestOutputHelper for inspection
…FILES=1

Dispose() now skips cleanup when Debugger.IsAttached or KEEP_FILES env=1,
so developers can inspect dump files and crash reports on disk.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the GeneralUpdate.Bowl project to make internal APIs accessible to the Bowl test project and adds a new end-to-end integration test suite that simulates crash/dump/report behavior without requiring procdump.

Changes:

  • Added InternalsVisibleTo for BowlTest in GeneralUpdate.Bowl to enable testing internal constructors/providers.
  • Added BowlCrashPipelineTests integration tests to validate dump/report generation, restore behavior, and the OnCrash callback using mock strategies/providers.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
src/c#/GeneralUpdate.Bowl/GeneralUpdate.Bowl.csproj Adds InternalsVisibleTo to allow BowlTest to access internal APIs.
src/c#/BowlTest/Integration/BowlCrashPipelineTests.cs Adds new crash-pipeline integration tests with mock strategies/providers that write real artifacts to temp folders.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<ItemGroup>
<Folder Include="Common\" />
</ItemGroup>
<ItemGroup>
Comment on lines +249 to +257
};

var bowl = CreateBowl(mockStrategy);
var result = await bowl.LaunchAsync(context);

_output.WriteLine($"Healthy — Success: {result.Success}, DumpCaptured: {result.DumpCaptured}");

Assert.False(result.DumpCaptured, "No dump should be captured for healthy process");
Assert.Equal(0, result.ExitCode);
Comment on lines +276 to +280

public MockCrashStrategy(string dumpPath, IReadOnlyList<string> outputLines)
{
_dumpPath = dumpPath;
_outputLines = outputLines;
Comment on lines +290 to +294
FileName = "cmd.exe",
Arguments = "/c exit 0",
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false,
Comment on lines +315 to +319
FileName = "cmd.exe",
Arguments = "/c exit 0",
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false,
@JusterZhu JusterZhu closed this May 23, 2026
@JusterZhu
JusterZhu deleted the fix/bowl-copilot-fixes-and-tests branch May 23, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants