Repository navigation
fix: normalize blank runs when stripping legacy managed markers - #678
Merged
Merged
Conversation
The legacy templates carried an unclosed config-aware-policy flag; stripping it left the blank line it occupied behind, producing double blank lines that oxfmt collapses — and that collapse failed format:check on every pre-block consumer's upgrade PR (pi-autosuggestions #81 was the first). After stripping residue, collapse runs of three or more newlines to one blank line, matching what the format gate enforces. The strip itself keeps its original line-scoped regex; paired blocks keep their spacing.
0xPlayerOne
marked this pull request as ready for review
September 30, 2026 18:58
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.
Why
The legacy policy templates carried an unclosed
config-aware-policyflag. When the v1.37.0 refresh strips that residue, it removed only the marker line — leaving the blank line it occupied behind, producing double blank lines that oxfmt collapses. Net effect: every pre-block consumer's upgrade PR failed format:check (pi-autosuggestions #81 was the first; the whole pre-block fleet would have hit it).What
After stripping residue, collapse runs of three or more newlines to one blank line — matching exactly what the format gate enforces. The strip keeps its original line-scoped regex; paired blocks keep their spacing. The migration regression test gains the no-triple-newline invariant.
Validation
Follow-up to #668 / #667.