Repository navigation
Match the group marker only at the start of the body; cap each field - #2
Merged
Merged
Conversation
Alert text is written inside fences, but a fence does not stop a substring match: an alert quoting another group's marker made that group's updates and closure land on this issue. body() always writes the marker first, so require it there. Header fields (group labels, common annotations, the URL) were not counted against the size cap, so one huge annotation could push the body past GitHub's limit and the issue would never be created. Each fenced value is now capped at 8000 characters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fence was sized from the untruncated content, so a field of 200,000 backticks produced a 200,001-backtick fence and a body far over GitHub's limit. Truncate first, and shorten any run over 10 backticks to 10, so a fence is at most 11 characters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Requested by Andrew · project thread
Two hardening fixes found in review before the first release:
Marker matching. An open issue was found by
strings.Contains(body, marker). Alert text inside the fence could quote another group's marker and capture its updates and its closure.body()always writes the marker first, so the match now requires it at the start.TestQuotedMarkerDoesNotCaptureAnotherGroupfails with the old match.Size cap. Header fields were not counted against the cap, so one huge annotation could push the body past GitHub's 65,536-character limit and the issue would never be created. Each fenced value is now capped at 8,000 characters (
TestHugeHeaderStillUnderLimit).Backtick flood. The fence was sized from untruncated content, so a field of 200,000 backticks made a 200,001-backtick fence. Content is now truncated first and runs over 10 backticks are shortened to 10 (
TestBacktickFloodStaysBounded).🤖 Generated with Claude Code