Repository navigation
Comment the semantic diff on the pull request as Markdown - #8958
Conversation
The Semantic Diff workflow now comments each pull request's commit records drawn as GitHub Markdown, with the page's link: code, trees, matrices, mappings and reanalyze reports as unified diffs, typing rules as math. Past a size budget the largest commits leave their forms to the page. Area: ci docs Changelog: none Output: unchanged Tests: +scripts/recordMarkdown.test.js Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AzPS5F8RDSGZ6dhfK6NdZp Signed-off-by: Christoph Knittel <ck@cca.io>
rescript
@rescript/belt
@rescript/darwin-arm64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
|
Developer playground preview: https://rescript-lang.github.io/rescript/dev-playground/?version=pr-8958 |
The "with …" line closing each commit moves next to the author, on the page and in the comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AzPS5F8RDSGZ6dhfK6NdZp Signed-off-by: Christoph Knittel <ck@cca.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AzPS5F8RDSGZ6dhfK6NdZp Signed-off-by: Christoph Knittel <ck@cca.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AzPS5F8RDSGZ6dhfK6NdZp Signed-off-by: Christoph Knittel <ck@cca.io>
Semantic Diff4 commits · Full page Comment the semantic diff on the pull request as Markdownde79800 · Christoph Knittel with Claude Opus 5.5 · Oct 22, 2026 The Semantic Diff workflow now comments each pull request's commit records drawn as GitHub Markdown, with the page's link: code, trees, matrices, mappings and reanalyze reports as unified diffs, typing rules as math. Past a size budget the largest commits leave their forms to the page. Show co-authors on the identity line902b201 · Christoph Knittel with Claude Opus 5.5 · Oct 22, 2026 The "with …" line closing each commit moves next to the author, on the page and in the comment. Head the comment with the commit count and a link to the full page9c54137 · Christoph Knittel with Claude Opus 5.5 · Oct 22, 2026 Head the page with the commit count alone12a8468 · Christoph Knittel with Claude Opus 5.5 · Oct 22, 2026 |
After a push that keeps the previous head, the comment draws the commits it added; after a force push, or when the pull request is opened, every commit. Each push gets its own comment; the page still shows all commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AzPS5F8RDSGZ6dhfK6NdZp Signed-off-by: Christoph Knittel <ck@cca.io>
Semantic Diff1 new commit · Full page Comment only the commits a push addedfc685e1 · Christoph Knittel with Claude Opus 5.5 · Oct 22, 2026 After a push that keeps the previous head, the comment draws the commits it added; after a force push, or when the pull request is opened, every commit. Each push gets its own comment; the page still shows all commits. |
|
Example: this is how the new comment renders a real commit with rich records: 798978d from #8905 (Pexp_spread), which shows a parse-tree diff, a typed tree added in After only, and a formatter diff. It's the comment the workflow posted on the test PR #8959, which puts #8905's commit on top of this branch. Below the line is the generated Markdown, unchanged. Semantic Diff1 commit · Full page Represent array and list literals with spreads with a Pexp_spread node798978d · Christoph Knittel with Claude Opus 5.5 · Oct 18, 2026
Pexp_spread keeps the items and spreads in source order, and the type checker gives it a Texp_spread node. Translation emits new Parray_spread and Plist_spread primitives that compile to the same runtime calls. A list literal whose only spread is its tail stays a chain of ::. The parsetree and CMT magic numbers are bumped. AST modified (array literal with a spread) let x = [1, ...ys]
expression
- Pexp_apply
- expression
- attribute "res.spread"
- Pexp_ident "Primitive_array.spread"
- <arg>
- Nolabel
+ Pexp_spread array
+ Pspread_item
expression
- Pexp_array
- expression
- Pexp_array
- expression
- Pexp_constant PConst_int (1,None)
- expression
- Pexp_ident "ys"
+ Pexp_constant PConst_int (1,None)
+ Pspread
+ expression
+ Pexp_ident "ys"Typedtree added (Texp_spread) let ys = [2]
let x = [1, ...ys]
Format modified (literals with spreads) let x = [...[1, 2], 3, ...[]]
let y = @attr list{...xs, ...list{}, 1}
-let x = [1, 2, 3, ]
-let y = list{...xs, , 1}
+let x = [...[1, 2], 3, ...[]]
+let y = @attr list{...xs, ...list{}, 1}Review
|
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AzPS5F8RDSGZ6dhfK6NdZp Signed-off-by: Christoph Knittel <ck@cca.io>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fc685e124c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AzPS5F8RDSGZ6dhfK6NdZp Signed-off-by: Christoph Knittel <ck@cca.io>
|
@codex review |
Semantic Diff1 new commit (8 total) · Full page Require a description in every commit recordf652cdf · Christoph Knittel with Claude Opus 5.5 · Oct 22, 2026 The skill listed only the subject and Signed-off-by as required, and the expected line or two of prose sat under the object blocks' section, so a subject alone read as enough. It now requires a description, prose or a
|
The skill listed only the subject and Signed-off-by as required, and the expected line or two of prose sat under the object blocks' section, so a subject alone read as enough. It now requires a description, as prose or as a `Why:` section, and shows a small commit next to the full example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AzPS5F8RDSGZ6dhfK6NdZp Signed-off-by: Christoph Knittel <ck@cca.io>
f652cdf to
76c45d4
Compare
Semantic Diff8 commits · Full page Comment the semantic diff on the pull request as Markdownde79800 · Christoph Knittel with Claude Opus 5.5 · Oct 22, 2026 The Semantic Diff workflow now comments each pull request's commit records drawn as GitHub Markdown, with the page's link: code, trees, matrices, mappings and reanalyze reports as unified diffs, typing rules as math. Past a size budget the largest commits leave their forms to the page. Show co-authors on the identity line902b201 · Christoph Knittel with Claude Opus 5.5 · Oct 22, 2026 The "with …" line closing each commit moves next to the author, on the page and in the comment. Head the comment with the commit count and a link to the full page9c54137 · Christoph Knittel with Claude Opus 5.5 · Oct 22, 2026 Head the page with the commit count alone12a8468 · Christoph Knittel with Claude Opus 5.5 · Oct 22, 2026 Comment only the commits a push addedfc685e1 · Christoph Knittel with Claude Opus 5.5 · Oct 22, 2026 After a push that keeps the previous head, the comment draws the commits it added; after a force push, or when the pull request is opened, every commit. Each push gets its own comment; the page still shows all commits. Count all commits next to the new ones in the comment70798a2 · Christoph Knittel with Claude Opus 5.5 · Oct 22, 2026 Draw handles starting with a digit as code in the comment507e040 · Christoph Knittel with Claude Opus 5.5 · Oct 22, 2026 Require a description in every commit record76c45d4 · Christoph Knittel with Claude Opus 5.5 · Oct 22, 2026 The skill listed only the subject and Signed-off-by as required, and the expected line or two of prose sat under the object blocks' section, so a subject alone read as enough. It now requires a description, as prose or as a |
A paragraph wrapped so that a line starts with `Why:`, `Review:` or `Breaking:` was cut there into a section. Such a line now continues the paragraph, and those sections start after a blank line or another section; no message of this year parses differently. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AzPS5F8RDSGZ6dhfK6NdZp Signed-off-by: Christoph Knittel <ck@cca.io>
Semantic Diff1 new commit (9 total) · Full page Keep a section's name that prose wraps onto as prose4b538de · Christoph Knittel with Claude Opus 5.5 · Oct 22, 2026 A paragraph wrapped so that a line starts with |
cristianoc
left a comment
There was a problem hiding this comment.
I think we can tweak the PR info a little further but this is already great.
|
One opportunity we're missing is having an agent summarise rather than paste verbatim. Though not sure. That would require running an agent only for that in the cloud somewhere. |
Yes, we can discuss/develop that further in scope of #8910. |
A pull request's run takes the workflow from its merge into master but checked out the renderer from the branch, so a branch made before #8958 passed --markdown to a commitRecords.js that took it for a revision. The renderer now comes from the merge as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AzPS5F8RDSGZ6dhfK6NdZp Signed-off-by: Christoph Knittel <ck@cca.io>
Following feedback that the semantic diff would be nicer directly in the pull request: the Semantic Diff workflow's comment now holds the commit records themselves, drawn as GitHub Markdown, with the link to the full page at the top.
A comment can't carry the page's HTML (GitHub strips styles and classes), so each form is drawn in what GitHub renders natively:
```diffblock from the page's line alignment (red/green lines)… N unchanged findingsline```math(\dfracpremises/conclusion, rule name), Before and After side by side in a table, changed parts\color{red}/\color{green}rescript/jsblocks[!CAUTION]alert / listThe page keeps every commit, but each comment holds only the commits its push added (
--sincewithgithub.event.before, when that is an ancestor of the new head). When the pull request is opened or reopened, or after a force push, the comment holds every commit. Each push therefore gets its own comment (tagged by head, so a re-run updates it) instead of replacing the previous one. A push that adds only merge commits posts nothing. The comment is headedN commits · Full page, or after a push1 new commit (7 total) · Full page, the total left out when it equals the count; the page is headedN commits.Each commit is an open
<details>block. Prose is escaped for Markdown;@namewritten outside backticks (e.g.@react.component, or a handle starting with a digit such as@0x) is drawn as code so it doesn't mention a user; fences are longer than any backtick run in their content, since fork pull requests' messages are untrusted. A comment holds at most 65536 characters: past a 60000 budget the largest commits drop their forms (pointing to the page), then trailing commits are left out.scripts/recordMarkdown.jsreuses the parser and alignment fromrecordRender.js(now exported, with the form pairing, prose chunking and column widths factored out so both renderers share them; the page's output is unchanged).commitRecords.jstakes--markdown <file> --url <page>.Co-authors (from
Co-Authored-By:trailers) now sit on the identity line next to the author, on the page and in the comment, instead of a separate "with …" line closing each commit.Records. The skill now requires a description in every commit, as a line or two of prose or a
Why:section, and shows a small commit next to the full example. The parser keeps aWhy:,Review:orBreaking:that wrapped prose runs onto as prose (no message of 2026 parses differently).New tests:
scripts/recordMarkdown.test.js, added toyarn test-commit-records;commitRecords.test.jsgains tests for--sinceand for a section name wrapped into a paragraph.Companion to #8957, which keeps merged pull requests' pages.
🤖 Generated with Claude Code
https://claude.ai/code/session_01AzPS5F8RDSGZ6dhfK6NdZp