fix(stack): escape the HTML-comment delimiters in the revision marker - #1791
Merged
Conversation
The revision-data marker rides inside `<!-- … -->`, and a renderer closes an HTML comment at the first `-->`. A revision reason quoting one ended the marker early and spilled the remaining JSON into the pull request comment as visible text. The serialised payload now carries `--\u003e` and `\u003c!--` in place of `-->` and `<!--`. Both decode to the same string, so the read path round-trips them and markers written before the escape still parse. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Dvc1azYyfKXLf43Qkusm1r Change-Id: I1eb8bd9c7a32cb8aba6e2fbe0482d3eb3d6ebb22
Contributor
Merge Protections🟢 All 6 merge protections satisfied — ready to merge. Show 6 satisfied protections🟢 🤖 Continuous Integration
🟢 👀 Review Requirements
🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 🔎 Reviews
🟢 📕 PR description
🟢 🚦 Auto-queueWhen all merge protections are satisfied, this pull request will be queued automatically. |
There was a problem hiding this comment.
Pull request overview
This PR hardens the mergify stack revision-history “machine marker” (<!-- mergify-revision-data: … -->) so that user-provided revision reasons cannot prematurely terminate the surrounding HTML comment and leak the remainder of the JSON payload into the rendered GitHub PR comment.
Changes:
- Adds a serialization post-pass that rewrites embedded
-->/<!--sequences inside the marker JSON into JSON-unicode escapes (--\u003e,\u003c!--) while preserving round-trip decoding. - Applies the escaping when generating the marker line.
- Adds a regression test covering a reason that contains an embedded HTML comment delimiter.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
JulianMaurin
marked this pull request as ready for review
August 27, 2026 08:30
jd
approved these changes
Aug 27, 2026
remyduthu
approved these changes
Aug 27, 2026
Contributor
Merge Queue Status
This pull request spent 1 minute 6 seconds in the queue, including 10 seconds running CI. Required conditions to merge
|
mergify
Bot
deleted the
devs/JulianMaurin/fix/revision-marker-html-comment-escape/escape-html-comment-delimiters-revision-marker--1eb8bd9c
branch
August 27, 2026 10:50
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.
The revision-data marker rides inside
<!-- … -->, and a renderercloses an HTML comment at the first
-->. A revision reason quotingone ended the marker early and spilled the remaining JSON into the
pull request comment as visible text.
The serialised payload now carries
--\u003eand\u003c!--in place of
-->and<!--. Both decode to the same string, so theread path round-trips them and markers written before the escape
still parse.
Co-Authored-By: Claude Opus 5 (1M context) [email protected]
Claude-Session: https://claude.ai/code/session_01Dvc1azYyfKXLf43Qkusm1r