LCORE-1279: add unit tests for is_moderation_id and check_suid_prompt#1932
LCORE-1279: add unit tests for is_moderation_id and check_suid_prompt#1932alessandralanz wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
🧰 Additional context used📓 Path-based instructions (1)tests/**/*.py📄 CodeRabbit inference engine (AGENTS.md)
Files:
🔇 Additional comments (1)
WalkthroughAdds 53 lines of unit tests to ChangesSUID Utility Test Coverage
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes 🚥 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)
✨ Simplify code
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 |
|
/ok-to-test |
asimurka
left a comment
There was a problem hiding this comment.
LGTM, please fix failing linters (use make verify)
Description
Follows up on the prior PR #1107 for LCORE-1279 which added tests for
check_suid,normalize_conversation_id, andto_llama_stack_conversation_id. This PR completes the ticket by adding tests for the two remaining untested functions:is_moderation_id: valid prefix, partial prefix, case sensitivity, empty string, cross-format rejectioncheck_suid_prompt: valid input, wrong prefix, wrong hex length (off-by-one), non-hex characters, cross-format rejectionType of change
Tools used to create PR
Identify any AI code assistants used in this PR (for transparency and review context)
Related Tickets & Documents
Checklist before requesting a review
Testing
Run the suid unit tests:
uv run pytest tests/unit/utils/test_suid.py -vRun with coverage to verify 100% line and branch coverage:
uv run pytest tests/unit/utils/test_suid.py --cov=utils.suid --cov-report=term-missing --cov-branchAll 23 tests pass. Coverage output:
src/utils/suid.pySummary by CodeRabbit