Skip to content

feat: improve channel highlight evaluation history#3734

Merged
idoshamun merged 2 commits intomainfrom
codex/channel-highlight-history
Mar 23, 2026
Merged

feat: improve channel highlight evaluation history#3734
idoshamun merged 2 commits intomainfrom
codex/channel-highlight-history

Conversation

@idoshamun
Copy link
Member

Summary

  • send the last 7 days of channel highlights to Bragi as evaluation context, including recently retired highlights
  • canonicalize that historical context through collections so follow-up stories carry prior highlight memory
  • stop using statsUpdatedAt as an incremental trigger so view churn alone does not resurface older posts

Context

A production check in vpc / daily showed the Karpathy post SHMkCvdE8 was created on 2026-03-21 and re-entered evaluation after its statsUpdatedAt moved on 2026-03-23 08:18 UTC. It had no collection relation, so that specific resurfacing came from the incremental fetch path rather than collection canonicalization.

Testing

  • pnpm exec eslint src/common/channelHighlight/generate.ts src/common/channelHighlight/queries.ts __tests__/workers/generateChannelHighlight.ts
  • NODE_ENV=test npx jest __tests__/workers/generateChannelHighlight.ts --testEnvironment=node --runInBand

@pulumi
Copy link

pulumi bot commented Mar 23, 2026

🍹 The Update (preview) for dailydotdev/api/prod (at 49b1344) was successful.

✨ Neo Explanation

This is a standard production rollout deploying a new application version across all 7 services and 38 scheduled jobs, with accompanying database and ClickHouse migration jobs being swapped in for the new version.

Root Cause Analysis

A new version of the application has been built and is being deployed to production. Every Kubernetes resource is being updated to roll out the new container image, replacing the previous build with the latest one.

Dependency Chain

The new application version cascades uniformly across the entire workload fleet:

  • 7 Deployments (API, background workers, WebSocket, private, Temporal, personalized digest, worker-job) are being updated to pull the new container image
  • 38 CronJobs are updated to reference the new image so future scheduled runs use the latest code
  • 2 one-time migration Jobs (database and ClickHouse) tied to the previous version are being deleted and replaced with new equivalents that run against the new schema — this is the standard pattern for running migrations as part of a deployment

Risk Analysis

No stateful resources (databases, storage buckets, persistent volumes) are being replaced or deleted. The migration jobs (DB and ClickHouse) are the only elevated-attention items — they will run typeorm migration:run and ClickHouse migrations against production data, which is expected and normal for this deployment pattern. Deployments use Kubernetes rolling updates, so no downtime is expected.

There is a non-blocking GCP credentials warning that does not affect the Kubernetes changes.

Resource Changes

    Name                                                       Type                           Operation
~   vpc-native-channel-digests-cron                            kubernetes:batch/v1:CronJob    update
~   vpc-native-update-source-public-threshold-cron             kubernetes:batch/v1:CronJob    update
~   vpc-native-post-analytics-history-day-clickhouse-cron      kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-channel-highlights-cron                   kubernetes:batch/v1:CronJob    update
~   vpc-native-generic-referral-reminder-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-private-deployment                              kubernetes:apps/v1:Deployment  update
~   vpc-native-update-highlighted-views-cron                   kubernetes:batch/v1:CronJob    update
~   vpc-native-user-profile-analytics-history-clickhouse-cron  kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-gifted-plus-cron                          kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-expired-better-auth-sessions-cron         kubernetes:batch/v1:CronJob    update
~   vpc-native-bg-deployment                                   kubernetes:apps/v1:Deployment  update
~   vpc-native-user-profile-analytics-clickhouse-cron          kubernetes:batch/v1:CronJob    update
+   vpc-native-api-db-migration-21e3f419                       kubernetes:batch/v1:Job        create
~   vpc-native-deployment                                      kubernetes:apps/v1:Deployment  update
~   vpc-native-clean-zombie-images-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-user-profile-updated-sync-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-rotate-weekly-quests-cron                       kubernetes:batch/v1:CronJob    update
~   vpc-native-update-current-streak-cron                      kubernetes:batch/v1:CronJob    update
~   vpc-native-calculate-top-readers-cron                      kubernetes:batch/v1:CronJob    update
~   vpc-native-update-achievement-rarity-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-update-tag-recommendations-cron                 kubernetes:batch/v1:CronJob    update
~   vpc-native-personalized-digest-deployment                  kubernetes:apps/v1:Deployment  update
~   vpc-native-channel-highlights-cron                         kubernetes:batch/v1:CronJob    update
~   vpc-native-sync-subscription-with-cio-cron                 kubernetes:batch/v1:CronJob    update
~   vpc-native-expire-super-agent-trial-cron                   kubernetes:batch/v1:CronJob    update
~   vpc-native-generate-search-invites-cron                    kubernetes:batch/v1:CronJob    update
~   vpc-native-ws-deployment                                   kubernetes:apps/v1:Deployment  update
~   vpc-native-clean-zombie-user-companies-cron                kubernetes:batch/v1:CronJob    update
~   vpc-native-hourly-notification-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-check-analytics-report-cron                     kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-zombie-opportunities-cron                 kubernetes:batch/v1:CronJob    update
~   vpc-native-post-analytics-clickhouse-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-personalized-digest-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-worker-job-deployment                           kubernetes:apps/v1:Deployment  update
~   vpc-native-user-posts-analytics-refresh-cron               kubernetes:batch/v1:CronJob    update
~   vpc-native-squad-posts-analytics-refresh-cron              kubernetes:batch/v1:CronJob    update
-   vpc-native-api-db-migration-655a17fa                       kubernetes:batch/v1:Job        delete
~   vpc-native-temporal-deployment                             kubernetes:apps/v1:Deployment  update
~   vpc-native-clean-zombie-users-cron                         kubernetes:batch/v1:CronJob    update
~   vpc-native-rotate-daily-quests-cron                        kubernetes:batch/v1:CronJob    update
-   vpc-native-api-clickhouse-migration-655a17fa               kubernetes:batch/v1:Job        delete
... and 10 other changes

@idoshamun idoshamun changed the title Improve channel highlight evaluation history feat: improve channel highlight evaluation history Mar 23, 2026
@idoshamun idoshamun merged commit 13abd9c into main Mar 23, 2026
10 checks passed
@idoshamun idoshamun deleted the codex/channel-highlight-history branch March 23, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant