fix: recognize structured rate claim windows - #88
Conversation
📝 WalkthroughWalkthroughThe storefront claim validator now detects broader fixed-rate claim wording and reports every occurrence. Parameterized tests cover additional valid phrases and negative cases. ChangesFixed-rate claim validation
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
|
@coderabbitai review |
✅ Action performedReview finished.
|
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 `@scripts/validate_storefront_claims.py`:
- Around line 41-58: Deduplicate claim matches before reporting them so
identical (path, match.start(), match.end()) spans produce only one failure,
including overlapping FIXED_RATE classifications for “50 API requests per
month.” Update the result-collection logic around line 178 to retain one
occurrence per span, and add a regression test asserting this phrase yields
exactly one failure.
🪄 Autofix
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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 3102e9ee-f918-40a1-a8d5-93f41a57df9e
📒 Files selected for processing (2)
scripts/validate_storefront_claims.pytests/test_storefront_claims.py
Summary
Red-green proof
Requested red: the three final orderings failed on the prior head:
50 request limit per day,50-call limit per day, and50 requests allowed daily. The earlier four duration/order cases and seven permutation cases were also captured red before their fixes.Review red:
50 API requests per monthproduced two classifications beforec6fdd4a; the regression now requires exactly one finding.Green:
No
v1.12.4tag or PyPI artifact exists. Release will bind only the final replacement merge SHA after hosted and post-main verification.