Repository navigation
fix(e2e): normalize both sides of check-docs CLI parity check - #2265
kagura-chen wants to merge 1 commit into
Conversation
…#2250) The CLI parity check in check-docs.sh applies asymmetric normalization: the help side strips trailing <arg>/[arg] placeholders and descriptions separated by 2+ spaces, but the doc side extracts headings verbatim. This causes false mismatches when: 1. A commands.md heading includes argument placeholders (e.g. `nemoclaw <name> channels add <channel>`) — the doc side keeps them while the help side strips them. 2. A --help line has a description separated by a single space after the last argument (e.g. `channels remove <channel> Clear credentials and rebuild`) — the \s{2,} regex does not catch it, leaving description text in the normalized command. Fix both sides: - Help side: add a post-strip pass that removes residual description text starting with a capitalized word, then re-strip any <arg>/[arg] placeholders exposed by description removal. - Doc side: strip trailing <arg> and [arg] placeholders from headings, matching the help-side normalization. Signed-off-by: kagura-agent <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe CLI-doc parity check script is updated to normalize trailing argument placeholders and descriptive text symmetrically between CLI help output and documentation headings. Both sides now strip trailing Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
✨ Thanks for submitting this PR that proposes a way to improve the E2E testing process. Related open issues: |
Problem
The CLI parity check in
check-docs.shapplies asymmetric normalization tothe two sides it compares, causing false mismatches in the nightly E2E run.
Help side (phase 1) strips trailing
<arg>/[arg]placeholders anddescriptions separated by 2+ spaces, but:
channels remove <channel> Clear credentials and rebuild) slip throughthe
\s{2,}regex.<arg>/[arg]placeholders are not re-stripped.
Doc side (phase 2) extracts
### \nemoclaw …`headings **verbatim** without stripping argument placeholders, so headings likenemoclaw channels add ` never match the stripped help output.Fix
starting with a capitalized word (
/\s+[A-Z][a-z].*$/), then re-stripany
<arg>/[arg]placeholders exposed by the description removal.<arg>and[arg]placeholders fromheadings, applying the same normalization as the help side.
Testing
Verified both normalization paths produce identical output for all commands
listed in the issue's CI mismatch log.
Closes #2250
Summary by CodeRabbit