Skip to content

Promote tests and fix regression - #276

Merged
panglesd merged 3 commits into
mainfrom
fix-failing-tests
Aug 27, 2026
Merged

Promote tests and fix regression#276
panglesd merged 3 commits into
mainfrom
fix-failing-tests

Conversation

@panglesd

Copy link
Copy Markdown
Owner

#270 did not promote tests, and in particular 326f479 introduced a regression.

This PR promotes the tests first, then fix the regression. Which was that children: attributes erased attributes associated to the children.

No changelog since the regression was not released.

Note that there is a regression: a `children:` attribute has erased an attribute
defined in place
This adds also a small difference in behavior in terms of reported errors: a
duplicated attribute will be ignored and so not be reported if
non-standard. This is fine as anyway the attribute eraser will be reported.

The regression was introduced by 326f479, and before it was working but mostly
by chance.
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7f2fea7b-79e5-42ba-a495-a363228c7daa

📥 Commits

Reviewing files that changed from the base of the PR and between 92dc260 and 8cbdda6.

📒 Files selected for processing (6)
  • src/engine/previewer/dune
  • src/engine/previewer/previewer.mli
  • src/engine/runtime/messaging/messaging.mli
  • src/lspishow/roots.mli
  • src/server/proto/proto.mli
  • src/server/slipshow_server.mli

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The change adds keep_base parameters to Cmarkit attribute operations and compiler attribute helpers. Attribute insertion now supports retaining existing values, replacing values in place, and deduplicating classes. Compiler, frontmatter, image, link, SVG, embed, and script paths pass explicit merge policies. Parsing paths retain their previous replacement behavior. Test expectations update warning order and rendered attribute order.

Merge Risk: 🟡 Moderate · up to 8cbdd

The PR promotes regression tests and changes attribute-merging behavior, but the current head still contains a compile-blocking renderer issue, so it should not merge until that mismatch is fixed.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the two main changes: promoting tests and fixing the child-attribute regression.
Description check ✅ Passed The description directly explains the regression, its cause, the fix order, and the absence of a changelog entry.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (6 skipped: 6 unsupported.)


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7a061526-5064-459f-8195-f47313b93e79

📥 Commits

Reviewing files that changed from the base of the PR and between 361976d and 92dc260.

📒 Files selected for processing (9)
  • src/compiler/ast.ml
  • src/compiler/compile.ml
  • src/compiler/frontmatter.ml
  • src/compiler/renderers.ml
  • test/compiler/dash-separator/children-slides.t/run.t
  • test/compiler/slides.t/run.t
  • vendor/github.com/panglesd/cmarkit/src/cmarkit.ml
  • vendor/github.com/panglesd/cmarkit/src/cmarkit.mli
  • vendor/github.com/panglesd/cmarkit/src/cmarkit_html.ml

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Comment thread src/compiler/renderers.ml
Comment on lines +215 to +217
attrs
|> add_escaped_attrs ~keep_base:false "data" l
|> add_escaped_attrs ~keep_base:false "type" "image/svg+xml"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Accept and forward ~keep_base through add_escaped_attrs. Cmarkit.Attributes.add requires this label, but the current renderer path does not provide it. Update the helper and its call sites so the argument is accepted and forwarded consistently; otherwise the current head fails to compile.

📍 Affects 2 files
  • src/compiler/renderers.ml#L215-L217 (this comment)
  • vendor/github.com/panglesd/cmarkit/src/cmarkit.mli#L316-L316

@panglesd
panglesd merged commit 436ebaf into main Aug 27, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant