[codex] Make docs metadata assertions resilient#11
Conversation
📝 WalkthroughWalkthroughTest assertions in ChangesTest Assertion Refinement
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 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 docstrings
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f0efc31588
ℹ️ 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".
There was a problem hiding this comment.
Code Review
This pull request updates the developer documentation tests by relaxing the HTML language attribute check and splitting a combined string assertion into individual checks for 'REST API', 'OpenAPI schema', and 'MCP endpoint'. Feedback indicates that while this improves resilience against punctuation changes, it reduces the test's specificity for metadata, as these terms may appear elsewhere in the page body rather than specifically in the document head.
|
Avaliei também o comentário do CodeRabbit: era informativo/rate-limit. Depois dos commits adicionais, o status do CodeRabbit ficou verde como |
Summary
/docslanguage assertion resilient while still scoped to the root<html>element.<meta name="description">content directly instead of searching generic terms in the whole page body.Root cause
The PR #9 regression test fixed the docs meta-language issue but initially used assertions that were either too tightly coupled to exact HTML text or too broad across the entire rendered page.
Review feedback addressed
<html lang="en">and long description string assertions.<html>tag.<head>/<meta name="description">, not generic page-body text.Validation
PYTHONPATH="$PWD/src" /Users/macbook/repos/findata-br/.venv/bin/ruff format --check src/ tests/ scripts/PYTHONPATH="$PWD/src" /Users/macbook/repos/findata-br/.venv/bin/ruff check src/ tests/ scripts/PYTHONPATH="$PWD/src" /Users/macbook/repos/findata-br/.venv/bin/python -m mypy src/findataPYTHONPATH="$PWD/src" /Users/macbook/repos/findata-br/.venv/bin/python -m pytest tests/ -qgit diff --checkNote
Leaving this PR open for explicit approval before merge/close.