Skip to content

docs(parser): annotate every test with its CASE.* in TEST_CASES.md#8725

Merged
keivenchang merged 1 commit into
mainfrom
keivenchang/parser-test-taxonomy_index
Apr 27, 2026
Merged

docs(parser): annotate every test with its CASE.* in TEST_CASES.md#8725
keivenchang merged 1 commit into
mainfrom
keivenchang/parser-test-taxonomy_index

Conversation

@keivenchang
Copy link
Copy Markdown
Contributor

@keivenchang keivenchang commented Apr 25, 2026

hey guys, I'm just doing a trivial (NO CODE CHANGE) doc reorg so the docs read more clearly and the tests are categorized so we have an idea of coverage. all 389 tests still pass.

paired with DIS-1842's contract test scaffold (#8728) — that PR adds runnable cross-parser tests, this one makes existing per-parser tests greppable.

@keivenchang keivenchang requested a review from a team as a code owner April 25, 2026 16:35
@keivenchang keivenchang self-assigned this Apr 25, 2026
@github-actions github-actions Bot added test documentation Improvements or additions to documentation labels Apr 25, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 25, 2026

Walkthrough

A documentation file was extended with new test case categories (CASE.20–CASE.24) defining parser-internal detection scenarios and edge cases. Across multiple parser modules, unit test functions received inline case-identifying comments (e.g., // CASE.X) appended to their #[test] attributes for tracking test coverage taxonomy alignment. No production logic or test behavior was modified.

Changes

Cohort / File(s) Summary
Test Case Documentation
lib/parsers/TESTING.md
Extended taxonomy with new categories CASE.20–CASE.24 clarifying test coverage expectations for parser-internal helpers, identifier/regex handling, whitespace robustness, section-token variants, and empty tool-call sections.
Reasoning Parsers Test Annotations
lib/parsers/src/reasoning/base_parser.rs, gpt_oss_parser.rs, granite_parser.rs, minimax_append_think_parser.rs, mod.rs
Updated multiple #[test] and #[rstest] attributes with inline // CASE.* comment labels. No test logic or assertions altered.
Tool Calling — JSON Parsers Test Annotations
lib/parsers/src/tool_calling/json/base_json_parser.rs, deepseek_v3_parser.rs, deepseek_v3_1_parser.rs, mod.rs
Appended case-identifying comments to #[test] attributes across multiple detect and parse test functions. No behavioral changes.
Tool Calling — XML Parsers Test Annotations
lib/parsers/src/tool_calling/xml/glm47_parser.rs, kimi_k2_parser.rs, parser.rs
Added inline // CASE.* labels to #[test] and #[rstest] functions. No parsing logic or control flow affected.
Tool Calling — Other Parsers Test Annotations
lib/parsers/src/tool_calling/dsml/parser.rs, harmony/harmony_parser.rs, pythonic/pythonic_parser.rs
Updated test attributes with case taxonomy comments. No test implementations or assertions modified.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.15% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive PR description is minimal but conveys intent: documentation-only reorganization annotating 232 tests with case labels and adding 5 new TESTING.md entries. Core purpose (test taxonomy cross-indexing) and scope (no code changes, 389 tests pass) are clear. Add structured sections matching template: Overview, Details (specific file changes), Where to start (recommended review entry point), and Related Issues reference. Currently lacks organization against template structure.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Related issues and internal tracking (DIS-1842, PR #8724) are mentioned in the description; the PR is correctly positioned as a companion to the contract test scaffold work and applies independently to all parser tests.
Out of Scope Changes check ✅ Passed All changes are scoped to test annotations and TEST_CASES.md documentation within lib/parsers/; no production code, test logic, or assertions were modified; integration tests under lib/llm/tests/ are correctly deferred.
Title check ✅ Passed The PR title accurately summarizes the main change: adding CASE.* annotations to every test in the parser suite and updating TESTING.md. It is concise, specific, and directly reflects the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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 and usage tips.

@keivenchang keivenchang changed the title test(parsers): annotate every test with its CASE.* in TESTING.md test(parsers): annotate every test with its CASE.* in TEST_CASES.md Apr 25, 2026
@keivenchang keivenchang deleted the keivenchang/parser-test-taxonomy_index branch April 25, 2026 16:58
@keivenchang
Copy link
Copy Markdown
Contributor Author

Superseded by #8729 — head branch renamed to add the DIS-1842 prefix per branch-naming convention; GitHub auto-closed this PR despite the rename API saying it should migrate. All work continues there.

@keivenchang keivenchang restored the keivenchang/parser-test-taxonomy_index branch April 25, 2026 17:03
@keivenchang keivenchang reopened this Apr 25, 2026
@keivenchang keivenchang changed the title test(parsers): annotate every test with its CASE.* in TEST_CASES.md docs(parsers): annotate every test with its CASE.* in TEST_CASES.md Apr 25, 2026
@github-actions github-actions Bot added docs and removed test labels Apr 25, 2026
@keivenchang keivenchang changed the title docs(parsers): annotate every test with its CASE.* in TEST_CASES.md adding comment on every tool-calling with a test case # Apr 25, 2026
@keivenchang keivenchang changed the title adding comment on every tool-calling with a test case # docs(parser): adding comment on every tool-calling with a test case # Apr 25, 2026
Copy link
Copy Markdown
Contributor

@ayushag-nv ayushag-nv left a comment

Choose a reason for hiding this comment

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

@keivenchang Just one comment, do we need the TEST_CASES.md file in the repo. I won't prefer that. May be you can add it as a skill in .claude or something if you want to use it as testing skill ?

@MatejKosec
Copy link
Copy Markdown
Contributor

Thanks for doing this!

@keivenchang
Copy link
Copy Markdown
Contributor Author

@keivenchang Just one comment, do we need the TEST_CASES.md file in the repo. I won't prefer that. May be you can add it as a skill in .claude or something if you want to use it as testing skill ?

Will address this in the next PR, we'll have skill (how to do something) and the md file (what corner cases we have) reference each other. Coming up!

@keivenchang keivenchang changed the title docs(parser): adding comment on every tool-calling with a test case # docs(parser): annotate every test with its CASE.* in TEST_CASES.md Apr 27, 2026
Cross-index every existing inline parser test with the universal test-case
taxonomy in lib/parsers/TEST_CASES.md (renamed from TESTING.md) so a single
`grep CASE.5` finds every missing-end-token test across every parser.

No code changes — only `//` line comments next to existing #[test]
attributes plus edits to lib/parsers/TEST_CASES.md. All 389 existing tests
pass unmodified.

Signed-off-by: Keiven Chang <keivenchang@users.noreply.github.com>
@keivenchang keivenchang force-pushed the keivenchang/parser-test-taxonomy_index branch from 5c5bb7b to 742405d Compare April 27, 2026 19:47
@keivenchang keivenchang merged commit 6e51a59 into main Apr 27, 2026
157 of 159 checks passed
@keivenchang keivenchang deleted the keivenchang/parser-test-taxonomy_index branch April 27, 2026 21:52
furionw pushed a commit that referenced this pull request May 2, 2026
…8725)

Signed-off-by: Keiven Chang <keivenchang@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs documentation Improvements or additions to documentation size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants