[COOP-661] remove table constraint for NCMEC non-media submissions - #871
Conversation
|
Warning Review limit reached
Next review available in: 3 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ 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 |
julietshen
left a comment
There was a problem hiding this comment.
Looks mostly good! The matching TypeScript type at server/services/ncmecService/dbTypes.ts:47-53 still says reported_media: NonEmptyArray<NcmecMediaReport>. That was accurate under the old setup but won't be once text-only reports can be saved.
maybe do a discriminated union so the check for non-empty messages is captured at the type level?
pls also update CHANGELOG.md 😁 thank you!
|
@julietshen the DB type changes are made in #866. I don't think I went with a discriminated union but I can revisit that! I will update the CHANGELOG.md ✅ |
Context & Requests for Reviewers
PR 2 of X to fix #661
See #866. This PR needs to go out alongside #866. This is the migration change to change the DB constraint to allow non-media submissions to NCMEC.
Tests
Validated against the local DB by running the migration body inside a transaction and rolling it back
(Optional) Rollout Plan
This PR needs to be the first or second PR to go out alongside #866
Checklist
Only check items that apply to this PR; leave the rest unchecked.
If you changed anything user-facing (i.e. user interface or APIs):
Did you update the CHANGELOG.md and related docs?
If you changed
server/models/**/{ContentTypeModel,ActionModel,RuleModel,PolicyModel}.ts:Did you update the corresponding history tables and their triggers?
If you changed
db/src/scripts/**and usedCREATE TABLE,ADD COLUMN, orALTER COLUMN:Are as many columns marked
NOT NULLas possible? If some columns can sometimes be null depending on other columns, are thereCHECKconstraints capturing those relationships, and are these also reflected using unions in the associated Kysely types?If you added a new signal in
server/services/signalsService/signals/**:Did you classify every error case as a permanent error (
SignalPermanentError, no retry) or a normal error (retryable)? Any case where the signal can't determine a score should be aSignalPermanentError.