feat: migrate cron routes to Sanity config singletons (Phase B)#613
Merged
codercatdev merged 1 commit intodevfrom Mar 5, 2026
Merged
feat: migrate cron routes to Sanity config singletons (Phase B)#613codercatdev merged 1 commit intodevfrom
codercatdev merged 1 commit intodevfrom
Conversation
Ingest route: ENABLE_NOTEBOOKLM_RESEARCH, quality threshold, system instruction now read from pipeline_config and content_config singletons. Check-research route: stuck thresholds, quality threshold, system instruction now configurable via Sanity. Check-renders route: audited, no tweakable config (Remotion/ElevenLabs config is in service layer). All values use getConfigValue() with existing hardcoded values as fallbacks for graceful degradation. Co-authored-by: research <research@miriad.systems>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase B: Cron Route Config Migration
Migrates hardcoded values and
process.envtweakable config to Sanity config singletons viagetConfig()/getConfigValue().Files Changed (2)
app/api/cron/ingest/route.ts(+31/-5)process.env.ENABLE_NOTEBOOKLM_RESEARCH→getConfigValue("pipeline_config", "enableNotebookLmResearch", false)< 50→getConfigValue("pipeline_config", "qualityThreshold", 50)SYSTEM_INSTRUCTIONconstant →getConfigValue("content_config", "systemInstruction", SYSTEM_INSTRUCTION_FALLBACK)app/api/cron/check-research/route.ts(+34/-10)STUCK_THRESHOLDSconstant →buildStuckThresholds()readsstuckTimeoutMinutesfrompipeline_config(fallback: 30min, ratios: 100%/50%/33%)< 50→getConfigValue("pipeline_config", "qualityThreshold", 50)SYSTEM_INSTRUCTIONconstant →getConfigValue("content_config", "systemInstruction", SYSTEM_INSTRUCTION_FALLBACK)NOT in this PR
check-renders/route.ts— audited, no tweakable config to migrate (Remotion/ElevenLabs config is in service layer, owned by @videopipe)What stays as
process.env(intentionally NOT migrated)CRON_SECRET— auth secretANTHROPIC_API_KEY— API keySANITY_API_TOKEN— API keyPattern
All values use
getConfigValue()with existing hardcoded values as fallbacks, so nothing breaks if the Sanity singletons aren't populated yet.Closes old PR #610 (had sandbox contamination from shared sandbox branch-switching).