Fix Flesch-Kincaid grade 9 threshold - #1856
Conversation
|
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)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughReadability failure checks now use a strict grade-above-9 threshold in AJAX and REST responses. PHPUnit tests cover grade 9 as passing and grade 10 as failing. ChangesReadability threshold alignment
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/phpunit/includes/classes/RestApiSidebarDataTest.php`:
- Around line 161-163: Update the test cleanup flow in tearDown() for the shared
self::$post_id fixture to delete the _edac_simplified_summary metadata after
each test, ensuring test_get_readability_data_uses_above_ninth_grade_threshold()
cannot affect later tests.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 0c03123b-c37e-4810-acfe-ccb447df1a8b
📒 Files selected for processing (4)
admin/class-ajax.phpincludes/classes/class-rest-api.phptests/phpunit/Admin/AjaxReadabilityTest.phptests/phpunit/includes/classes/RestApiSidebarDataTest.php
Fixes #1797.
Summary
> 9.Root cause
Two readability paths used boundary conditions equivalent to
>= 9, while the related checks and user-facing copy define a failure as a reading level higher than grade 9. A nearby comment also described the correct> 9comparison as "grade 9+."Validation
git diff --check.Checklist
Summary by CodeRabbit
Bug Fixes
Tests