Skip to content

Render review summaries that the skill wrapped in a code block - #52

Merged
matthewp merged 1 commit into
mainfrom
fix/review-summary-fence
Oct 5, 2026
Merged

matthewp merged 1 commit into
mainfrom
fix/review-summary-fence

Conversation

@matthewp

@matthewp matthewp commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Fixes Factory reviews rendering as one big code block (every review on Deduplicate CSS for components used both statically and with client:only on the same page astro#18176). withastro/astro's astro-code-review skill asks for the report "as raw, unrendered Markdown inside a single fenced code block", which suits copying a report by hand. The reviewer carried that plain ``` fence into its submitted summary, and containModelMarkdown only unwrapped fences tagged md/markdown.
  • containModelMarkdown now takes unwrapPlainFence, which also strips a plain fence around the whole value. Only whole summaries use it (review summaries and author round summaries). Finding bodies and thread replies keep a plain fenced snippet intact, since there it's usually real code.
  • The reviewer prompt now says the summary is published as rendered Markdown and must not be wrapped in a code block, even if the skill asks for one. That covers other repositories' skills with similar report formats.

Testing

  • tests/review-markdown.test.ts: a plain fence around a whole summary is unwrapped when asked (backticks and tildes); a plain fenced snippet is kept by default; a plain fence that doesn't wrap the whole value is kept.
  • tests/review-diff.test.ts: formatReviewBody renders a summary shaped like the #18176 reviews as headings below the verdict notice, with no code fence.

Docs

  • No docs update needed.

withastro/astro's astro-code-review skill asks for the report "as raw,
unrendered Markdown inside a single fenced code block" (meant for copying
into a comment by hand). The reviewer carried that plain ``` fence into the
submitted summary, and containModelMarkdown only unwrapped ```md/```markdown
fences, so every review on withastro/astro#18176 rendered as one code block.

- containModelMarkdown takes unwrapPlainFence, used for whole review and
  author round summaries only; finding bodies and replies keep plain fenced
  snippets intact.
- The reviewer prompt says the summary is rendered Markdown and must not be
  wrapped in a code block, even if the skill says so.
@matthewp
matthewp merged commit 3f2066e into main Oct 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant