You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #1. These were raised in the final CodeRabbit review, which I merged
without reading — the automation I used watched inline-comment counts and missed
that the findings were in the review body.
- `validate_channel_against_youtube` took `&mut Channel` but dropped the
validated result, so the client-supplied channel name was persisted instead of
the canonical one from the feed. Upstream behaved the same way, but the
refactor in #1 left the two paths inconsistent, since the video path does
assign it back. Names are only fuzzily matched before being accepted, and the
channel table is shared between accounts.
- `validate_videos_against_youtube` zipped two slices whose equal length was
documented but unenforced. `zip` truncates, so a short plan would silently skip
RSS validation for the tail. No caller does that today, but it gates metadata
validation and is the same failure mode as the dedup bypass fixed in #1.
- `verify_image_url` checked the host but not the scheme, so `http://ytimg.com/…`
was accepted and handed to clients to load. Now requires https.
- Single `subscribe` only pre-checked the quota, outside any transaction, so
concurrent requests could each see an under-quota count and together exceed it.
Now matches the bulk path.
- `add_to_playlist` checked ownership before the RSS round-trips and never again,
so a playlist deleted in that window surfaced as an opaque database error rather
than PlaylistNotExists. Re-checked inside the transaction.
- `add_to_watch_history` answered `200 null` if the stored batch came back empty.
- `exceeds_row_quota` no longer takes an `incoming` count: every caller passes 0
now that the quota is enforced on rows that actually exist.
0 commit comments