Read the roster lock the same on either line ending - #47
Merged
Conversation
Found by merging on a Windows checkout, where git writes CRLF. JavaScript counts a carriage return as a line terminator, so the dot in `/#.*$/` will not cross one and `$` cannot assert an end after one. The comment stripper matched nothing, and the gate reported all three comment lines of PROTOCOL-ROSTER.lock as protocols that had disappeared: # Every protocol id this explorer has published. is in PROTOCOL-ROSTER.lock but no longer in the pinned manifest. Linux CI never saw it, because Linux checkouts are LF, so the gate would have stayed green while being unusable for anyone developing on Windows. The lock is normalised before it is parsed, the way every other file this gate reads already is, and a case renders the lock with CRLF and asserts the same answer as LF. Co-Authored-By: Claude Opus 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.
Found within minutes of #40 merging, by merging a branch on this Windows checkout where git writes CRLF.
JavaScript counts a carriage return as a line terminator. The dot in
/#.*$/will not cross one, and$without the multiline flag cannot assert an end after one, so on a CRLF checkout the comment stripper matched nothing and every comment line was read as a protocol id that had gone missing.Linux CI never sees it, because Linux checkouts are LF. So the gate would have stayed green forever while being unusable for anyone developing on Windows, which is where this repository is developed.
The lock is now normalised before it is parsed, the way every other file this gate reads already is. One case renders the lock with CRLF and asserts the same answer as LF. 25 cases pass.
🤖 Generated with Claude Code