Repository navigation
refactor(parser): make markdown golden meta-driven, drop generator script - #18100
xugangqiang wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
💤 Files with no reviewable changes (2)
📝 WalkthroughWalkthroughThe Markdown alignment test now covers separate English and Chinese samples. It loads metadata-defined golden fixtures, applies accepted divergences, and compares normalized parser output. The standalone golden-generation script was removed. ChangesMarkdown alignment validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
e8d73a7 to
efeaf34
Compare
f2e724d to
1e39d24
Compare
c84236a to
dc3680e
Compare
…ript
Move the markdown golden baseline to the {meta, items} format and drive
accepted divergences from meta.accepted_divergences instead of hardcoded lists.
No production parser code changes.
- markdown.python.golden.json is now {meta, items}; meta records how it was
produced so it is reproducible without a committed script.
- TestMarkdownParser_AlignmentGolden uses LoadGoldenDoc / AcceptedDivergences /
FilterOutDocTypes (from the foundation helpers PR).
- Deletes testdata/gen_markdown_golden.py.
Depends on #18014 and the foundation helpers PR (align_test.go).
Files:
internal/parser/parser/markdown_parser_test.go
internal/parser/parser/testdata/markdown.python.golden.json
internal/parser/parser/testdata/markdown.sample.md
internal/parser/parser/testdata/gen_markdown_golden.py (deleted)
- Rename the English sample/golden to *_en.* and add a Chinese
counterpart (*_zh.*) so markdown parsing is exercised in both Latin
and CJK contexts; the Chinese sample also covers the full-width
delimiters in the default delimiter set (\n!?;。;!?).
- Both baselines keep the {meta, items} form with accepted_divergences
declared in meta; the test is now table-driven over en/zh.
- The generator script is not committed; regeneration is described in
each golden's meta block.
Stacks on the markdown golden meta-driven refactor (c84236a).
dc3680e to
95cab76
Compare
|
Reopening from fork (xugangqiang:fix/markdown-golden-meta) per repo workflow: feature branches live on the fork, not upstream. |
Summary
Move the markdown golden baseline to the
{meta, items}format and driveaccepted divergences from
meta.accepted_divergencesinstead of hardcodedlists. No production parser code changes.
markdown.python.golden.jsonis now{meta, items};metarecords how itwas produced so it is reproducible without a committed script.
TestMarkdownParser_AlignmentGoldenusesLoadGoldenDoc/AcceptedDivergences/FilterOutDocTypes(from the foundation helpers PR).testdata/gen_markdown_golden.py.Dependency
Stacks on #18014 (framework in
main) and the foundation helpers PR(
fix/parser-align-foundation).