Truncate or omit step summary when approaching GitHub's 1 MiB limit#68
Merged
Truncate or omit step summary when approaching GitHub's 1 MiB limit#68
Conversation
Agent-Logs-Url: https://github.com/Tyrrrz/GitHubActionsTestLogger/sessions/ed77b876-3a45-4577-8b30-61c8980191c7 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Improve user experience for large step summaries
Truncate or omit step summary when approaching GitHub's 1 MiB limit
Mar 27, 2026
Tyrrrz
reviewed
Mar 27, 2026
… test renames Agent-Logs-Url: https://github.com/Tyrrrz/GitHubActionsTestLogger/sessions/68ebcb2c-85d9-436d-8323-ec3a8011db8a Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Tyrrrz
reviewed
Mar 27, 2026
GitHubActionsTestLogger.Tests/Utils/Extensions/FileExtensions.cs
Outdated
Show resolved
Hide resolved
Agent-Logs-Url: https://github.com/Tyrrrz/GitHubActionsTestLogger/sessions/780c1f57-24ee-46bb-8b07-11dd55df4ab3 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Tyrrrz
reviewed
Mar 28, 2026
GitHubActionsTestLogger.Tests/Utils/Extensions/FileExtensions.cs
Outdated
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## prime #68 +/- ##
==========================================
- Coverage 84.44% 84.42% -0.03%
==========================================
Files 23 23
Lines 733 796 +63
Branches 86 97 +11
==========================================
+ Hits 619 672 +53
- Misses 60 64 +4
- Partials 54 60 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Tyrrrz
reviewed
Mar 28, 2026
GitHubActionsTestLogger.Tests/Utils/Extensions/FileExtensions.cs
Outdated
Show resolved
Hide resolved
…onKind, simplify TryTruncateSummary, MTP tests Agent-Logs-Url: https://github.com/Tyrrrz/GitHubActionsTestLogger/sessions/5e671f3d-6979-487c-8f65-bc095c213334 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Tyrrrz
reviewed
Mar 28, 2026
GitHubActionsTestLogger.Tests/Utils/Extensions/FileExtensions.cs
Outdated
Show resolved
Hide resolved
Agent-Logs-Url: https://github.com/Tyrrrz/GitHubActionsTestLogger/sessions/a5ac786e-356f-45f8-81a8-eb15a167e490 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
This was referenced Apr 6, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CreateSummaryAsyncsummaryWriter as StreamWriter→BaseStream→ContentionTolerantWriteFileStream.FilePathorFileStream.NameFilePathauto-property toContentionTolerantWriteFileStreamFileExtensions.WriteAllZeroesextension (C# 14) without buffer allocationBuildSummaryTruncatedWarningandBuildSummaryOmittedWarningat call sitesFile.ReadAllBytes(path, int offset)extension method using stream seekingTempFileutility class; use it in truncation tests instead of try/finallyGitHubAnnotationKindenum in its own file (GitHubAnnotationKind.cs)string.IsNullOrWhiteSpacechecksavailableBytes→availableSizeCreateErrorAnnotationAsyncandCreateWarningAnnotationAsyncto async arrow methodskind.ToString().ToLowerInvariant()instead of switch expressionTryTruncateSummary→ inlined truncation at UTF-8 byte boundary inCreateSummaryAsyncSummaryFileSizeLimitconstant toGitHubEnvironmentCreateAnnotationAsyncabove the methods that call itFileStreamdisposal in MTP and VsTest truncation tests.ContainAll()for multi-string assertions in truncation testsawait summaryWriter.FlushAsync()in MTP testsFile.Open(...)instead ofnew FileStream(...)in all four truncation testsMath.Minfor available-size clamping instead of ternaryFile.ReadAllBytesextension to useFileShare.ReadWrite(prevents Windows file locking error when the summary file is still held open by the writer)Original prompt
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.