fix: remap unknown-source posts in channel digest to public shares#3915
Conversation
Articles created via squad shares have sourceId='unknown' and aren't surfaced anywhere, so digest links to them landed on broken pages. Mirroring the channel-highlight pattern, swap unknown post ids for their best public SharePost counterpart via the existing fetchPublicShareFallbackPostIds helper. Keep the original id when no public share exists. Also tightened the helper to select only the columns it returns.
|
🍹 The Update (preview) for dailydotdev/api/prod (at c23a7fd) was successful. ✨ Neo ExplanationStandard image rollout deploying a channel digest improvement that remaps `UNKNOWN_SOURCE` posts to their public SharePost equivalents. All changes are application-level with no infrastructure modifications; this is ✅ Low Risk.This is a routine application deployment rolling out commit The migration jobs (both DB and Clickhouse) are being cycled to the new commit hash as expected — the old jobs are deleted and new ones created. No schema-breaking changes are apparent from the diff; the only DB query change is adding Resource Changes Name Type Operation
~ vpc-native-channel-highlights-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-highlighted-views-cron kubernetes:batch/v1:CronJob update
~ vpc-native-ws-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-user-profile-updated-sync-cron kubernetes:batch/v1:CronJob update
~ vpc-native-rotate-daily-quests-cron kubernetes:batch/v1:CronJob update
~ vpc-native-bg-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-validate-active-users-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-trending-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-gifted-plus-cron kubernetes:batch/v1:CronJob update
~ vpc-native-calculate-top-readers-cron kubernetes:batch/v1:CronJob update
~ vpc-native-worker-job-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-personalized-digest-deployment kubernetes:apps/v1:Deployment update
+ vpc-native-api-clickhouse-migration-37feb0e7 kubernetes:batch/v1:Job create
~ vpc-native-generate-search-invites-cron kubernetes:batch/v1:CronJob update
~ vpc-native-post-analytics-clickhouse-cron kubernetes:batch/v1:CronJob update
~ vpc-native-user-profile-analytics-history-clickhouse-cron kubernetes:batch/v1:CronJob update
~ vpc-native-hourly-notification-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-source-public-threshold-cron kubernetes:batch/v1:CronJob update
~ vpc-native-materialize-monthly-best-post-archives-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-views-cron kubernetes:batch/v1:CronJob update
~ vpc-native-squad-posts-analytics-refresh-cron kubernetes:batch/v1:CronJob update
~ vpc-native-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-user-profile-analytics-clickhouse-cron kubernetes:batch/v1:CronJob update
~ vpc-native-private-deployment kubernetes:apps/v1:Deployment update
- vpc-native-api-clickhouse-migration-0c8c6467 kubernetes:batch/v1:Job delete
~ vpc-native-personalized-digest-cron kubernetes:batch/v1:CronJob update
~ vpc-native-rotate-weekly-quests-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-expired-better-auth-sessions-cron kubernetes:batch/v1:CronJob update
~ vpc-native-daily-digest-cron kubernetes:batch/v1:CronJob update
~ vpc-native-temporal-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-clean-old-notifications-cron kubernetes:batch/v1:CronJob update
~ vpc-native-post-analytics-history-day-clickhouse-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-opportunities-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-achievement-rarity-cron kubernetes:batch/v1:CronJob update
~ vpc-native-expire-super-agent-trial-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-user-companies-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-tags-str-cron kubernetes:batch/v1:CronJob update
~ vpc-native-channel-digests-cron kubernetes:batch/v1:CronJob update
~ vpc-native-user-posts-analytics-refresh-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-stale-user-transactions-cron kubernetes:batch/v1:CronJob update
~ vpc-native-check-analytics-report-cron kubernetes:batch/v1:CronJob update
... and 12 other changes |
Summary
sourceId='unknown'and don't render as standalone pages. After feat: render topical digest links #3914 added[Read more]links to topical digests, any unknown-source article that Bragi picked surfaced as a broken/posts/<id>link.channelHighlightpattern: for each unknown-source candidate, swap to the best publicSharePostcounterpart via the existingfetchPublicShareFallbackPostIdshelper. Falls back to the original id when no public share exists, so editorial coverage isn't lost on rare orphans.fetchPublicShareFallbackPostIdsto select onlyid+sharedPostId.Verified
/posts/tl2aTyPEZ(broken); after, it links to/posts/eC0jdjIYx(the public share).Test plan