Repository navigation
fix(teaching,cme): address late CodeRabbit review on #3614 - #3622
Conversation
- Dual sign-off reads accept only rows marked ratings.kind = dual_sign_off, so other registrar_assessments rows are never read or rewritten as assessments. - Slot times must be ISO 8601 with an offset. - Role-less booking listings are filtered in the database (own slots, plus open slots for a named service) instead of scanning every booking. - Part-time EPA minimum rounds up to a whole number.
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
There was a problem hiding this comment.
BigSimmo has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
🤖 CodeAnt AI — Review Status
|
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYour organization has reached its usage spending cap. Adjust your spending cap in the billing tab. Next included review available in 5 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
Claude encountered an error after 2s —— View job I'll analyze this and get back to you. |
🏁 CodeAnt Quality Gate ResultsCommit: ✅ Overall Status: PASSEDQuality Gate Details
|
PR Summary by QodoProtect dual sign-off rows and tighten booking and EPA rules
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: affe204ae6
ℹ️ 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".
Code Review by Qodo
1. Previously saved sign-off assessments vanish after this fix
|
CodeAnt Nitpicks1 code suggestion1. Independent reads can straddle a booking change; the stale open duplicate is inserted last and overwrites the newer booked state in the returned map.Race condition · |
CodeAnt PR Risk: Low Risk
Assessed commit: |
Code Review by Qodo
No findings for this group No findings for this group No findings for this group Resolved findings 1.
|
… and updatable Covers Qodo's legacy-shape fallback for assessments written by #3614 before ratings.kind existed; an update re-writes them with the marker.
|
Code review by qodo was updated up to the latest commit b185ab5 |
Code Review ✅ Approved 1 closed / 1 findings🔴 High risk · Discriminator-based assessment reads and updates, including legacy-row matching, could expose or rewrite unrelated registrar assessment records if rows are misclassified. Dual sign-off reads and updates now require ✅ 1 closed✅ Bug: Dual sign-off rows written under #3614 lack
|
| Auto-apply | Compact |
|
|
Important
Your trial ends in 4 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more.
Was this helpful? React with 👍 / 👎 | Gitar
|
Code review by qodo was updated up to the latest commit 126778e |
User description
Follow-up to #3614. This addresses the 6 CodeRabbit threads that were posted after #3614 auto-merged.
Fixes (5)
ratings.kind = "dual_sign_off", applied to the lookup by id and to both lists. Otherregistrar_assessmentsrows are never read as assessments or rewritten into one. New test covers this.startsAt/endsAtusez.string().datetime({ offset: true }).max(1, ceil(2 × FTE)), never a fraction./api/cme/training/[id]fall back toregistrar_training_milestones). It is listed here so all 6 threads are accounted for.No change needed (1)
shouldSyncRegistrarTable, and the fake client'sregistrarSyncflag opts in. The test runs the sync path and passes.No sign-off records are created, changed or approved; these are code-level validation changes only.
Summary by cubic
Addresses the six CodeRabbit review threads posted after #3614 auto-merged with five code-level fixes; no sign-off records are created, changed, or approved.
ratings.kind = "dual_sign_off"(plus legacy rows written before that discriminator existed), so otherregistrar_assessmentsrows are never read as assessments or rewritten into one. New tests cover both rejecting foreign rows and preserving pre-marker rows, which an update re-writes with the marker.startsAt/endsAtnow require ISO 8601 timestamps with an offset.max(1, ceil(2 × FTE))— a whole number.registrarSync, so the test runs the sync path and passes.Written for commit 126778e. Summary will update on new commits.
CodeAnt-AI Description
Protect dual sign-off records and validate booking schedules
What Changed
Impact
✅ Unrelated assessment records stay unchanged✅ Fewer timezone-ambiguous booking times✅ Booking lists exclude other users’ slots✅ Whole-number EPA targets for part-time rotations💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.
Summary by CodeRabbit